Datasheet

ATmega48/88/168 Automotive [DATASHEET]
7530K–AVR–07/14
38
8. System Control and Reset
8.1 Resetting the AVR
During reset, all I/O registers are set to their initial values, and the program starts execution from the reset vector. For the
ATmega168, the instruction placed at the reset vector must be a JMP – absolute jump – instruction to the reset handling
routine. For the ATmega48 and ATmega88, the instruction placed at the reset vector must be an RJMP – relative jump –
instruction to the reset handling routine. If the program never enables an interrupt source, the interrupt vectors are not used,
and regular program code can be placed at these locations. This is also the case if the reset vector is in the application
section while the interrupt vectors are in the boot section or vice versa (Atmel
®
ATmega88/168 only). The circuit diagram in
Figure 8-1 shows the reset logic. Table 8-1 on page 40 defines the electrical parameters of the reset circuitry.
The I/O ports of the AVR
®
are immediately reset to their initial state when a reset source goes active. This does not require
any clock source to be running.
After all reset sources have gone inactive, a delay counter is invoked, stretching the internal reset. This allows the power to
reach a stable level before normal operation starts. The time-out period of the delay counter is defined by the user through
the SUT and CKSEL fuses. The different selections for the delay period are presented in
Section 6.2 “Clock Sources” on page 24.
8.2 Reset Sources
The Atmel ATmega48/88/168 has four sources of reset:
Power-on reset. The MCU is reset when the supply voltage is below the power-on reset threshold (V
POT
).
External reset. The MCU is reset when a low level is present on the RESET pin for longer than the minimum pulse
length.
Watchdog system reset. The MCU is reset when the watchdog timer period expires and the watchdog system reset
mode is enabled.
Brown-out reset. The MCU is reset when the supply voltage V
CC
is below the brown-out reset threshold (V
BOT
) and the
brown-out detector is enabled.