55
7734Q–AVR–02/12
AT90PWM81/161
Bit 2 – BORF: Brown-out Reset Flag
This bit is set if a Brown-out Reset occurs. The bit is reset by a Power-on Reset, or by writing a
logic zero to the flag.
Bit 1 – EXTRF: External Reset Flag
This bit is set if an External Reset occurs. The bit is reset by a Power-on Reset, or by writing a
logic zero to the flag.
Bit 0 – PORF: Power-on Reset Flag
This bit is set if a Power-on Reset occurs. The bit is reset only by writing a logic zero 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.
7.2.2
MCUCR - MCU Control Register
Bit 3– RSTDIS: Reset Pin Disable
Thanks to RSTDIS in MCUCR Sfr, the reset function can be disabled, leaving this pin for func-
tional purpose.
– When the RSTDIS bit is written to zero, the reset signal is active.
– When the RSTDIS bit is written to one, the reset signal is inactive.
7.3
Internal Voltage Reference
AT90PWM81/161 features an internal bandgap reference. This bandgap reference is used for
Brown-out Detection and can be used as analog input for the analog comparators or the ADC.
The internal voltage reference for the DAC and/or the ADC and the comparators is derived from
The V
REF voltage is configured thanks to the REFS1 and REFS0 bits in the ADMUX register; see
7.3.1
Bandgap and Internal Voltage Reference Enable Signals and Start-up Time
The bandgap and the internal voltage reference characteristics is given on
Table 7-4 on page56. To save power, the reference is not always turned on. The bandgap and the internal refer-
ence is on during the following situations:
1.
When the BOD is enabled (by programming the BODLEVEL [2..0] Fuse).
2.
When the internal reference is selected (REFS1 = 1).
3.
When the bandgap reference is connected to the Analog Comparator.
4.
When the ADC is enabled.
Thus, when the BOD is not enabled, after enabling the ADC, comparator or the internal refer-
ence, the user must always allow the reference to start up before the output from the Analog
Comparator or ADC or DAC is used. To reduce power consumption in Power-down mode, the
Bit
7654
3210
–
PUD
RSTDIS
CKRC81
IVSEL
IVCE
MCUCR
Read/Write
RRRR/W
R/W
Initial Value
0000