atmega161-4pi ATMEL Corporation, atmega161-4pi Datasheet - Page 56

no-image

atmega161-4pi

Manufacturer Part Number
atmega161-4pi
Description
8-bit Microcontroller With 16k Bytes Of In-system Programmable Flash
Manufacturer
ATMEL Corporation
Datasheet
56
ATmega161(L)
Table 18. Compare1 Mode Select in PWM Mode
Note:
Note that in the PWM mode, the 8, 9 or 10 least significant OCR1A/OCR1B bits
(depends of resolution), when written, are transferred to a temporary location. They are
latched when Timer/Counter1 reaches the value TOP. This prevents the occurrence of
odd-length PWM pulses (glitches) in the event of an unsynchronized OCR1A/OCR1B
write. See Figure 37 and Figure 38 for an example in each mode.
Figure 37. Effects on Unsynchronized OCR1 Latching
Note:
CTC1
Compare Value changes
0
0
0
0
1
1
1
1
1. X = A or B
1. Note: X = A or B
Unsynchronized
COM1X1
Synchronized
0
0
1
1
0
0
1
1
Compare Value changes
COM1X0
0
1
0
1
0
1
0
1
OCR1X Latch
OCR1X Latch
Effect on OCX1
Not connected
Not connected
Cleared on compare match, up-counting. Set on compare
match, down-counting (non-inverted PWM).
Cleared on compare match, down-counting. Set on compare
match, up-counting (inverted PWM).
Not connected
Not connected
Cleared on compare match, set on overflow.
Set on compare match, cleared on overflow.
(1)
Glitch
(1)
Compare Value
PWM Output OC1X
Counter Value
Counter Value
Compare Value
PWM Output OC1X
1228D–AVR–02/07

Related parts for atmega161-4pi