51
ATmega161(L)
1228B–09/01
Note:
1. X = A or B
In PWM mode, these bits have a different function. Refer to Table 18 for a detailed
description.
• Bit 3
–
FOC1A: Force Output Compare1A
Writing a logical “1” to this bit forces a change in the compare match output pin PD5
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 the next compare match or forced compare match occurs. The Force Output
Compare bit can be used to change the output 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 generated 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 logical “1” to this bit forces a change in the compare match output pin PE2
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 the next compare match or forced compare match occurs. The Force Output
Compare bit can be used to change the output 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 generated. The FOC1B bit will
always be read as zero. The setting of the FOC1B bit has no effect in PWM mode.
• Bits 1..0
–
PWM11, PWM10: Pulse Width Modulator Select Bits
These bits select PWM operation of Timer/Counter1 as specified in Table 15. This mode
is described on page 55.
Table 14.
Compare 1 Mode Select
COM1X1
COM1X0
Description
0
0
Timer/Counter1 disconnected from output pin OC1X
0
1
Toggle the OC1X output line.
1
0
Clear the OC1X output line (to zero).
1
1
Set the OC1X output line (to one).
Table 15.
PWM Mode Select
PWM11
PWM10
Description
0
0
PWM operation of Timer/Counter1 is disabled.
0
1
Timer/Counter1 is an 8-bit PWM.
1
0
Timer/Counter1 is a 9-bit PWM.
1
1
Timer/Counter1 is a 10-bit PWM.