Timer/counter1 control register a - tccr1a – Rainbow Electronics ATmega103L User Manual
Page 45

ATmega603/103
45
If the noise canceler function is enabled, the actual trigger condition for the capture event is monitored over 4 samples, and
all 4 must be equal to activate the capture flag.
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 1. This is an alternative function to an I/O port, and the cor-
responding direction control bit must be set (one) to control an output pin. The control configuration is shown in Table 16..
•
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. Since this is an alternative function to an I/O port, the corre-
sponding direction control bit must be set (one) to control an output pin. The following control configuration is given:
Note:
X = A or B.
In PWM mode, these bits have a different function. Refer to Table 17 for a detailed description.
•
Bits 3..2 - Res: Reserved bits
These bits are reserved bits in the ATmega603/103 and always read zero.
•
Bits 1..0 - PWM11, PWM10: Pulse Width Modulator Select Bits
These bits select PWM operation of Timer/Counter1 as specified in Table 19. This mode is described on page 49.
Bit
7
6
5
4
3
2
1
0
$2F ($4F)
COM1A1
COM1A0
COM1B1
COM1B0
-
-
PWM11
PWM10
TCCR1A
Read/Write
R/W
R/W
R/W
R/W
R
R
R/W
R/W
Initial value
0
0
0
0
0
0
0
0
Table 16. 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 17. 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