8-Bit Timer Divided Waveform Period Measurement - Renesas H8S/2158 User Manual

16-bit single-chip microcomputer h8s family/h8s/2100 series
Table of Contents

Advertisement

Section 14 Timer Connection
14.4.3

8-Bit Timer Divided Waveform Period Measurement

The timer connection facility, TMR_1, and the free-running timer (FRT) can be used to measure
the period of an IHI signal divided waveform. Since TMR_1 can be cleared by a rising edge of the
inverted IVI signal, the rise and fall of the IHI signal divided waveform can be synchronized with
the IVI signal. This enables period measurement to be carried out efficiently.
To measure the period of an IHI signal divided waveform, TCNT in TMR_1 is set to count the
external clock (IHI signal) pulses and to be cleared on the rising edge of the external reset signal
(inverse of the IVI signal). The value to be used as the division factor is written in TCORA, and
the TMO output method is specified by the OS bits in TCSR.
Examples of TCR and TCSR settings in TMR_1, and TCR and TCSR settings in the FRT are
shown in table 14.6, and the timing chart for measurement of the IVI signal and IHI signal divided
waveform periods is shown in figure 14.5. The period of the IHI signal divided waveform is given
by (ICRD(3) – ICRD(2)) × resolution.
Rev. 3.00 Jan 25, 2006 page 361 of 872
REJ09B0286-0300

Advertisement

Table of Contents
loading

Table of Contents