CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

Search found 36 matches
CCS Forum Index
Author Message
  Topic: #DEVICE ADC = 10-Can not change device type this far into
Boyce

Replies: 4
Views: 20427

PostForum: General CCS C Discussion   Posted: Wed Mar 10, 2010 7:11 pm   Subject: #DEVICE ADC = 10-Can not change device type this far into
Sorry, I was mistaken when I said #DEVICE ADC = 10 was in the 16F690.h file.

Actually, it is in the main.h file. The main.h file contains the following:
#include <16F690.h>
#device adc=10 ...
  Topic: #DEVICE ADC = 10-Can not change device type this far into
Boyce

Replies: 4
Views: 20427

PostForum: General CCS C Discussion   Posted: Tue Mar 09, 2010 11:43 pm   Subject: #DEVICE ADC = 10-Can not change device type this far into
Or put it in the 16F690.h file were the #device adc = 8 is. Change the 8 to 10. Works.

Thanks for the suggestion.
Boyce
  Topic: #DEVICE ADC = 10-Can not change device type this far into
Boyce

Replies: 4
Views: 20427

PostForum: General CCS C Discussion   Posted: Tue Mar 09, 2010 7:07 pm   Subject: #DEVICE ADC = 10-Can not change device type this far into
Compiler PCW 4.104 Device 16F690

How is #DEVICE ADC = 10 applied?

When I put it in my code, the error
"Can not change device type this far into the code"
pops up.

What can I ...
  Topic: PWM 16F690, PIN_C5 issue, 5 wire stepping motor drive
Boyce

Replies: 14
Views: 16737

PostForum: General CCS C Discussion   Posted: Tue Mar 09, 2010 10:01 am   Subject: PWM 16F690, PIN_C5 issue, 5 wire stepping motor drive
Hello

Maybe try to switch off the pwm module. It work for me in the same situation. The macro you get for free:-)


#define Pwm1(x) output_bit(PIN_C5,x)

