CPU Sleep mode

Discussion specific to the 24-pin ZX microcontrollers, e.g. ZX-24r, ZX-24s and ZX-24t.
Post Reply
bdellabe
Posts: 1
Joined: 26 June 2007, 8:36 AM

CPU Sleep mode

Post by bdellabe »

I have a ZX-24a microcontroller that I want to have sleep with as little power usage as possible while maintaining its Real Time Clock. I want it to wake up every ten minutes, perform its tasks which require the current time, then go back to sleep. Is there any way I can use the CPUSleep() function, have it wake up after a set amount of time and still have the RTC registers of the microcontroller maintain the correct time?

Thanks
dkinzer
Site Admin
Posts: 3120
Joined: 03 September 2005, 13:53 PM
Location: Portland, OR

Post by dkinzer »

The ZBasic RTC is implemented in software, i.e. it is maintained by responding to a timer interrupt that occurs at a 1024KHz rate. Using a sleep mode that does not allow the CPU to wake up in response to timer interrupts will result in the RTC not being updated correctly.

If you need long sleep times and an accurate RTC, you'll have to use an external RTC.
- Don Kinzer
Post Reply