ATTIny13-12PI ATMEL Corporation, ATTIny13-12PI Datasheet - Page 68

no-image

ATTIny13-12PI

Manufacturer Part Number
ATTIny13-12PI
Description
8-bit AVR Microcontroller with 1K Bytes In-System Programmable Flash
Manufacturer
ATMEL Corporation
Datasheet
68
ATtiny13
Table 28 shows the COM0B1:0 bit functionality when the WGM02:0 bits are set to
phase correct PWM mode.
Table 31. Compare Output Mode, Phase Correct PWM Mode
Note:
• Bits 3, 2 – Res: Reserved Bits
These bits are reserved bits in the ATtiny13 and will always read as zero.
• Bits 1:0 – WGM01:0: Waveform Generation Mode
Combined with the WGM02 bit found in the TCCR0B Register, these bits control the
counting sequence of the counter, the source for maximum (TOP) counter value, and
what type of waveform generation to be used, see Table 32. Modes of operation sup-
ported by the Timer/Counter unit are: Normal mode (counter), Clear Timer on Compare
Match (CTC) mode, and two types of Pulse Width Modulation (PWM) modes (see
“Modes of Operation” on page 60).
Table 32. Waveform Generation Mode Bit Description
Notes:
Mode
COM0A1
0
1
2
3
4
5
6
7
0
0
1
1
1. A special case occurs when OCR0B equals TOP and COM0B1 is set. In this case,
1. MAX
2. BOTTOM = 0x00
WGM2
the Compare Match is ignored, but the set or clear is done at TOP. See “Phase Cor-
rect PWM Mode” on page 63 for more details.
0
0
0
0
1
1
1
1
COM0A0
WGM1
0
1
0
1
= 0xFF
0
0
1
1
0
0
1
1
Description
Normal port operation, OC0B disconnected.
Reserved
Clear OC0B on Compare Match when up-counting. Set OC0B on
Compare Match when down-counting.
Set OC0B on Compare Match when up-counting. Clear OC0B on
Compare Match when down-counting.
WGM0
0
1
0
1
0
1
0
1
Timer/Counter
Mode of
Operation
Normal
PWM, Phase
Correct
CTC
Fast PWM
Reserved
PWM, Phase
Correct
Reserved
Fast PWM
OCRA
OCRA
OCRA
0xFF
0xFF
0xFF
TOP
(1)
Update of
Immediate
Immediate
OCRx at
TOP
TOP
TOP
TOP
2535B–AVR–01/04
Set on
TOV Flag
BOTTOM
BOTTOM
MAX
MAX
MAX
TOP
(1)(2)

Related parts for ATTIny13-12PI