English
Language : 

ATMEGA8U2_14 Datasheet, PDF (133/310 Pages) ATMEL Corporation – 125 Powerful Instructions – Most Single Clock Cycle Execution
ATmega8U2/16U2/32U2
16.11.2
TCCR1B – Timer/Counter1 Control Register B
Bit
7
6
5
(0x81)
ICNC1
ICES1
–
Read/Write
R/W
R/W
R
Initial Value
0
0
0
4
WGM13
R/W
0
3
WGM12
R/W
0
2
CS12
R/W
0
1
CS11
R/W
0
0
CS10
R/W
0
TCCR1B
• Bit 7 – ICNCn: 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 (ICPn) is filtered. The filter function requires four
successive equal valued samples of the ICPn pin for changing its output. The input capture is
therefore delayed by four Oscillator cycles when the noise canceler is enabled.
• Bit 6 – ICESn: Input Capture Edge Select
This bit selects which edge on the Input Capture Pin (ICPn) that is used to trigger a capture
event. When the ICESn bit is written to zero, a falling (negative) edge is used as trigger, and
when the ICESn bit is written to one, a rising (positive) edge will trigger the capture.
When a capture is triggered according to the ICESn setting, the counter value is copied into the
Input Capture Register (ICRn). The event will also set the Input Capture Flag (ICFn), and this
can be used to cause an Input Capture Interrupt, if this interrupt is enabled.
When the ICRn is used as TOP value (see description of the WGMn[3:0] bits located in the
TCCRnA and the TCCRnB Register), the ICPn is disconnected and consequently the input cap-
ture function is disabled.
• Bit 5 – Reserved Bit
This bit is reserved for future use. For ensuring compatibility with future devices, this bit must be
written to zero when TCCRnB is written.
• Bit 4:3 – WGMn[3:2]: Waveform Generation Mode
See TCCRnA Register description.
• Bit 2:0 – CSn[2:0]: Clock Select
The three clock select bits select the clock source to be used by the Timer/Counter, see Figure
15-1 and Figure 15-2.
Table 16-5. Clock Select Bit Description
CSn2 CSn1 CSn0 Description
0
0
0
No clock source. (Timer/Counter stopped)
0
0
1
clkI/O/1 (No prescaling
0
1
0
clkI/O/8 (From prescaler)
0
1
1
clkI/O/64 (From prescaler)
1
0
0
clkI/O/256 (From prescaler)
1
0
1
clkI/O/1024 (From prescaler)
1
1
0
External clock source on Tn pin. Clock on falling edge
1
1
1
External clock source on Tn pin. Clock on rising edge
7799D–AVR–11/10
133