setup_ccp1(CCP_OFF ...
  Topic: ADC Reference input pin selection issue
Boyce

Replies: 0
Views: 2888

PostForum: General CCS C Discussion   Posted: Tue Mar 09, 2010 12:34 am   Subject: ADC Reference input pin selection issue
Compiler 4.104 16F690

I am trying to find a way to use one of the ADC input pins as a reference voltage input for the other ADC input pins. I don't see how to do it.

This did not work:

se ...
  Topic: PWM 16F690, PIN_C5 issue, 5 wire stepping motor drive
Boyce

Replies: 14
Views: 16737

PostForum: General CCS C Discussion   Posted: Mon Mar 08, 2010 10:11 pm   Subject: PWM 16F690, PIN_C5 issue, 5 wire stepping motor drive
Here's the logic analyzer screenshot of what I see. There is an occasional
long pulse at the start of the "ramp up" section. I don't ever see the
pulses that you see.
http://img502.imag ...
  Topic: PWM 16F690, PIN_C5 issue, 5 wire stepping motor drive
Boyce

Replies: 14
Views: 16737

PostForum: General CCS C Discussion   Posted: Sun Mar 07, 2010 2:09 pm   Subject: PWM 16F690, PIN_C5 issue, 5 wire stepping motor drive
Here's the logic analyzer screenshot of what I see. There is an occasional
long pulse at the start of the "ramp up" section. I don't ever see the
pulses that you see.
http://img502.imag ...
  Topic: PWM 16F690, PIN_C5 issue, 5 wire stepping motor drive
Boyce

Replies: 14
Views: 16737

PostForum: General CCS C Discussion   Posted: Sun Mar 07, 2010 1:33 pm   Subject: PWM 16F690, PIN_C5 issue, 5 wire stepping motor drive
Can you clarify exactly what is wrong with the waveform ?
I installed vs. 4.104. I programmed your posted code into the 16F690
on my breadboard. I'm looking at pins C5 (pwm signal) and C0 (marker) ...
  Topic: PWM 16F690, PIN_C5 issue, 5 wire stepping motor drive
Boyce

Replies: 14
Views: 16737

PostForum: General CCS C Discussion   Posted: Sun Mar 07, 2010 10:02 am   Subject: PWM 16F690, PIN_C5 issue, 5 wire stepping motor drive
Try disconnecting the stepper from the PIC. Run the PIC and see if you still have the problem with PORTC.5.
Rohit

The PORTC.5 problem exists when the stepper driver is disconnected.

It also d ...
  Topic: PWM 16F690, PIN_C5 issue, 5 wire stepping motor drive
Boyce

Replies: 14
Views: 16737

PostForum: General CCS C Discussion   Posted: Sat Mar 06, 2010 11:59 pm   Subject: PWM 16F690, PIN_C5 issue, 5 wire stepping motor drive
Post the main.h file, so the program can be compiled.

#include <16F690.h>
#device adc=8

#FUSES NOWDT //No Watch Dog Timer
#FUSES HS //High speed Osc ...
  Topic: PWM 16F690, PIN_C5 issue, 5 wire stepping motor drive
Boyce

Replies: 14
Views: 16737

PostForum: General CCS C Discussion   Posted: Sat Mar 06, 2010 11:35 pm   Subject: PWM 16F690, PIN_C5 issue, 5 wire stepping motor drive
You didn't provide any theory. Why are you setting bits C2-C5 ?
What are the connections to the stepper motor ? Post a schematic
of your project. Post a link to the data sheet for the stepper m ...
  Topic: #asm bsf PORTC, 5 #endasm does not work
Boyce

Replies: 10
Views: 19075

PostForum: General CCS C Discussion   Posted: Sat Mar 06, 2010 9:43 pm   Subject: #asm bsf PORTC, 5 #endasm does not work
From what you have said, the "0x05" can be replaced with plain ol' "5". Yes, 0x05 is the hexadecimal representation of 5. You could even replace it with 0b00000101 (binary). Note t ...
  Topic: #asm bsf PORTC, 5 #endasm does not work
Boyce

Replies: 10
Views: 19075

PostForum: General CCS C Discussion   Posted: Fri Mar 05, 2010 10:17 pm   Subject: #asm bsf PORTC, 5 #endasm does not work
...So whether I write bcf 0x03,5 or bcf 0x83,5 it doesn't matter, since the MSBit of 0x83 is 'ignored' anyway. However you should be technically fastidious and write bcf 0x83,5. :razz:
Rohit

Ok, ...
  Topic: PWM 16F690, PIN_C5 issue, 5 wire stepping motor drive
Boyce

Replies: 14
Views: 16737

PostForum: General CCS C Discussion   Posted: Fri Mar 05, 2010 7:34 pm   Subject: PWM 16F690, PIN_C5 issue, 5 wire stepping motor drive
Thanks for your response.

Think 5 or 6 lead UNIPOLAR motors...

4 PHASES:
A (A), NOT A (NA), B (B), and NOT B (NB)

PWM+ = RISING PULSE PWM

PWM- = FALLING PULSE PWM

1* TROUBLE, REASO ...
  Topic: PWM 16F690, PIN_C5 issue, 5 wire stepping motor drive
Boyce

Replies: 14
Views: 16737

PostForum: General CCS C Discussion   Posted: Fri Mar 05, 2010 4:57 pm   Subject: PWM 16F690, PIN_C5 issue, 5 wire stepping motor drive
Compiler PCW 4.104 16F690

The code is supposed to generate drive signals for a 5 wire stepping motor and almost works.

The statements:

if(C==1)
{
set_pwm1_duty(q); ...
 
Page 1 of 3 Goto page 1, 2, 3  Next
All times are GMT - 6 Hours
Jump to:  


Powered by phpBB © 2001, 2005 phpBB Group