ATMEGA161-8PI Atmel, ATMEGA161-8PI Datasheet - Page 47

IC AVR MCU 16K 8MHZ IND 40-DIP

ATMEGA161-8PI

Manufacturer Part Number
ATMEGA161-8PI
Description
IC AVR MCU 16K 8MHZ IND 40-DIP
Manufacturer
Atmel
Series
AVR® ATmegar
Datasheet

Specifications of ATMEGA161-8PI

Core Processor
AVR
Core Size
8-Bit
Speed
8MHz
Connectivity
SPI, UART/USART
Peripherals
POR, PWM, WDT
Number Of I /o
35
Program Memory Size
16KB (8K x 16)
Program Memory Type
FLASH
Eeprom Size
512 x 8
Ram Size
1K x 8
Voltage - Supply (vcc/vdd)
4 V ~ 5.5 V
Oscillator Type
External
Operating Temperature
-40°C ~ 85°C
Package / Case
40-DIP (0.600", 15.24mm)
Lead Free Status / RoHS Status
Contains lead / RoHS non-compliant
Data Converters
-
Other names
ATMEGA1618PI
Asynchronous Status
Register – ASSR
1228D–AVR–02/07
In up/down PWM mode, the Timer Overflow Flag (TOV0 or TOV2) is set when the
counter advances from $00. In overflow PWM mode, the Timer Overflow Flag is set as
in normal Timer/Counter mode. Timer Overflow Interrupt0 and 2 operate exactly as in
normal Timer/Counter mode, i.e., they are executed when TOV0 or TOV2 are set, pro-
vided that Timer Overflow Interrupt and global interrupts are enabled. This also applies
to the Timer Output Compare flag and interrupt.
• Bits 7..4
These bits are reserved bits in the ATmega161 and always read as zero.
• Bit 3
When this bit is cleared (zero), Timer/Counter2 is clocked from the internal system
clock, CK. If AS2 is set, the Timer/Counter2 is clocked from the TOSC1 pin. Pins PD4
and PD5 become connected to a crystal Oscillator and cannot be used as general I/O
pins. When the value of this bit is changed, the contents of TCNT2, OCR2 and TCCR2
might get corrupted.
• Bit 2
When Timer/Counter2 operates asynchronously and TCNT2 is written, this bit becomes
set (one). When TCNT2 has been updated from the temporary storage register, this bit
is cleared (zero) by hardware. A logical “0” in this bit indicates that TCNT2 is ready to be
updated with a new value.
• Bit 1
When Timer/Counter2 operates asynchronously and OCR2 is written, this bit becomes
set (one). When OCR2 has been updated from the temporary storage register, this bit is
cleared (zero) by hardware. A logical “0” in this bit indicates that OCR2 is ready to be
updated with a new value.
• Bit 0
When Timer/Counter2 operates asynchronously and TCCR2 is written, this bit becomes
set (one). When TCCR2 has been updated from the temporary storage register, this bit
is cleared (zero) by hardware. A logical “0” in this bit indicates that TCCR2 is ready to be
updated with a new value.
If a write is performed to any of the three Timer/Counter2 Registers while its update
Busy Flag is set (one), the updated value might get corrupted and cause an uninten-
tional interrupt to occur.
The mechanisms for reading TCNT2, OCR2 and TCCR2 are different. When reading
TCNT2, the actual timer value is read. When reading OCR2 or TCCR2, the value in the
temporary storage register is read.
Bit
$26 ($46)
Read/Write
Initial Value
AS2: Asynchronous Timer/Counter2 Mode
TCN2UB: Timer/Counter2 Update Busy
OCR2UB: Output Compare Register2 Update Busy
TCR2UB: Timer/Counter Control Register2 Update Busy
Res: Reserved Bits
R
7
0
R
6
0
R
5
0
R
4
0
AS2
R/W
3
0
TCN2UB
R
2
0
ATmega161(L)
OCR2UB
R
1
0
TCR2UB
0
R
0
ASSR
47

Related parts for ATMEGA161-8PI