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

wake from sleep with timer3 overflow intterupt

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



Joined: 02 Oct 2004
Posts: 22
Location: cleveland

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

wake from sleep with timer3 overflow intterupt
PostPosted: Sat Jun 11, 2005 7:06 am     Reply with quote

Hi,
I'm trying to periodically check a value when the timer3 overflows. I want the PIC18 to sleep while waiting. I can't seem to wake up. before executing the sleep instruction I set timer3 to zero and enable the interrupt. it appears the timer stops when sleep() is executed but I don't know for sure. The clock source for timer3 is internal div by 8. i am using a PIC18F252. Any help would be greatly appreciated.

Thanks,
Eaton
Ttelmah
Guest







PostPosted: Sat Jun 11, 2005 9:37 am     Reply with quote

You cannot use an internal clock to wake from sleep. When the processor sleeps, the clocks stop. If you read the processor data sheet, section 19.3, about 'sleep', you will see what can be used to wake the chip. Notice that in relation to timer 3, it says 'Timer 3 must be working as an asynchronous counter'. If you look at the synchronous control bit for timer 3 (section 13), you will see that asynchronous mode is not selectable if the counter source comes from the internal clock. If you look on to the next page (section 13.1), you will see the three possible operating modes listed. Only the last one will work to wake the chip from sleep.

Best Wishes
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