Timer Control Register (Tcr) - Hitachi H8S/2628 Hardware Manual

H8s/2628 series 16-bit single-chip microcomputer
Table of Contents

Advertisement

10.3.1

Timer Control Register (TCR)

The TCR registers are 8-bit readable/writable registers that control the TCNT operation for each
channel. The TPU has a total of six TCR registers, one for each channel (channel 0 to 5). TCR
register settings should be conducted only when TCNT operation is stopped.
Bit
Bit Name
Initial value
7
CCLR2
0
6
CCLR1
0
5
CCLR0
0
4
CKEG1
0
3
CKEG0
0
2
TPSC2
0
1
TPSC1
0
0
TPSC0
0
Rev. 1.0, 09/02, page 166 of 568
R/W
Description
R/W
Counter Clear 0 to 2
R/W
These bits select the TCNT counter clearing source.
R/W
See tables 10.3 and 10.4 for details.
R/W
Clock Edge 0 and 1
R/W
These bits select the input clock edge. When the
input clock is counted using both edges, the input
clock period is halved (e.g. φ/4 both edges = φ/2
rising edge). If phase counting mode is used on
channels 1, 2, 4, and 5, this setting is ignored and the
phase counting mode setting has priority. Internal
clock edge selection is valid when the input clock is
φ/4 or slower. This setting is ignored if the input clock
is φ/1, or when overflow/underflow of another channel
is selected.
00: Count at rising edge
01: Count at falling edge
1X: Count at both edges
Legend X: Don't care
R/W
Time Prescaler 0 to 2
R/W
These bits select the TCNT counter clock. The clock
R/W
source can be selected independently for each
channel. See tables10.5 to10.10 for details.

Advertisement

Table of Contents
loading

This manual is also suitable for:

Hd64f2628Hd6432628H8s/2627Hd6432627

Table of Contents