at90pwm81-16se ATMEL Corporation, at90pwm81-16se Datasheet - Page 97

no-image

at90pwm81-16se

Manufacturer Part Number
at90pwm81-16se
Description
8-bit Avr Microcontroller With 8k Bytes In- System Programmable Flash
Manufacturer
ATMEL Corporation
Datasheet
12.8.2
12.8.3
7734M–AVR–03/10
Timer/Counter1 – TCNT1H and TCNT1L
Input Capture Register 1 – ICR1H and ICR1L
The three Clock Select bits select the clock source to be used by the Timer/Counter, see Table 12-2.
Table 12-2.
If external pin modes are used for the Timer/Counter1, transitions on the T1 pin will clock the counter
even if the pin is configured as an output. This feature allows software control of the counting.
The two Timer/Counter I/O locations (TCNT1H and TCNT1L, combined TCNT1) give direct access,
both for read and for write operations, to the Timer/Counter unit 16-bit counter. To ensure that both the
high and low bytes are read and written simultaneously when the CPU accesses these registers, the access
is performed using an 8-bit temporary High Byte Register (TEMP). This temporary register is shared by
all the other 16-bit registers.
Modifying the counter (TCNT1) while the counter is running introduces a risk of missing a compare
match between TCNT1 and one of the OCR1x Registers.
Writing to the TCNT1 Register blocks (removes) the compare match on the following timer clock for all
compare units.
The Input Capture is updated with the counter (TCNT1) value each time an event occurs on the ICP1 pin
(or optionally on the Analog Comparator output for Timer/Counter1). The Input Capture can be used for
defining the counter TOP value.
The Input Capture Register is 16-bit in size. To ensure that both the high and low bytes are read simultane-
ously when the CPU accesses these registers, the access is performed using an 8-bit temporary High Byte
Bit
Read/Write
Initial Value
Bit
Read/Write
Initial Value
CS12
0
0
0
0
1
1
1
1
CS11
0
0
1
1
0
0
1
1
Clock Select Bit Description
7
TCNT1[15:8]
TCNT1[7:0]
R/W
0
7
ICR1[15:8]
ICR1[7:0]
R/W
0
CS10
6
R/W
0
6
R/W
0
0
1
0
1
0
1
0
1
See “Accessing 16-bit Registers” on page 86.
Description
No clock source (Timer/Counter stopped).
clk
Reserved
Reserved
Reserved
Reserved
External clock source on T1 pin. Clock on falling edge.
External clock source on T1 pin. Clock on rising edge.
5
R/W
0
5
R/W
0
I/O
/1 (No prescaling)
4
R/W
0
4
R/W
0
3
R/W
0
3
R/W
0
2
R/W
0
2
R/W
0
1
R/W
0
1
R/W
0
AT90PWM81
0
R/W
0
0
R/W
0
TCNT1H
TCNT1L
ICR1H
ICR1L
97

Related parts for at90pwm81-16se