Period - is a variable/constant which determines the duration of the reduced-power nap (normally 0-7 but M2 parts also support 0-14).
||64s (1 min)
||128s (2 mins)
||256s (4 mins)
Nap for a short period. Power consumption is reduced, but some timing accuracy is lost. A longer delay is possible with the sleep command.
The nap command puts the microcontroller into low power mode for a short period of time. When in low power mode all timers are switched off and so the pwmout and servo commands will cease to function (see the doze command). The nominal approximate period of time is given by this table. Due to tolerances in the microcontrollers internal timers, this time is subject to -50 to +100% tolerance. The external temperature affects these tolerances and so no design that requires an accurate time base should use this command. A hard-reset will always be required during very long naps.
Effect of increased clock speed:
The nap command uses the internal watchdog timer which is not affected by changes in resonator clock speed.
Effect of decreased clock speed:
At 31kHz operation (setfreq k31) a 'nap 1' can cause a reset of the microcontroller. When using 31kHz operation please specify 'nap 0' or use a minimum of 'nap 2'.