28X2 short low-power sleep?

nekomatic

Member
I want a 28X2 to pause or sleep for around 20 ms, during which time I want the outputs to maintain their state and hardware serial receive to continue working. What's the lowest-power way of achieving this?

The manual entry for doze says:

‘doze 0’ puts the microcontroller into permanent doze- it does not wake every 2.1 seconds. The microcontroller is only woken by a hardware interrupt (e.g. hint pin change or timer tick) or hard-reset.
(my bold) - but the manual entries for settimer and setintflags imply that the interrupt takes place on a timer overflow. A timer major tick can be configured to happen at the required frequency (yay!) but if my maths is correct then a timer overflow happens at most every 2.1 s at 8 MHz (boo).

Which is correct, or is there another option I haven't thought of?
 

hippy

Technical Support
Staff member
Probably the best way to see how DOZE behaves with a timer is to try it; which is what we would probably have to do to give you a definitive answer if we can't off-hand recall the answer; and I can't.

I would expect that it's an internal minor tick overflow which generates an internal PICmicro interrupt which wakes the hardware up from sleeping (DOZE) but I might be wrong.
 
Top