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 7 matches
CCS Forum Index
Author Message
  Topic: IF statement executes even when condition is not met
jcobreros

Replies: 14
Views: 10486

PostForum: General CCS C Discussion   Posted: Fri Jun 26, 2009 1:32 pm   Subject: IF statement executes even when condition is not met
@PCM programmer: hey thanks for taking the time. I guess this narrows it to my hardware. I'll try it on another PIC when I get home and if the result is the same I will just add a redundant variable s ...
  Topic: IF statement executes even when condition is not met
jcobreros

Replies: 14
Views: 10486

PostForum: General CCS C Discussion   Posted: Fri Jun 26, 2009 12:38 pm   Subject: IF statement executes even when condition is not met
@ttelmah: I have unplugged the servos and the result is the same. I still have to try with a different power source (battery pack?) and in a different PIC. Noise seems like a reasonable cause.
I will ...
  Topic: IF statement executes even when condition is not met
jcobreros

Replies: 14
Views: 10486

PostForum: General CCS C Discussion   Posted: Thu Jun 25, 2009 3:13 pm   Subject: IF statement executes even when condition is not met
@FvM: I had already tried something similar (the redundancy variable "key"), but the result was the same.
Now I did it exactly your way (assigning the value right before the evaluation) and ...
  Topic: IF statement executes even when condition is not met
jcobreros

Replies: 14
Views: 10486

PostForum: General CCS C Discussion   Posted: Thu Jun 25, 2009 3:00 pm   Subject: IF statement executes even when condition is not met
@PCM programmer: I didnt know I had to add an oscillator fuse, all the programs I've done run on my board (SkyPIC with a PIC16F876A).
All I can tell you is that the program compiles on MPLAB with CCS ...
  Topic: IF statement executes even when condition is not met
jcobreros

Replies: 14
Views: 10486

PostForum: General CCS C Discussion   Posted: Thu Jun 25, 2009 2:24 pm   Subject: IF statement executes even when condition is not met
@FvM: im afraid I dont know how to do that. I see how an interrupt can happen between the IF and the PRINTF, but I assumed its value wouldn't change as the variable is not used by anything else. How d ...
  Topic: IF statement executes even when condition is not met
jcobreros

Replies: 14
Views: 10486

PostForum: General CCS C Discussion   Posted: Thu Jun 25, 2009 2:13 pm   Subject: IF statement executes even when condition is not met
Sorry, let me post the complete code (its not much longer, but I was trying to go to the point).


#include <16f876a.h>
#include <math.h>

#fuses NOWDT,NOPROTECT,NOLVP,PUT,BROWNOUT
...
  Topic: IF statement executes even when condition is not met
jcobreros

Replies: 14
Views: 10486

PostForum: General CCS C Discussion   Posted: Thu Jun 25, 2009 12:27 pm   Subject: IF statement executes even when condition is not met
Good evening, I'm having this weird problem with CCS 4.088 in a PIC16F876A.
I have an interrupt that executes when some character is received from the serial port. This interrupt writes the ASCII val ...
 
Page 1 of 1
All times are GMT - 6 Hours
Jump to:  


Powered by phpBB © 2001, 2005 phpBB Group