|
|
View previous topic :: View next topic |
Author |
Message |
eaton
Joined: 02 Oct 2004 Posts: 22 Location: cleveland
|
wake from sleep with timer3 overflow intterupt |
Posted: Sat Jun 11, 2005 7:06 am |
|
|
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
|
|
Posted: Sat Jun 11, 2005 9:37 am |
|
|
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 |
|
|
|
|
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
|