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

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
External Interrupts
MCU Control Register –
MCUCR
34
ATmega161(L)
Compare match InterruptA Enable) and the OCF2 are set (one), the Timer/Counter2
Compare match Interrupt is executed.
• Bit 1
The bit TOV0 is set (one) when an overflow occurs in Timer/Counter0. TOV0 is cleared
by hardware when executing the corresponding Interrupt Handling Vector. Alternatively,
TOV0 is cleared by writing a logical “1” to the Flag. When the SREG I-bit and TOIE0
(Tim er/Co un ter0 Ove rflow Inte rrup t En able) an d TO V0 a re set (o ne) , th e
Timer/Counter0 Overflow interrupt is executed.
• Bit 2
The OCF0 bit is set (one) when compare match occurs between the Timer/Counter0
and the data in OCR0 (Output Compare Register 0). OCF0 is cleared by hardware when
executing the corresponding Interrupt Handling Vector. Alternatively, OCF0 is cleared
by writing a logical “1” to the Flag. When the I-bit in SREG and OCIE0 (Timer/Counter0
Compare match InterruptA Enable) and the OCF0 are set (one), the Timer/Counter0
Compare match Interrupt is executed.
The external interrupts are triggered by the INT0, INT1, and INT2 pins. Observe that, if
enabled, the interrupts will trigger even if the INT0/INT1/INT2 pins are configured as out-
puts. This feature provides a way of generating a software interrupt. The external
interrupts can be triggered by a falling or rising edge or a low level (INT2 is only an edge
triggered interrupt). This is set up as indicated in the specification for the MCU Control
Register – MCUCR (INT0/INT1) and EMCUCR (INT2). When the external interrupt is
enabled and is configured as level triggered (only INT0/INT1), the interrupt will trigger as
long as the pin is held low.
The MCU Control Register contains control bits for general MCU functions.
• Bit 7
When the SRE bit is set (one), the external Data memory interface is enabled and the
pin functions AD0 - 7 (Port A), A8 - 5 (Port C), ALE (Port E), WR, and RD (Port D) are
activated as the alternate pin functions. The SRE bit overrides any pin direction settings
in the respective Data Direction Registers. See Figure 50 through Figure 53 for a
description of the external memory pin functions. When the SRE bit is cleared (zero),
the external Data memory interface is disabled and the normal pin and data direction
settings are used.
• Bit 6
The SRW10 bit is used to set up extra wait states in the external memory interface. See
“Double-speed Transmission” on page 78 for a detailed description.
• Bit 5
The SE bit must be set (one) to make the MCU enter the Sleep mode when the SLEEP
instruction is executed. To avoid the MCU entering the Sleep mode unless it is the pro-
Bit
$35 ($55)
Read/Write
Initial Value
TOV0: Timer/Counter0 Overflow Flag
OCF0: Output Compare Flag 0
SRE: External SRAM Enable
SRW10: External SRAM Wait State
SE: Sleep Enable
SRE
R/W
7
0
SRW10
R/W
6
0
R/W
SE
5
0
SM1
R/W
4
0
ISC11
R/W
3
0
ISC10
R/W
2
0
ISC01
R/W
1
0
ISC00
R/W
1228D–AVR–02/07
0
0
MCUCR

Related parts for ATMEGA161-8PI