Timer 1 Data Register (T1Dr); Figure 7.4-4 Timer 1 Data Register (T1Dr) - Fujitsu F2MC-8L Series Hardware Manual

8-bit microcontroller
Hide thumbs Also See for F2MC-8L Series:
Table of Contents

Advertisement

7.4.3

Timer 1 Data Register (T1DR)

The timer 1 data register (T1DR) is used to set the interval timer value (for the interval
timer function) or counter value (for the counter function) either for timer 1 in 8-bit
mode or for the lower eight bits of the 16-bit timer. The T1DR register is also used to
read the counter value.
Timer 1 Data Register (T1DR)
The value set in this register is compared to the counter value. When this register is read, it
returns the counter value. The value set in the register cannot be read.
Figure 7.4-4 shows the bit structure of the timer 1 data register.
Address
001B
R/W : Readable and writable
X
: Indeterminate
In 8-bit mode (Timer 1)
The value in the T1DR register is compared to the counter value. The register sets the interval
time value when the interval timer function is used; it sets the count to be detected when the
counter function is used. When count operation is enabled (T1CR: T1STR = "0" --> "1", T1STP
= "0"), the T1DR register value is set in (loaded to) the comparate data latch to start counting.
When the counter value is incremented to match the value in the comparate data latch, the
T1DR register value is set in the comparate data latch again and the counter restarts counting
after being cleared.
The comparate data latch is reset upon detection of a match. Therefore if a value is written to
the T1DR register during operation of the counter, the value is made valid in the next cycle
(after detection of a match).
Tip:
The value set in the T1DR register during operation of the interval timer is calculated from
the equation below. Note, however, that the instruction cycle depends on the clock mode
and gear function.
T1DR register value = interval time/(count clock cycle × instruction cycle) - 1

Figure 7.4-4 Timer 1 Data Register (T1DR)

Bit 7
Bit 6
Bit 5
H
R/W
R/W
R/W
Bit 4
Bit 3
Bit 2
Bit 1
R/W
R/W
R/W
R/W
7.4 8/16-bit Timer/Counter Registers
Bit 0
Initial value
XXXXXXXX
B
R/W
171

Advertisement

Table of Contents
loading

Table of Contents