Synchronous Operation - Renesas H8S Series Hardware Manual

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

Advertisement

10.4.3

Synchronous Operation

In synchronous operation, the values in a number of TCNT counters can be rewritten simultaneously (synchronous
presetting). Also, a number of TCNT counters can be cleared simultaneously by making the appropriate setting in TCR
(synchronous clearing).
Synchronous operation enables TGR to be incremented with respect to a single time base.
Channels 0 to 5 can all be designated for synchronous operation.
Example of Synchronous Operation Setting Procedure: Figure 10-14 shows an example of the synchronous operation
setting procedure.
Synchronous operation
Set synchronous
Synchronous presetting
Set TCNT
<Synchronous presetting>
Set to 1 the SYNC bits in TSYR corresponding to the channels to be designated for synchronous
[1]
operation.
When the TCNT counter of any of the channels designated for synchronous operation is
[2]
written to, the same value is simultaneously written to the other TCNT counters.
Use bits CCLR2 to CCLR0 in TCR to specify TCNT clearing by input capture/output compare,
[3]
etc.
Use bits CCLR2 to CCLR0 in TCR to designate synchronous clearing for the counter clearing
[4]
source.
Set to 1 the CST bits in TSTR for the relevant channels, to start the count operation.
[5]
Example of Synchronous Operation: Figure 10-15 shows an example of synchronous operation.
In this example, synchronous operation and PWM mode 1 have been designated for channels 0 to 2, TGR0B compare
match has been set as the channel 0 counter clearing source, and synchronous clearing has been set for the channel 1 and 2
counter clearing sources.
Three-phase PWM waveforms are output from pins TIOC0A, TIOC1A, and TIOC2A. At this time, synchronous
presetting, and synchronous clearing by TGR0B compare match, is performed for channel 0 to 2 TCNT counters, and the
data set in TGR0B is used as the PWM cycle.
selection
[1]
operation
[2]
Figure 10-14 Example of Synchronous Operation Setting Procedure
Synchronous clearing
Clearing
No
source generation
channel?
Yes
Select counter
[3]
clearing source
Start count
[5]
<Counter clearing>
Set synchronous
[4]
counter clearing
Start count
[5]
<Synchronous clearing>
Rev.6.00 Oct.28.2004 page 377 of 1016
REJ09B0138-0600H

Advertisement

Table of Contents
loading

Table of Contents