Timer/Counter1 Control Register A - Tccr1A - Atmel AVR AT90S2313 Manual

8-bit avr microcontroller with 2k bytes of in-system programmable flash
Hide thumbs Also See for AVR AT90S2313:
Table of Contents

Advertisement

Timer/Counter1 Control
Register A – TCCR1A
0839G–08/01
When Timer/Counter1 is externally clocked, the external signal is synchronized with the
oscillator frequency of the CPU. To assure proper sampling of the external clock, the
minimum time between two external clock transitions must be at least one internal CPU
clock period. The external clock signal is sampled on the rising edge of the internal CPU
clock.
The 16-bit Timer/Counter1 features both a high-resolution and a high-accuracy usage
with the lower prescaling opportunities. Similarly, the high prescaling opportunities
makes the Timer/Counter1 useful for lower speed functions or exact timing functions
with infrequent actions.
The Timer/Counter1 supports an Output Compare function using the Output Compare
Register 1A (OCR1A) as the data source to be compared to the Timer/Counter1 con-
tents. The Output Compare functions include optional clearing of the counter on
compare matches, and actions on the Output Compare pin 1 on compare matches.
Timer/Counter1 can also be used as an 8-, 9- or 10-bit Pulse Width Modulator. In this
mode the counter and the OCR1 register serve as a glitch-free standalone PWM with
centered pulses. Refer to page 36 for a detailed description of this function.
The Input Capture function of Timer/Counter1 provides a capture of the Timer/Counter1
contents to the Input Capture Register (ICR1), triggered by an external event on the
Input Capture Pin (ICP). The actual capture event settings are defined by the
Timer/Counter1 Control Register (TCCR1B). In addition, the Analog Comparator can be
set to trigger the input capture. Refer to "Analog Comparator" on page 50 for details on
this. The ICP pin logic is shown in Figure 31.
Figure 31. ICP Pin Schematic Diagram
If the Noise Canceler function is enabled, the actual trigger condition for the capture
event is monitored over four samples, and all four must be equal to activate the capture
flag.
Bit
7
6
$2F ($4F)
COM1A1
COM1A0
Read/Write
R/W
R/W
Initial value
0
0
• Bits 7,6 – COM1A1, COM1A0: Compare Output Mode1, 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 OC1 (Output Com-
pare pin 1) (PB3). This is an alternative function to the I/O port, and the corresponding
5
4
3
R
R
R
0
0
0
AT90S2313
2
1
0
PWM11
PWM10
TCCR1A
R
R/W
R/W
0
0
0
31

Advertisement

Table of Contents
loading

Table of Contents