97
AT94KAL Series FPSLIC
Rev. 1138G–FPSLI–11/03
Timer/Counter1 Control Register A – TCCR1A
• Bits 7,6 - COM1A1, COM1A0: Compare Output Mode1A, Bits 1 and 0
The COM1A1 and COM1A0 control bits determine any output pin action following a compare
match in Timer/Counter1. Any output pin actions affect pin OC1A – Output CompareA pin
PE6. This is an alternative function to an I/O port, and the corresponding direction control bit
must be set (one) to control an output pin. The control configuration is shown in Table 27.
• Bits 5,4 - COM1B1, COM1B0: Compare Output Mode1B, Bits 1 and 0
The COM1B1 and COM1B0 control bits determine any output pin action following a compare
match in Timer/Counter1. Any output pin actions affect pin OC1B – Output CompareB pin
PE5. This is an alternative function to an I/O port, and the corresponding direction control bit
must be set (one) to control an output pin. The following control configuration is given:
Notes:
1. In PWM mode, these bits have a different function. Refer to Table 31 for a detailed
description.
2. X = A or B
• Bit 3 - FOC1A: Force Output Compare1A
Writing a logic 1 to this bit forces a change in the compare match output pin PE6 according to
the values already set in COM1A1 and COM1A0. If the COM1A1 and COM1A0 bits are written
in the same cycle as FOC1A, the new settings will not take effect until next compare match or
forced compare match occurs. The Force Output Compare bit can be used to change the out-
put pin without waiting for a compare match in the timer. The automatic action programmed in
COM1A1 and COM1A0 happens as if a Compare Match had occurred, but no interrupt is gen-
erated and it will not clear the timer even if CTC1 in TCCR1B is set. The FOC1A bit will always
be read as zero. The setting of the FOC1A bit has no effect in PWM mode.
• Bit 2 - FOC1B: Force Output Compare1B
Writing a logic 1 to this bit forces a change in the compare match output pin PE5 according to
the values already set in COM1B1 and COM1B0. If the COM1B1 and COM1B0 bits are written
in the same cycle as FOC1B, the new settings will not take effect until next compare match or
forced compare match occurs. The Force Output Compare bit can be used to change the out-
put pin without waiting for a compare match in the timer. The automatic action programmed in
COM1B1 and COM1B0 happens as if a Compare Match had occurred, but no interrupt is gen-
erated. The FOC1B bit will always be read as zero. The setting of the FOC1B bit has no effect
in PWM mode.
Bit
7
6
5
4
3
2
1
0
$2F ($4F)
COM1A1
COM1A0
COM1B1
COM1B0
FOC1A
FOC1B
PWM11
PWM10
TCCR1A
Read/Write
R/W
R/W
R/W
R/W
R/w
R/W
R/W
R/W
Initial Value
0
0
0
0
0
0
0
0
Table 27.
Compare 1 Mode Select
COM1X1
COM1X0
Description
0
0
Timer/Counter1 disconnected from output pin OC1X
0
1
Toggles the OC1X output line
1
0
Clears the OC1X output line (to zero)
1
1
Sets the OC1X output line (to one)