Figure 9.3.2 16-Bit Timer Count Register (Tcr) - Fujitsu F2MC-8L MB89620 Series Hardware Manual

8-bit microcontroller
Table of Contents

Advertisement

9.3 Structure of 16-bit Timer/Counter
9.3.2 16-bit Timer Count Register (TCR)
The 16-bit timer count register (TCR) is a 16-bit up-counter that counts-up from the
value set in the register.
n 16-bit Timer Count Register (TCR)
Figure 9.3.2 shows the bit structure of the 16-bit timer count register.
Upper byte (TCHR)
Lower byte (TCLR)
R/W: Readable and writable
R : Read-only
For both the interval timer function and counter function, set the initial counter value in this
register when counter operation is disabled (TMCR: TCS = "0"). When counter operation is
enabled (TCS = "1"), the counter starts counting-up from the value written in this register. When
counter operation is stopped (TCS = "0"), the TCR register stores its current value. Clearing the
counter (TMCR: TCR = "0") clears the TCR register (counter) to "0000
When the TCR register is written after clearing the counter, the register is set to the value
written in the register.
Note: The set value of the TCR register for the interval timer function (when the instruction cycle is the
divide-by-four source oscillation (4/F
Set upper 8 bits as the TCHR register and lower 8 bits as the TCLR register.
Check: • The value set in this register only applies when the counter is first activated. The counter restarts
188
CHAPTER 9 16-BIT TIMER/COUNTER
Address
Bit 7
Bit 6
0019
H
R/W
R/W
R
R
Address
Bit 7
Bit 6
001A
H
R/W
R/W
R
R

Figure 9.3.2 16-bit Timer Count Register (TCR)

TCR register value = 2
counting-up from "0000
H
Write to this register when counter operation is stopped (TMCR: TCS = "0").
• The counter value can be read during operation.
Always read the register using word transfer instructions (such as MOVW A, 0019H).
Bit 5
Bit 4
Bit 3
R/W
R/W
R/W
R
R
R
Bit 5
Bit 4
Bit 3
R/W
R/W
R/W
R
R
R
)) is calculated as follows:
C
16
(interval time/instruction cycle)
" after an overflow.
Bit 2
Bit 1
Bit 0
Initial value
00000000
...When counter stopped
R/W
R/W
R/W
...When counter operating
R
R
R
Bit 2
Bit 1
Bit 0
Initial value
00000000
...When counter stopped
R/W
R/W
R/W
...When counter operating
R
R
R
".
H
B
B
MB89620 series

Advertisement

Table of Contents
loading

Table of Contents