Sleep Modes; Timer/Counters; Timer/Counter Prescaler - Atmel AT90S4433-8AC Manual

8-bit microcontroller with 2k bytes of in-system programmable flash
Table of Contents

Advertisement

Sleep Modes

Idle Mode
Power-down Mode

Timer/Counters

Timer/Counter Prescaler

0839I–AVR–06/02
To enter the sleep modes, the SE bit in MCUCR must be set (one) and a SLEEP instruc-
tion must be executed. If an enabled interrupt occurs while the MCU is in a sleep mode,
the MCU awakes, executes the interrupt routine, and resumes execution from the
instruction following SLEEP. The contents of the Register File, SRAM and I/O memory
are unaltered. If a Reset occurs during sleep mode, the MCU wakes up and executes
from the Reset Vector.
When the SM bit is cleared (zero), the SLEEP instruction forces the MCU into the Idle
mode, stopping the CPU but allowing Timer/Counters, Watchdog and the interrupt sys-
tem to continue operating. This enables the MCU to wake up from external triggered
interrupts as well as internal ones like Timer Overflow interrupt and Watchdog Reset. If
wake-up from the Analog Comparator Interrupt is not required, the Analog Comparator
can be powered down by setting the ACD-bit in the Analog Comparator Control and Sta-
tus Register (ACSR). This will reduce power consumption in Idle mode. When the MCU
wakes up from Idle mode, the CPU starts program execution immediately.
When the SM bit is set (one), the SLEEP instruction forces the MCU into the Power-
down mode. In this mode, the external Oscillator is stopped while the external interrupts
and the Watchdog (if enabled) continue operating. Only an External Reset, a Watchdog
Reset (if enabled), an external level interrupt on INT0 or INT1 can wake up the MCU.
Note that when a level-triggered interrupt is used for wake-up from Power-down, the low
level must be held for a time longer than the reset delay Time-out period t
wise, the device will not wake up.
The AT90S2313 provides two general purpose Timer/Counters – one 8-bit T/C and one
16-bit T/C. The Timer/Counters have individual prescaling selection from the same 10-
bit prescaling timer. Both Timer/Counters can either be used as a timer with an internal
clock time base or as a counter with an external pin connection that triggers the
counting.
Figure 28 shows the general Timer/Counter prescaler.
Figure 28. Timer/Counter Prescaler
TCK1
AT90S2313
. Other-
TOUT
TCK0
27

Advertisement

Table of Contents
loading

Table of Contents