Atmel AT90PWM2 Manual page 125

8-bit avr microcontroller with 8k bytes in-system programmable flash
Table of Contents

Advertisement

Note:
1. The CTCn and PWMn1:0 bit definition names are obsolete. Use the
location of these bits are compatible with previous versions of the timer.
15.10.2
Timer/Counter1 Control Register B – TCCR1B
AT90PWM2/3/2B/3B
126
Bit
7
ICNC1
ICES1
Read/Write
R/W
Initial Value
0
• 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 WGMn3: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 – WGMn3:2: Waveform Generation Mode
See TCCRnA Register description.
• Bit 2:0 – CSn2:0: Clock Select
The three Clock Select bits select the clock source to be used by the Timer/Counter, see
15-10
and
Figure
15-11.
Table 15-5.
Clock Select Bit Description
CSn2
CSn1
CSn0
0
0
0
0
0
1
0
1
0
0
1
1
1
0
0
1
0
1
1
1
0
1
1
WGM
6
5
4
WGM13
R/W
R
R/W
0
0
0
Description
No clock source (Timer/Counter stopped).
clk
/1 (No prescaling)
I/O
clk
/8 (From prescaler)
I/O
clk
/64 (From prescaler)
I/O
clk
/256 (From prescaler)
I/O
clk
/1024 (From prescaler)
I/O
External clock source on Tn pin. Clock on falling edge.
1
External clock source on Tn pin. Clock on rising edge.
n2:0 definitions. However, the functionality and
3
2
1
WGM12
CS12
CS11
R/W
R/W
R/W
0
0
0
0
CS10
TCCR1B
R/W
0
Figure
4317I–AVR–01/08

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the AT90PWM2 and is the answer not in the manual?

This manual is also suitable for:

At90pwm3At90pwm2bAt90pwm3b

Table of Contents