attiny167-esxz ATMEL Corporation, attiny167-esxz Datasheet - Page 98

no-image

attiny167-esxz

Manufacturer Part Number
attiny167-esxz
Description
8-bit Avr 8-bit Microcontroller Microcontroller With 16k Bytes In-system Programmable Flash And Lin Controller
Manufacturer
ATMEL Corporation
Datasheet
10.11.2
98
ATtiny167
Timer/Counter0 Control Register B – TCCR0B
• Bit 6, 3 – WGM01:0: Waveform Generation Mode
These bits control the counting sequence of the counter, the source for the maximum (TOP)
counter value, and what type of waveform generation to be used, see
operation supported 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
”Modes of Operation” on page
Table 10-4.
Notes:
• Bit 7 – FOC0A: Force Output Compare A
The FOC0A bit is only active when the WGM bits specify a non-PWM mode.
However, for ensuring compatibility with future devices, this bit must be set to zero when
TCCR0B is written when operating in PWM mode. When writing a logical one to the FOC0A bit,
an immediate Compare Match is forced on the Waveform Generation unit. The OC0A output is
changed according to its COM0A1:0 bits setting. Note that the FOC0A bit is implemented as a
strobe. Therefore it is the value present in the COM0A1:0 bits that determines the effect of the
forced compare.
A FOC0A strobe will not generate any interrupt, nor will it clear the timer in CTC mode using
OCR0A as TOP.
The FOC0A bit is always read as zero.
• Bit 6:3 – Res: Reserved Bits
These bits are reserved in the ATtiny167 and will always read as zero.
• Bit 2:0 – CS02:0: Clock Select
Bit
Read/Write
Initial Value
Mode
0
1
2
3
1. MAX = 0xFF,
2. BOTTOM = 0x00.
WGM01
(CTC0)
0
0
1
1
Waveform Generation Mode Bit Description
FOC0A
W
7
0
WGM00
(PWM0)
0
1
0
1
R
6
0
88.).
Timer/Counter
Mode of Operation
Normal
PWM, Phase Correct
CTC
Fast PWM
R
5
0
R
4
0
3
R
0
TOP
0xFF
0xFF
OCR0A
0xFF
CS02
R/W
2
0
Update of
OCR0A at
Immediate
TOP
Immediate
TOP
CS01
R/W
1
0
Table
CS00
10-4. Modes of
R/W
7728A–AUTO–07/08
0
0
TOV0 Flag
Set on
MAX
BOTTOM
MAX
MAX
TCCR0B
(1)(2)
(See

Related parts for attiny167-esxz