Timer V Application Examples; Pulse Output With Arbitrary Duty Cycle - Hitachi H8/3672 Series Hardware Manual

Single-chip microcomputer
Table of Contents

Advertisement

10.5

Timer V application examples

10.5.1

Pulse Output with Arbitrary Duty Cycle

Figure 10-9 shows an example of output of pulses with an arbitrary duty cycle.
1. Set bits CCLR1 and CCLR0 in TCRV0 so that TCNTV will be cleared by compare match with
TCORA.
2. Set bits OS3 to OS0 in TCSRV so that the output will go to 1 at compare match with TCORA
and to 0 at compare match with TCORB.
3. Set bits CKS2 to CKS0 in TCRV0 and bit ICKS0 in TCRV1 to select the desired clock source.
4. With these settings, a waveform is output without further software intervention, with a period
determined by TCORA and a pulse width determined by TCORB.
H'FF
TCORA
TCORB
H'00
TMOV
TCNTV
Figure 10-9 Pulse Output Example
Counter cleared
Rev. 1.0, 03/01, page 119 of 280

Advertisement

Table of Contents
loading

This manual is also suitable for:

H8/3672f-ztat hd64f3672H8/3670f-ztat hd64f3670

Table of Contents