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

Option register to put a pic12c508/9 to sleep

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








Option register to put a pic12c508/9 to sleep
PostPosted: Wed Nov 09, 2005 6:30 pm     Reply with quote

Okay, for some reason I can't find how to set the option register to enable wake up from pin change. I try:

/* code sample */
OPTION = 0x40
sleep();
/* end of code sample */

like other people's code and this doesn't work. The compiler complains about the 'OPTION' line with an 'Undefined identifier OPTION'. My compiler version is 3.18/IDE 3.4. That shouldn't have anything to do with this.

All I want to do is put the processor to sleep and wait for something to happen on the input pins. All my other code is pretty solid but this is life & death of the project. It can't be this hard. Do I have to do this in an inline assembly call?

Thanks!
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Wed Nov 09, 2005 6:38 pm     Reply with quote

See this thread regarding the CCS set_options() macro:
http://www.ccsinfo.com/forum/viewtopic.php?t=23899&highlight=setoptions
Guest








Thanks!
PostPosted: Thu Nov 10, 2005 10:28 am     Reply with quote

Okay, that was embarassingly simple. Thank you very much for pointing out the thread. Sometimes, one shouldn't look so deep.
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