Timer Counter (Tcnt); Timer General Register (Tgr); Timer Start Register (Tstr) - Renesas H8S/2100 Series Hardware Manual

6-bit single-chip microcomputer
Hide thumbs Also See for H8S/2100 Series:
Table of Contents

Advertisement

10.3.6

Timer Counter (TCNT)

The TCNT registers are 16-bit counters. The TPU has three TCNT counters, one for each channel.
The TCNT counters are initialized to H'0000 by a reset. The TCNT counters cannot be accessed in
8-bit units; they must always be accessed as a 16-bit unit.
10.3.7

Timer General Register (TGR)

The TGR registers are 16-bit registers with a dual function as output compare and input capture
registers. The TPU has 16 TGR registers, four for channel 0 and two each for channels 1 and 2.
TGRC and TGRD for channel 0 can also be designated for operation as buffer registers. The TGR
registers are initialized to H'FFFF by a reset. The TGR registers cannot be accessed in 8-bit units;
they must always be accessed as a 16-bit unit. TGR buffer register combinations are TGRA—
TGRC and TGRB—TGRD.
10.3.8

Timer Start Register (TSTR)

TSTR is an 8-bit readable/writable register that selects operation/stoppage for channels 0 to 2.
TCNT of a channel performs counting when the corresponding bit in TSTR is set to 1. When
setting the operating mode in TMDR or setting the count clock in TCR, first stop the TCNT
counter.
Bit
Bit Name
7 to 3
2
CST2
1
CST1
0
CST0
Initial
value
R/W
Description
0
R
Reserved
The initial value should not be changed.
0
R/W
Counter Start 2 to 0 (CST2 to CST0)
0
R/W
These bits select operation or stoppage for TCNT.
0
R/W
If 0 is written to the CST bit during operation with the
TIOC pin designated for output, the counter stops but
the TIOC pin output compare output level is retained.
If TIOR is written to when the CST bit is cleared to 0,
the pin output level will be changed to the set initial
output value.
0: TCNT_n count operation is stopped
1: TCNT_n performs count operation
(n = 2 to 0)
Section 10 16-Bit Timer Pulse Unit (TPU)
Rev. 1.00 May 09, 2008 Page 249 of 954
REJ09B0462-0100

Advertisement

Table of Contents
loading

This manual is also suitable for:

H8s/2112r

Table of Contents