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 support@ccsinfo.com

unwanted sleep in hex file

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



Joined: 02 Dec 2003
Posts: 15

View user's profile Send private message

unwanted sleep in hex file
PostPosted: Wed Jan 21, 2004 8:47 am     Reply with quote

I have a 18F452, I wrote a simple program, compiled OK,
When I look at the assembly code,
the LAST line is a SLEEP command.
I did not put any SLEEP in my C code, why the CCS compiler adds SLEEP?
How do I fix this so my clock always runs?
Mark



Joined: 07 Sep 2003
Posts: 2838
Location: Atlanta, GA

View user's profile Send private message Send e-mail

PostPosted: Wed Jan 21, 2004 9:24 am     Reply with quote

You should have a while(1) loop in your main. The sleep is put there by the compiler and you can't move it. You should never hit this command unless you forget the while(1) loop.
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