ATMEGA163 ATMEL [ATMEL Corporation], ATMEGA163 Datasheet - Page 54
![no-image](/images/no-image-200.jpg)
ATMEGA163
Manufacturer Part Number
ATMEGA163
Description
8-bit Microcontroller with 16K Bytes In-System Programmable Flash
Manufacturer
ATMEL [ATMEL Corporation]
Datasheet
1.ATMEGA163.pdf
(187 pages)
Available stocks
Company
Part Number
Manufacturer
Quantity
Price
Company:
Part Number:
ATMEGA163-8AC
Manufacturer:
ATMEL
Quantity:
1 600
Part Number:
ATMEGA163-8AI
Manufacturer:
ATMEL/爱特梅尔
Quantity:
20 000
Company:
Part Number:
ATMEGA163L-4AI
Manufacturer:
ATMEL
Quantity:
984
- Current page: 54 of 187
- Download datasheet (3Mb)
Timer/Counter2 Output
Compare Register – OCR2
Timer/Counter2 in PWM Mode
PWM Modes (Up/Down and
Overflow)
54
ATmega163(L)
The Output Compare Register is an 8-bit read/write register.
The Timer/Counter Output Compare Register contains the data to be continuously com-
pared with Timer/Counter2. Actions on compare matches are specified in TCCR2. A
software write to the Timer/Counter2 Register blocks compare matches in the next
Timer/Counter2 clock cycle. This prevents immediate interrupts when initializing the
Timer/Counter2.
A Compare Match will set the Compare Interrupt Flag in the CPU clock cycle following
the compare event.
When PWM mode is selected, the Timer/Counter2 either wraps (overflows) when it
reaches $FF or it acts as an up/down counter.
If the up/down mode is selected, the Timer/Counter2 and the Output Compare Register
– OCR2 form an 8-bit, free-running, glitch-free, and phase correct PWM with outputs on
the PD7(OC2) pin.
If the overflow mode is selected, the Timer/Counter2 and the Output Compare Register
– OCR2 form an 8-bit, free-running, and glitch-free PWM, operating with twice the speed
of the up/down counting mode.
The two different PWM modes are selected by the CTC2 bit in the Timer/Counter Con-
trol Register – TCCR2.
If CTC2 is cleared and PWM mode is selected, the Timer/Counter acts as an up/down
counter, counting up from $00 to $FF, where it turns and counts down again to zero
before the cycle is repeated. When the counter value matches the contents of the Out-
put Compare Register, the PD7(OC2) pin is set or cleared according to the settings of
the COM21/COM20 bits in the Timer/Counter Control Register TCCR2.
If CTC2 is set and PWM mode is selected, the Timer/Counters will wrap and start count-
ing from $00 after reaching $FF. The PD7(OC2) pin will be set or cleared according to
the settings of COM21/COM20 on a Timer/Counter overflow or when the counter value
matches the contents of the Output Compare Register. Refer to Table 21 for details.
Bit
$23 ($43)
Read/Write
Initial Value
MSB
R/W
7
0
R/W
6
0
R/W
5
0
R/W
4
0
R/W
3
0
R/W
2
0
R/W
1
0
R/W
LSB
0
0
1142E–AVR–02/03
OCR2
Related parts for ATMEGA163
Image
Part Number
Description
Manufacturer
Datasheet
Request
R
![AT88SC0204CA-SH](/images/no-image3.png)
Part Number:
Description:
Atmel CryptoMemory
Manufacturer:
ATMEL [ATMEL Corporation]
Datasheet:
![AT88SC0808CA-SH](/images/no-image3.png)
Part Number:
Description:
Atmel CryptoMemory
Manufacturer:
ATMEL [ATMEL Corporation]
Datasheet:
![AT88SC1616C-SH](/images/no-image3.png)
Part Number:
Description:
Atmel CryptoMemory, 16Kbit
Manufacturer:
ATMEL [ATMEL Corporation]
Datasheet:
![AT25DF161-SH](/images/no-image3.png)
Part Number:
Description:
8-bit Atmel Microcontrollers
Manufacturer:
ATMEL [ATMEL Corporation]
Datasheet:
![ATMEGA1281V](/images/no-image3.png)
Part Number:
Description:
8-bit Atmel Microcontroller with 64K/128K/256K Bytes In-System Programmable Flash
Manufacturer:
ATMEL [ATMEL Corporation]
Datasheet:
![ATMEGA164A_11](/images/no-image3.png)
Part Number:
Description:
8-bit Atmel Microcontroller with 16/32/64/128K Bytes In-System Programmable Flash
Manufacturer:
ATMEL [ATMEL Corporation]
Datasheet:
![ATMEGA165A_11](/images/no-image3.png)
Part Number:
Description:
8-bit Atmel Microcontroller with 16/32/64K Bytes In-System Programmable Programmable
Manufacturer:
ATMEL [ATMEL Corporation]
Datasheet:
![U641B](/images/manufacturer_photos/0/0/79/atmel_corporation_tmb.jpg)
Part Number:
Description:
INTERVAL AND WIPE/WASH WIPER CONTROL IC WITH DELAY
Manufacturer:
ATMEL Corporation
Datasheet:
![U4082B](/images/manufacturer_photos/0/0/79/atmel_corporation_tmb.jpg)
Part Number:
Description:
Low-Voltage Voice-Switched IC for Hands-Free Operation
Manufacturer:
ATMEL Corporation
Datasheet:
![U4089B](/images/manufacturer_photos/0/0/79/atmel_corporation_tmb.jpg)
Part Number:
Description:
MONOLITHIC INTEGRATED FEATUREPHONE CIRCUIT
Manufacturer:
ATMEL Corporation
Datasheet:
![U4255BM-M](/images/manufacturer_photos/0/0/79/atmel_corporation_tmb.jpg)
Part Number:
Description:
AM-FM Receiver IC U4255BM-M
Manufacturer:
ATMEL Corporation
Datasheet:
![U4089B-P](/images/manufacturer_photos/0/0/79/atmel_corporation_tmb.jpg)
Part Number:
Description:
Monolithic Integrated Feature Phone Circuit
Manufacturer:
ATMEL Corporation
Datasheet:
![TDA4470](/images/manufacturer_photos/0/0/79/atmel_corporation_tmb.jpg)
Part Number:
Description:
Multistandard Video-IF and Quasi Parallel Sound Processing
Manufacturer:
ATMEL Corporation
Datasheet: