p2125vps20 Renesas Electronics Corporation., p2125vps20 Datasheet - Page 284

no-image

p2125vps20

Manufacturer Part Number
p2125vps20
Description
16-bit Single-chip Microcomputer H8s Family / H8s/2100 Series
Manufacturer
Renesas Electronics Corporation.
Datasheet
Section 12 16-Bit Cycle Measurement Timer (TCM)
12.3.1
TCMCNT is a 16-bit readable/writable up-counter. The input clock is selected by the bits CKS2 to
CKS0 in TCMCR. When CKS2 to CKS0 are set to B'111, the external clock is selected. In this
case, the rising or falling edge is selected by CKSEG in TCMCR.
When TCMCNT overflows (counting changes the value from H'FFFF to H'0000), OVF in
TCMCSR is set to 1. When the CST bit in TCMCR is cleared in timer mode, TCMCR is
initialized to H'0000. In speed measurement mode, TCMCNT is cleared by detection of the first
edge (the edge selected with the IEDG bit in TCMCR) of the measurement period (two periods of
the input waveform form one measurement period).
In timer mode, TCMCNT is always writable. TCMCNT cannot be modified in speed measurement
mode. TCMCNT should always be accessed in 16-bit units and cannot be accessed in 8-bit units.
TCMCNT is initialized to H'0000.
12.3.2
TCMMLCM is a 16-bit readable/writable register. TCMMLCM is available as a compare match
register when the TCMMDS bit in TCMCR is cleared (operation is in timer mode). TCMMLCM
is available as a cycle limit register when the TCMMDS bit in TCMCR is set to 1 (operation is in
speed measurement mode).
In timer mode, the value in TCMMLCM is constantly compared with that in TCMCNT, when the
values match, CMF in TCMCSR is set to 1. However, comparison is disabled in the second half of
a cycle of writing to TCMMLCM.
In speed measurement mode, a value that sets an upper limit on the measurement period (which is
formed by two periods of the input waveform) can be set in TCMMLCM. When the third edge
(rising or falling as selected with the IEDG bit in TCMCR) of the measurement period is detected,
the value in TCMCNT is transferred to TCMICR. At this time, the values in TCMICR and
TCMMLCM are compared. The MAXOVF flag in TCMCSR is set to 1 if the value in TCMICR is
greater than that in TCMMLCM. TCMMLCM should always be accessed in 16-bit units and
cannot be accessed in 8-bit units. TCMMLCM is initialized to H'FFFF.
Rev. 1.00 Sep. 21, 2006 Page 246 of 658
REJ09B0310-0100
TCM Timer Counter (TCMCNT)
TCM Cycle Limit Register (TCMMLCM)

Related parts for p2125vps20