Datasheet

116
8197C–AVR–05/11
ATtiny261A/461A/861A
12.12.3 TCCR1C – Timer/Counter1 Control Register C
Bits 7:6 – COM1A1S, COM1A0S: Comparator A Output Mode, Shadow Bits 1 and 0
These are shadow bits of COM1A1 and COM1A0 in TCCR1A. Writing to bits COM1A1S and
COM1A0S will also change bits COM1A1 and COM1A0 in TCCR1A. Similary, changes written
to bits COM1A1 and COM1A0 in TCCR1A will show here.
See “TCCR1A – Timer/Counter1 Control Register A” on page 111 for information on bit usage.
Bits 5:4 – COM1B1S, COM1B0S: Comparator B Output Mode, Shadow Bits 1 and 0
These are shadow bits of COM1B1 and COM1B0 in TCCR1A. Writing to bits COM1B1S and
COM1B0S will also change bits COM1B1 and COM1B0 in TCCR1A. Similary, changes written
to bits COM1B1 and COM1B0 in TCCR1A will show here.
See “TCCR1A – Timer/Counter1 Control Register A” on page 111 for information on bit usage.
Bits 3:2 – COM1D[1:0]: Comparator D Output Mode, Bits 1 and 0
These bits control the behaviour of the Waveform Output (OCW1D) and the connection of the
Output Compare pin (OC1D). If one or both of the COM1D[1:0] bits are set, the OC1D output
overrides the normal port functionality of the I/O pin it is connected to. The complementary
OC1D
output is connected only in PWM modes when the COM1D[1:0] bits are set to “01”. Note
that the Data Direction Register (DDR) bit corresponding to the OC1D pin must be set in order to
enable the output driver.
The function of the COM1D[1:0] bits depends on the PWM1D and WGM1[1:0] bit settings. Table
12-18 shows the COM1D[1:0] bit functionality when the PWM1D bit is set to a Normal Mode
(non-PWM).
Table 12-19 shows the COM1D[1:0] bit functionality when the PWM1D and WGM1[1:0] bits are
set to Fast PWM Mode.
Bit 76543210
0x27 (0x47) COM1A1S COM1A0S COM1B1S COM1B0S COM1D1 COM1D0 FOC1D PWM1D TCCR1C
Read/Write R/W R/W R/W R/W R/W R/W R/W R/W
Initial value00000000
Table 12-18. Compare Output Mode, Normal Mode (non-PWM)
COM1D[1:0] OCW1D Behaviour OC1D Pin OC1D Pin
00 Normal port operation. Disconnected Disconnected
01 Toggle on Compare Match. Connected Disconnected
10 Clear on Compare Match. Connected Disconnected
11 Set on Compare Match. Connected Disconnected
Table 12-19. Compare Output Mode, Fast PWM Mode
COM1D[1:0] OCW1D Behaviour OC1D Pin OC1D Pin
00 Normal port operation. Disconnected Disconnected
01 Cleared on Compare Match. Set when TCNT1=0x000. Connected Connected
10 Cleared on Compare Match. Set when TCNT1=0x000. Connected Disconnected
11 Set on Compare Match. Cleared when TCNT1=0x000. Connected Disconnected