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

Sleep mode on a 18F87J11

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



Joined: 15 Apr 2013
Posts: 3
Location: Penn Yan, NY

View user's profile Send private message

Sleep mode on a 18F87J11
PostPosted: Tue Jul 23, 2013 9:43 am     Reply with quote

I would like to extend battery life by sleeping or idling the processor.
I have a 100 ms interrupt routine based on timer1 and an SPI interrupt that comes alive when a packet is received from my SiLabs transceiver tied to pin B0.
Code:

// define for high to low transitions
ext_int_edge(0,H_TO_L);
enable_interrupts(int_ext); // enable Pin B0 for si4455 interrupts

What is the best way to set up the sleep mode? Will the interrupt overflow from the timer1 interrupt routine wake me up and if so would get_timer1 return the utilized ticks to get awake again? If an SPI interrupt would have occurred between the 100ms slices, will I miss that if I am sleeping?

Thanks

Mike O'Brien
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