ATTIny2313-16MI ATMEL Corporation, ATTIny2313-16MI Datasheet - Page 30

no-image

ATTIny2313-16MI

Manufacturer Part Number
ATTIny2313-16MI
Description
8-bit AVR Microcontroller with 2K Bytes In-System Programmable Flash
Manufacturer
ATMEL Corporation
Datasheet
Power Management
and Sleep Modes
MCU Control Register –
MCUCR
30
ATtiny2313/V
Sleep modes enable the application to shut down unused modules in the MCU, thereby
saving power. The AVR provides various sleep modes allowing the user to tailor the
power consumption to the application’s requirements.
To enter any of the three sleep modes, the SE bit in SMCR must be written to logic one
and a SLEEP instruction must be executed. The SM1 and SM0 bits in the MCUCR Reg-
ister select which sleep mode (Idle, Power-down, or Standby) will be activated by the
SLEEP instruction. See Table 13 for a summary. If an enabled interrupt occurs while the
MCU is in a sleep mode, the MCU wakes up. The MCU is then halted for four cycles in
addition to the start-up time, executes the interrupt routine, and resumes execution from
the instruction following SLEEP. The contents of the register file and SRAM are unal-
tered when the device wakes up from sleep. If a reset occurs during sleep mode, the
MCU wakes up and executes from the Reset Vector.
Figure 11 on page 22 presents the different clock systems in the ATtiny2313, and their
distribution. The figure is helpful in selecting an appropriate sleep mode.
The Sleep Mode Control Register contains control bits for power management.
• Bits 6, 4 – SM1..0: Sleep Mode Select Bits 1 and 0
These bits select between the five available sleep modes as shown in Table 13.
Table 13. Sleep Mode Select
Note:
• Bit 5 – SE: Sleep Enable
The SE bit must be written to logic one to make the MCU enter the sleep mode when the
SLEEP instruction is executed. To avoid the MCU entering the sleep mode unless it is
the programmer’s purpose, it is recommended to write the Sleep Enable (SE) bit to one
just before the execution of the SLEEP instruction and to clear it immediately after wak-
ing up.
Bit
Read/Write
Initial Value
SM1
0
0
1
1
1. Standby mode is only recommended for use with external crystals or resonators.
PUD
R
7
0
SM0
0
1
1
0
SM1
R/W
6
0
Sleep Mode
Idle
Power-down
Power-down
Standby
R/W
SE
5
0
SM0
R/W
4
0
ISC11
R/W
3
0
ISC10
R/W
2
0
ISC01
R/W
1
0
ISC00
R/W
0
0
2543C–AVR–12/03
MCUCR

Related parts for ATTIny2313-16MI