Synchronization - Renesas H8/3067 Series User Manual

Renesas 16-bit single-chip microcomputer
Hide thumbs Also See for H8/3067 Series:
Table of Contents

Advertisement

9.4.3

Synchronization

The synchronization function enables two or more timer counters to be synchronized by writing
the same data to them simultaneously (synchronous preset). With appropriate TCR settings, two or
more timer counters can also be cleared simultaneously (synchronous clear). Synchronization
enables additional general registers to be associated with a single time base. Synchronization can
be selected for all channels (0 to 2).
Sample Setup Procedure for Synchronization: Figure 9.24 shows a sample procedure for
setting up synchronization.
Setup for synchronization
Select synchronization
Synchronous preset
Write to TCNT
Synchronous preset
1.
Set the SYNC bits to 1 in TSNC for the channels to be synchronized.
2.
When a value is written in TCNT in one of the synchronized channels, the same value is
simultaneously written in TCNT in the other channels (synchronized preset).
3.
Set the CCLR1 or CCLR0 bit in TCR to have the counter cleared by compare match or input capture.
4.
Set the CCLR1 and CCLR0 bits in TCR to have the counter cleared synchronously.
5.
Set the STR bits in TSTR to 1 to start the synchronized counters.
Figure 9.24 Setup Procedure for Synchronization (Example)
1
Synchronous clear
Clearing
synchronized to this
channel?
2
Yes
Select counter clear source
Start counter
Counter clear
Section 9 16-Bit Timer
No
3
Select counter clear source
5
Start counter
Synchronous clear
Rev. 4.00 Jan 26, 2006 page 371 of 938
4
5
REJ09B0276-0400

Advertisement

Table of Contents
loading

This manual is also suitable for:

H8/3067H8/3066H8/3065H8/3067rf

Table of Contents