Datasheet

43
ATtiny828 [DATASHEET]
8371A–AVR–08/12
Table 12. Setting BOD Mode of Operation in Sleep Modes Other Than Idle
See “Fuse Bits” on page 226.
8.3 Internal Voltage Reference
ATtiny828 features an internal bandgap reference. This reference is used for Brown-out Detection, and it can be used as
an input to the Analog Comparator or the ADC. The bandgap voltage varies with supply voltage and temperature.
8.3.1 Voltage Reference Enable Signals and Start-up Time
The voltage reference has a start-up time that may influence the way it should be used. The start-up time is given in
“System and Reset Characteristics” on page 250. To save power, the reference is not always turned on. The reference is
on during the following situations:
z When the BOD is enabled.
z When the internal reference is connected to the Analog Comparator.
z When the ADC is enabled.
Thus, when the BOD is not enabled, after setting the ACBG bit or enabling the ADC, the user must always allow the
reference to start up before the output from the Analog Comparator or ADC is used. To reduce power consumption in
Power-down mode, the user can avoid the three conditions above to ensure that the reference is turned off before
entering Power-down mode.
8.4 Watchdog Timer
The Watchdog Timer is clocked from the internal 32kHz ultra low power oscillator (see page 29). By controlling the
Watchdog Timer prescaler, the Watchdog Reset interval can be adjusted as shown in Table 15 on page 47. The WDR –
Watchdog Reset – instruction resets the Watchdog Timer. The Watchdog Timer is also reset when it is disabled and
when a Chip Reset occurs. Ten different clock cycle periods can be selected to determine the reset period. If the reset
period expires without another Watchdog Reset, the ATtiny828 resets and executes from the Reset Vector.
The Wathdog Timer can also be configured to generate an interrupt instead of a reset. This can be very helpful when
using the Watchdog to wake-up from Power-down.
To prevent unintentional disabling of the Watchdog or unintentional change of time-out period, two different safety levels
are selected by the fuse WDTON as shown in Table 13 See “Timed Sequences for Changing the Configuration of the
Watchdog Timer” on page 44 for details.
Table 13. WDT Configuration as a Function of the Fuse Settings of WDTON
BODPD1 BODPD0 Mode of Operation
0 0 Reserved
0 1 Sampled
1 0 Enabled
1 1 Disabled
WDTON
Safety
Level
WDT Initial State How to Disable the WDT How to Change Time-out
Unprogrammed 1 Disabled Timed sequence No limitations
Programmed 2 Enabled Always enabled Timed sequence