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

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
Timer/Counter1 Control
Register A – TCCR1A
50
ATmega161(L)
clock period. The external clock signal is sampled on the rising edge of the internal CPU
clock.
The 16-bit Timer/Counter1 features both a high-resolution and a high-accuracy usage
with the lower prescaling opportunities. Similarly, the high-prescaling opportunities
make the Timer/Counter1 useful for lower speed functions or exact timing functions with
infrequent actions.
The Timer/Counter1 supports two Output Compare functions using the Output Compare
Register 1 A and B (OCR1A and OCR1B) as the data sources to be compared to the
Timer/Counter1 contents. The Output Compare functions include optional clearing of
the counter on compareA match and actions on the Output Compare pins on both com-
pare matches.
Timer/Counter1 can also be used as an 8-, 9-, or 10-bit Pulse Width Modulator. In this
mode the counter and the OCR1A/OCR1B Registers serve as a dual glitch-free stand-
alone PWM with centered pulses. Alternatively, the Timer/Counter1 can be configured
to operate at twice the speed in PWM mode, but without centered pulses. Refer to page
55 for a detailed description of this function.
The Input Capture function of Timer/Counter1 provides a capture of the Timer/Counter1
contents to the Input Capture Register (ICR1), triggered by an external event on the
Input Capture Pin (ICP). The actual capture event settings are defined by the
Timer/Counter1 Control Register (TCCR1B). In addition, the Analog Comparator can be
set to trigger the Input Capture. Refer to the section, “The Analog Comparator”, for
details on this. The ICP pin logic is shown in Figure 36.
Figure 36. ICP Pin Schematic Diagram
If the noise canceler function is enabled, the actual trigger condition for the Capture
Event is monitored over four samples, and all four must be equal to activate the Capture
Flag.
• Bits 7, 6
The COM1A1 and COM1A0 control bits determine any output pin action following a
compare match in Timer/Counter1. Any output pin actions affect pin OC1A (Output
CompareA pin 1). This is an alternative function to an I/O port, and the corresponding
direction control bit must be set (one) to control an output pin. The control configuration
is shown in Table 14.
Bit
$2F ($4F)
Read/Write
Initial Value
COM1A1, COM1A0: Compare Output Mode1A, Bits 1 and 0
COM1A1
R/W
7
0
COM1A0
R/W
6
0
COM1B1
R/W
5
0
COM1B0
R/W
4
0
FOC1A
R/w
3
0
FOC1B
R/W
2
0
PWM11
R/W
1
0
PWM10
R/W
1228D–AVR–02/07
0
0
TCCR1A

Related parts for ATMEGA161-8PI