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

delay_cycles crashes my code!

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
Guest








delay_cycles crashes my code!
PostPosted: Fri Jan 27, 2006 4:22 pm     Reply with quote

I am working on a PIC18F2410 and the following odd action happens in my code. The code will reset the processor on the delay_cycles function. I have tried moving the code, walking through with the ICD-U40, and changing the surrounding code.

Code:
void CodeCrasher()
{
  LED_OFF;
  LED_ON;

  output_high(PIN_B1);
  delay_cycles ( 20);
  output_low(PIN_B1);

  LED_OFF;
}


When I step through the code I get the following error:
"Invalid Clock Value from the debugger. Debugging may not have been enabled."

Any help would be greatly appreciated.
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Fri Jan 27, 2006 4:34 pm     Reply with quote

Is this entirely a debugger issue ? Does it still crash when the code
is programmed into the PIC so that the program runs in Stand-alone
mode ?
Guest








Error may not be code
PostPosted: Fri Jan 27, 2006 4:48 pm     Reply with quote

The crash happens all of the time. However the EE now says that it may be a trace problem with the board. We are going to try a different board. Wish he would have told me that before I posted for help. Thank you for all of the effort. I appreciate it.
Humberto



Joined: 08 Sep 2003
Posts: 1215
Location: Buenos Aires, La Reina del Plata

View user's profile Send private message

PostPosted: Sun Jan 29, 2006 7:22 am     Reply with quote

1) LED_OFF; // is th¡s to be sure that it should be OFF ?
LED_ON;

2) Do you have INT_EXT1 enabled for any reason ?
If so, did you coded the handler ?

Humberto
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group