Datasheet

160
2549O–AVR–05/12
ATmega640/1280/1281/2560/2561
Table 17-5 shows the COMnx1:0 bit functionality when the WGMn3:0 bits are set to the phase
correct and frequency correct PWM mode.
Note: A special case occurs when OCRnA/OCRnB/OCRnC equals TOP and
COMnA1/COMnB1//COMnC1 is set. See “Phase Correct PWM Mode” on page 152. for more
details.
17.11.5 TCCR1B – Timer/Counter 1 Control Register B
17.11.6 TCCR3B – Timer/Counter 3 Control Register B
17.11.7 TCCR4B – Timer/Counter 4 Control Register B
17.11.8 TCCR5B – Timer/Counter 5 Control Register B
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.
Table 17-5. Compare Output Mode, Phase Correct and Phase and Frequency Correct PWM
COMnA1
COMnB1
COMnC1
COMnA0
COMnB0
COMnC0 Description
00 Normal port operation, OCnA/OCnB/OCnC disconnected
01
WGM13:0 =9 or 11: Toggle OC1A on Compare Match, OC1B and OC1C
disconnected (normal port operation). For all other WGM1 settings, normal
port operation, OC1A/OC1B/OC1C disconnected
10
Clear OCnA/OCnB/OCnC on compare match when up-counting
Set OCnA/OCnB/OCnC on compare match when downcounting
11
Set OCnA/OCnB/OCnC on compare match when up-counting
Clear OCnA/OCnB/OCnC on compare match when downcounting
Bit 76543210
(0x81) ICNC1 ICES1 WGM13 WGM12 CS12 CS11 CS10 TCCR1B
Read/Write R/W R/W RR/W R/W R/W R/W R/W
Initial Value 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
(0x91) ICNC3 ICES3 WGM33 WGM32 CS32 CS31 CS30 TCCR3B
Read/Write R/W R/W RR/W R/W R/W R/W R/W
Initial Value 0 0 0 0 0 0 0 0
Bit 76543210
(0xA1) ICNC4 ICES4 WGM43 WGM42 CS42 CS41 CS40 TCCR4B
Read/Write R/W R/W RR/W R/W R/W R/W R/W
Initial Value 0 0 0 0 0 0 0 0
Bit 76543210
(0x121) ICNC5 ICES5 WGM53 WGM52 CS52 CS51 CS50 TCCR5B
Read/Write R/W R/W RR/W R/W R/W R/W R/W
Initial Value 0 0 0 0 0 0 0 0