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 26 matches
CCS Forum Index
Author Message
  Topic: Urgently in need of help!
[terminate]

Replies: 5
Views: 7709

PostForum: General CCS C Discussion   Posted: Sun Feb 12, 2006 11:04 pm   Subject: Urgently in need of help!
thank you so much PCM programmer!

i wish you could be my mentor!

what i initially thought was that ir_value1 was being compared to 4 volts... stupid me... i wasnt thinking 4 in binary
  Topic: Urgently in need of help!
[terminate]

Replies: 5
Views: 7709

PostForum: General CCS C Discussion   Posted: Sun Feb 12, 2006 10:14 pm   Subject: Urgently in need of help!
please dont tell me this is because i'm trying to compare a 8 bit number against a number 4 which is almost true even when its close to 0

and so 4 volts would be like 200 instead of just 4
  Topic: Urgently in need of help!
[terminate]

Replies: 5
Views: 7709

PostForum: General CCS C Discussion   Posted: Sun Feb 12, 2006 9:19 pm   Subject: Urgently in need of help!
hmmm yeah theres an error there,

i've changed it to this:

while (true)
{

forward();
output_low(PIN_B7);
ir_value1=read_adc();
...
  Topic: Urgently in need of help!
[terminate]

Replies: 5
Views: 7709

PostForum: General CCS C Discussion   Posted: Sun Feb 12, 2006 8:47 pm   Subject: Urgently in need of help!
I'm having trouble with the ADC.. I've read all the previous posts about it and tried their solutions but I can't get it to work..

Heres my code:


#include <18F452.h>
#device ADC=8;
#fu ...
  Topic: Using both CCP modules
[terminate]

Replies: 2
Views: 5355

PostForum: General CCS C Discussion   Posted: Wed Jan 25, 2006 11:19 am   Subject: Using both CCP modules
I'm trying to use both CCP1 and CCP2

Do they use the same timer (timer2)? I have tried to set it up, but it keeps freezing on start up. I'm using a PIC18F452
  Topic: How to declare interrupt bits in CCS? (in general)
[terminate]

Replies: 1
Views: 4706

PostForum: General CCS C Discussion   Posted: Wed Jan 25, 2006 4:14 am   Subject: How to declare interrupt bits in CCS? (in general)
How to declare interrupt bits in CCS? (in general)

like for the TMR2IF (timer 2 interrupt flag) it is:

#bit TMR2IF=0xF9E.1

what does that actually mean?

On the PIC18F452 datasheet, it says ...
  Topic: PWM 18F452 question
[terminate]

Replies: 18
Views: 21350

PostForum: General CCS C Discussion   Posted: Tue Jan 17, 2006 1:16 am   Subject: PWM 18F452 question
any idea what's wrong?
  Topic: PWM 18F452 question
[terminate]

Replies: 18
Views: 21350

PostForum: General CCS C Discussion   Posted: Tue Jan 17, 2006 12:14 am   Subject: PWM 18F452 question
this is SO strange.

Now it's not working?

Does anyone know? Desperately seeking an answer

(the problem is that the motor isn't running continuously)
  Topic: PWM 18F452 question
[terminate]

Replies: 18
Views: 21350

PostForum: General CCS C Discussion   Posted: Mon Jan 16, 2006 6:31 pm   Subject: PWM 18F452 question
and so i figured out the problem (after 2 weeks of gutwrentching testing). It was the code!

it should've been while(TMR2IF=0); rather than ==

:(
  Topic: PWM 18F452 question
[terminate]

Replies: 18
Views: 21350

PostForum: General CCS C Discussion   Posted: Sun Jan 15, 2006 6:33 pm   Subject: PWM 18F452 question

#bit TMR2IF=0xF9E.1

TMR2IF=0;
while (TRUE) {
while (TMR2IF==0) ;
TMR2IF==0;
set_pwm1_duty(120);
}



Just wondering, should that be TMR2IF=0; ...
  Topic: PWM 18F452 question
[terminate]

Replies: 18
Views: 21350

PostForum: General CCS C Discussion   Posted: Thu Jan 12, 2006 9:57 am   Subject: PWM 18F452 question
hey! thanks for the tips. I'll try them out.

My goal for the interrupt is to satisfy this:

When the motor is running, a sensor senses a pylon, and then the sensor interrupt will switch the moto ...
  Topic: PWM 18F452 question
[terminate]

Replies: 18
Views: 21350

PostForum: General CCS C Discussion   Posted: Wed Jan 11, 2006 7:01 pm   Subject: PWM 18F452 question
I hope this is not asking too much, but how would you implement an interrupt to your above code?

Thank you so mucH!!!
  Topic: PWM 18F452 question
[terminate]

Replies: 18
Views: 21350

PostForum: General CCS C Discussion   Posted: Tue Jan 10, 2006 7:50 pm   Subject: PWM 18F452 question
I'm using a TIP31 NPN transistor
I'll try a mosfet
  Topic: PWM 18F452 question
[terminate]

Replies: 18
Views: 21350

PostForum: General CCS C Discussion   Posted: Tue Jan 10, 2006 10:26 am   Subject: PWM 18F452 question
I changed that little bit and it still does the same thing, but then i hooked an LED onto that pin and it's constantly on, so the problem (i think) is the transistor im using to switch the motor on an ...
  Topic: PWM 18F452 question
[terminate]

Replies: 18
Views: 21350

PostForum: General CCS C Discussion   Posted: Tue Jan 10, 2006 10:01 am   Subject: PWM 18F452 question
thank you very much! your help is very much appreciated!
 
Page 1 of 2 Goto page 1, 2  Next
All times are GMT - 6 Hours
Jump to:  


Powered by phpBB © 2001, 2005 phpBB Group