English
Language : 

M16C28 Datasheet, PDF (173/423 Pages) Renesas Technology Corp – 16-BIT SINGLE-CHIP MICROCOMPUTER M16C FAMILY / M16C/Tiny SERIES
M16C/28 Group (M16C/28, M16C/28B)
13. Timer S
Table 13.6 Register Settings Associated with the Time Measurement Function
Register
Bit
Function
G1TMCRj
CTS1 to CTS0 Select time measurement trigger
DF1 to DF0
Select the digital filter function
GT, GOC, GSC Select the gate function
PR
Select the prescaler function
G1TPRk
-
Setting value of prescaler
G1FS
FSCj
Set to "1" (time measurement function)
G1FE
IFEj
Set to "1" (channel j function enabled)
j = 0 to 7 k = 6, 7
Bit configurations and function varys with channels used.
Registers associated with the time measurement function must be set after setting registers associated with the base timer.
INPC1j pin input
FFFF16
n
Base timer
p
m
000016
G1TMj register
G1IRj bit
m
n
p
When setting to "0", write "0" by program
j=0 to 7
G1IRj bit : Bits in the G1IR register
The above applies to the following condition.
The CTS1 to CTS0 bits in the G1TMCRj registers are set to "012" (rising edge). The
PR bit is set to "0" (no prescaler used) and the GT bit is set to"0" (no gate function
used).
The RTS4, RTS2, and RTS1 bits in the G1BCR0 and G1BCR1 registers are set to "0"
(no base timer reset). The UD1 to UD0 bits are set to "002" (counter increment mode).
Set the base timer to "000016" (setting the RST1 bit to "1", and the RST4 and RST2 bits to "0"),
when the base timer value matches the G1PO0 register setting. The base timer is set to "000016"
after it reaches the G1PO0 register value + 2.
Figure 13.19 Time Measurement Function (1)
Rev. 2.00 Jan. 31, 2007 page 153 of 385
REJ09B0047-0200