ATMEGA161-8PI Atmel, ATMEGA161-8PI Datasheet - Page 42
![IC AVR MCU 16K 8MHZ IND 40-DIP](/photos/6/70/67049/453-40-dip_sml.jpg)
ATMEGA161-8PI
Manufacturer Part Number
ATMEGA161-8PI
Description
IC AVR MCU 16K 8MHZ IND 40-DIP
Manufacturer
Atmel
Series
AVR® ATmegar
Datasheet
1.ATMEGA161-8AC.pdf
(159 pages)
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
- Current page: 42 of 159
- Download datasheet (2Mb)
Timer/Counter0 Control
Register – TCCR0
Timer/Counter2 Control
Register – TCCR2
42
ATmega161(L)
• Bit 7
Writing a logical “1” to this bit forces a change in the compare match output pin PB0
(Timer/Counter0) and PB1 (Timer/Counter2) according to the values already set in
COMn1 and COMn0. If the COMn1 and COMn0 bits are written in the same cycle as
FOC0/FOC2, the new settings will not take effect until the next compare match or
Forced Output Compare Match occurs. The Force Output Compare bit can be used to
change the output pin without waiting for a compare match in the timer. The automatic
action programmed in COMn1 and COMn0 happens as if a Compare Match had
occurred, but no interrupt is generated and the Timer/Counters will not be cleared even
if CTC0/CTC2 is set. The FOC0/FOC2 bits will always be read as zero. The setting of
the FOC0/FOC2 bits has no effect in PWM mode.
• Bit 6
When set (one), this bit enables PWM mode for Timer/Counter0 or Timer/Counter2.
This mode is described on page 44.
• Bits 5, 4
The COMn1 and COMn0 control bits determine any output pin action following a com-
pare match in Timer/Counter0 or Timer/Counter2. Output pin actions affect pins
PB0(OC0) or PB1(OC2). This is an alternative function to an I/O port and the corre-
sponding direction control bit must be set (one) to control an output pin. The control
configuration is shown in Table 9.
Table 9. Compare Mode Select
Notes:
• Bit 3
When the CTC0 or CTC2 control bit is set (one), Timer/Counter0 or Timer/Counter2 is
reset to $00 in the CPU clock cycle after a compare match. If the control bit is cleared,
the Timer/Counter continues counting and is unaffected by a compare match. When a
Bit
$33 ($53)
Read/Write
Initial Value
Bit
$27 ($47)
Read/Write
Initial Value
COMn1
0
0
1
1
–
–
–
1. In PWM mode, these bits have a different function. Refer to Table 12 for a detailed
2. n = 0 or 2
FOC0/FOC2: Force Output Compare
PWM0/PWM2: Pulse Width Modulator Enable
CTC0/CTC2: Clear Timer/Counter on Compare Match
description.
–
COM01, COM00/COM21, COM20: Compare Output Mode, Bits 1 and 0
FOC0
FOC2
R/W
R/W
7
0
7
0
COMn0
0
1
0
1
PWM0
PWM2
R/W
R/W
6
0
6
0
Description
Timer/Counter disconnected from output pin OCn.
Toggle the OCn output line.
Clear the OCn output line (to zero).
Set the OCn output line (to one).
COM01
COM21
R/W
R/W
(1)(2)
5
0
5
0
COM00
COM20
R/W
R/W
4
0
4
0
CTC0
CTC2
R/W
R/W
3
0
3
0
CS22
CS02
R/W
R/W
2
0
2
0
CS21
R/W
CS01
R/W
1
0
1
0
CS20
CS00
R/W
R/W
1228D–AVR–02/07
0
0
0
0
TCCR0
TCCR2
Related parts for ATMEGA161-8PI
Image
Part Number
Description
Manufacturer
Datasheet
Request
R
![ATmega16](/images/manufacturer_photos/0/0/79/atmel_corporation_tmb.jpg)
Part Number:
Description:
Manufacturer:
Atmel Corporation
Datasheet:
![ATMEGA16-16AU](/photos/6/70/67042/313-44-tqfp_tmb.jpg)
Part Number:
Description:
IC AVR MCU 16K 16MHZ 5V 44TQFP
Manufacturer:
Atmel
Datasheet:
![ATMEGA16-16MU](/photos/12/13/121316/313-44-qfn_tmb.jpg)
Part Number:
Description:
IC AVR MCU 16K 16MHZ 5V 44-QFN
Manufacturer:
Atmel
Datasheet:
![ATMEGA16-16PU](/photos/6/70/67049/453-40-dip_tmb.jpg)
Part Number:
Description:
IC AVR MCU 16K 16MHZ 5V 40DIP
Manufacturer:
Atmel
Datasheet:
![ATMEGA16-16MQ](/photos/12/13/121316/313-44-qfn_tmb.jpg)
Part Number:
Description:
MCU AVR 16K FLASH 16MHZ 44-QFN
Manufacturer:
Atmel
Datasheet:
![ATMEGA16-16PC](/photos/6/70/67049/453-40-dip_tmb.jpg)
Part Number:
Description:
IC AVR MCU 16K 16MHZ COM 40-DIP
Manufacturer:
Atmel
Datasheet:
![ATMEGA16-16MC](/photos/12/13/121316/313-44-qfn_tmb.jpg)
Part Number:
Description:
IC AVR MCU 16K 16MHZ COM 44-QFN
Manufacturer:
Atmel
Datasheet:
![ATMEGA16-16PI](/photos/6/70/67049/453-40-dip_tmb.jpg)
Part Number:
Description:
IC AVR MCU 16K 16MHZ IND 40-DIP
Manufacturer:
Atmel
Datasheet:
![ATMEGA16-16MI](/photos/12/13/121316/313-44-qfn_tmb.jpg)
Part Number:
Description:
IC AVR MCU 16K 16MHZ IND 44-QFN
Manufacturer:
Atmel
Datasheet:
![ATMEGA16-16AI](/photos/6/70/67042/313-44-tqfp_tmb.jpg)
Part Number:
Description:
IC AVR MCU 16K 16MHZ IND 44-TQFP
Manufacturer:
Atmel
Datasheet:
![ATMEGA16-16AU SL383](/photos/6/70/67042/313-44-tqfp_tmb.jpg)
Part Number:
Description:
IC MCU 8BIT 16KB FLASH 44TQFP
Manufacturer:
Atmel
Datasheet:
![ATMEGA16-16AQ](/photos/6/70/67042/313-44-tqfp_tmb.jpg)
Part Number:
Description:
MCU AVR 16K FLASH 16MHZ 44-TQFP
Manufacturer:
Atmel
Datasheet:
![ATMEGA16-16AC](/photos/6/70/67042/313-44-tqfp_tmb.jpg)
Part Number:
Description:
IC AVR MCU 16K 16MHZ COM 44-TQFP
Manufacturer:
Atmel
Datasheet: