Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
AVR / datasheets / attiny_15L.pdf
Скачиваний:
47
Добавлен:
20.03.2015
Размер:
1.14 Mб
Скачать

ATtiny15L

Power-on Reset

A power-on reset (POR) pulse is generated by an on-chip detection circuit. The detection level is nominally defined in Table 4. The POR is activated whenever VCC is below the detection level. The POR circuit can be used to trigger the startup reset, as well as detect a failure in supply voltage.

A power-on reset (POR) circuit ensures that the device is reset from power-on. Reaching the power-on reset threshold voltage invokes a delay counter, which determines the delay, for which the device is kept in RESET after VCC rise. The timeout period of the delay counter can be defined by the user through the CKSEL fuses. The different selections for the delay period are presented in Table 5. The RESET signal is activated again, without any delay, when the VCC decreases below detection level.

Figure 13. “MCU Start-up, RESET Tied to VCC

VPOT

VCC

 

 

 

 

VRST

 

 

RESET

 

 

 

 

 

 

 

 

TIME-OUT

 

 

tTOUT

 

 

 

 

 

 

 

 

 

 

 

INTERNAL

RESET

Figure 14. MCU Start-up, RESET Extended Externally

VPOT

VCC

VRST

RESET

tTOUT

TIME-OUT

INTERNAL

RESET

15

External Reset

An external reset is generated by a low-level on the RESET pin. Reset pulses longer than 500 ns will generate a reset, even if the clock is not running. Shorter pulses are not guaranteed to generate a reset. When the applied signal reaches the

Reset Threshold Voltage (VRST) on its positive edge, the delay timer starts the MCU after the Time-out period tTOUT has expired.

Figure 15. External Reset during Operation

Brown-out Detection

ATtiny15L has an on-chip brown-out detection (BOD) circuit for monitoring the VCC level during the operation. The BOD circuit can be enabled/disabled by the fuse BODEN. When BODEN is enabled (BODEN programmed), and VCC decreases below the trigger level, the brown-out reset is immediately activated. When VCC increases above the trigger level, the brown-out reset is deactivated after a delay. The delay is defined by the user in the same way as the delay of POR signal, in Table 5. The trigger level for the BOD can be selected by the fuse BODLEVEL to be 2.7V (BODLEVEL unprogrammed), or 4.0V (BODLEVEL programmed). The trigger level has a hysteresis of 50 mV to ensure spike-free brown-out detection.

The BOD circuit will only detect a drop in VCC if the voltage stays below the trigger level for longer than 3 µs for trigger level 4.0V, 7 µs for trigger level 2.7V (typical values).

Figure 16. Brown-out Reset during Operation

VCC

VBOT+

 

VBOT-

RESET

TIME-OUT

tTOUT

INTERNAL

RESET

Note: The hysteresis on VBOT: VBOT+ = VBOT + 25 mV, VBOT- = VBOT - 25 mV.

16

ATtiny15L

 

 

 

ATtiny15L

Watchdog Reset

When the Watchdog times out, it will generate a short reset pulse of 1 CK cycle duration. On the falling edge of this pulse, the delay timer starts counting the Time-out period tTOUT. Refer to page 32 for details on operation of the Watchdog Timer.

Figure 17. Watchdog Reset during Operation

1 CK Cycle

MCU Status Register – MCUSR

The MCU Status Register provides information on which reset source caused an MCU reset.

Bit

7

6

5

4

3

2

1

 

0

 

$34

WDRF

BORF

EXTRF

 

PORF

MCUSR

 

 

 

 

 

 

 

 

 

 

 

Read/Write

R

R

R

R

R/W

R/W

R/W

R/W

 

Initial value

0

0

0

0

 

See bit description

 

 

Bit 7..4 – Res: Reserved Bits

These bits are reserved bits in the ATtiny15L and always read as zero.

Bit 3 – WDRF: Watchdog Reset Flag

This bit is set (one) if a watchdog reset occurs. The bit is reset (zero) by a power-on reset, or by writing a logical “0” to the flag.

Bit 2 – BORF: Brown-out Reset Flag

This bit is set (one) if a brown-out reset occurs. The bit is reset (zero) by a power-on reset, or by writing a logical “0” to the flag.

Bit 1 – EXTRF: External Reset Flag

This bit is set (one) if a external reset occurs. The bit is reset (zero) by a power-on reset, or by writing a logical “0” to the flag.

Bit 0 – PORF: Power-on Reset Flag

This bit is set (one) if a power-on reset occurs. The bit is reset (zero) by writing a logical “0” to the flag.

To make use of the reset flags to identify a reset condition, the user should read and then reset the MCUSR as early as possible in the program. If the register is cleared before another reset occurs, the source of the reset can be found by examining the reset flags.

17

Соседние файлы в папке datasheets