110
8006K–AVR–10/10
ATtiny24/44/84
Bits 1:0 – WGM11, WGM10: Waveform Generation Mode
Combined with the WGM13:2 bits found in the TCCR1B Register, these bits control the counting
sequence of the counter, the source for maximum (TOP) counter value, and what type of wave-
Timer/Counter unit are: Normal mode (counter), Clear Timer on Compare match (CTC) mode,
12.11.2
TCCR1B – Timer/Counter1 Control Register B
Bit 7 – ICNC1: Input Capture Noise Canceler
Setting this bit (to one) activates the Input Capture Noise Canceler. When the noise canceler is
activated, the input from the Input Capture pin (ICP1) is filtered. The filter function requires four
successive equal valued samples of the ICP1 pin for changing its output. The Input Capture is
therefore delayed by four Oscillator cycles when the noise canceler is enabled.
Bit 6 – ICES1: Input Capture Edge Select
This bit selects which edge on the Input Capture pin (ICP1) that is used to trigger a capture
event. When the ICES1 bit is written to zero, a falling (negative) edge is used as trigger, and
when the ICES1 bit is written to one, a rising (positive) edge will trigger the capture.
Table 12-5.
Waveform Generation Modes
Mode
WGM
13:10
Mode of
Operation
TOP
Update of
OCR1
x at
TOV1 Flag
Set on
0
0000
Normal
0xFFFF
Immediate
MAX
1
0001
PWM, Phase Correct, 8-bit
0x00FF
TOP
BOTTOM
2
0010
PWM, Phase Correct, 9-bit
0x01FF
TOP
BOTTOM
3
0011
PWM, Phase Correct, 10-bit
0x03FF
TOP
BOTTOM
40100
CTC (
Clear Timer on Compare)
OCR1A
Immediate
MAX
5
0101
Fast PWM, 8-bit
0x00FF
TOP
6
0110
Fast PWM, 9-bit
0x01FF
TOP
7
0111
Fast PWM, 10-bit
0x03FF
TOP
8
1000
PWM, Phase & Freq. Correct
ICR1
BOTTOM
9
1001
PWM, Phase & Freq. Correct
OCR1A
BOTTOM
10
1010
PWM, Phase Correct
ICR1
TOP
BOTTOM
11
1011
PWM, Phase Correct
OCR1A
TOP
BOTTOM
12
1100
CTC (
Clear Timer on Compare)
ICR1
Immediate
MAX
13
1101
(Reserved)
–
14
1110
Fast PWM
ICR1
TOP
15
1111
Fast PWM
OCR1A
TOP
Bit
765
4
3
2
1
0
ICNC1
ICES1
–
WGM13
WGM12
CS12
CS11
CS10
TCCR1B
Read/Write
R/W
R
R/W
Initial Value
0