atmega323l ATMEL Corporation, atmega323l Datasheet - Page 61

no-image

atmega323l

Manufacturer Part Number
atmega323l
Description
Atmega323 8-bit Avr Microcontroller With 32k Bytes Of In-system Programmable Flash
Manufacturer
ATMEL Corporation
Datasheet
1457G–AVR–09/03
Table 20. Timer TOP Values and PWM Frequency
As shown in Table 20, the PWM operates at either 8, 9, or 10 bits resolution. Note the
unused bits in OCR1A, OCR1B, and TCNT1 will automatically be written to zero by
hardware. I.e., bit 9 to 15 will be set to zero in OCR1A, OCR1B, and TCNT1 if the 9-bit
PWM resolution is selected. This makes it possible for the user to perform Read-Modify-
Write operations in any of the three resolution modes and the unused bits will be treated
as don’t care.
Table 21. Timer TOP Values and PWM Frequency
Table 22. Compare1 Mode Select in PWM Mode
Note:
Note that in the PWM mode, the 8, 9, or 10 least significant OCR1A/OCR1B bits
(depending on 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 38 and Figure 39 for an example in each mode.
CTC1
CTC1
0
0
0
1
1
1
0
0
0
0
1
1
1
1
PWM Resolution
1. X = A or B
PWM11
COM1X1
10-bit
8-bit
9-bit
0
1
1
0
1
1
0
0
1
1
0
0
1
1
PWM10
COM1X0
1
0
1
1
0
1
0
1
0
1
0
1
0
1
PWM Resolution
Effect on OCX1
Not connected
Reserved
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
Reserved
Cleared on Compare Match, set on overflow.
Set on Compare Match, cleared on overflow.
Timer TOP Value
$03FF(1023)
$00FF (255)
$01FF (511)
10-bit
10-bit
8-bit
9-bit
8-bit
9-bit
(1)
Timer TOP Value
$03FF(1023)
$03FF(1023)
$00FF (255)
$01FF (511)
$00FF (255)
$01FF (511)
ATmega323(L)
Frequency
f
f
f
TC1
TC1
TC1
/1022
/2046
/510
Frequency
f
f
f
f
TCK1
TCK1
f
f
TCK1
TCK1
TCK1
TCK1
/1022
/2046
/1024
/510
/256
/512
61

Related parts for atmega323l