Square-Wave Output Operation (8-Bit Resolution) - NEC mPD780852 Series Preliminary User's Manual

8-bit single-chip microcontrollers
Table of Contents

Advertisement

CHAPTER 8 8-BIT TIMER/EVENT COUNTERS 2 TM2 AND 3 TM3
Figure 8-8. External Event Counter Operation Timings (with Rising Edge Specified)
TIOn
TMn count value
0000 0001 0002 0003 0004 0005
CRn
INTTMn
Remark n = 2, 3

8.4.3 Square-wave output operation (8-bit resolution)

A square wave with any selected frequency is output at intervals of the value preset to 8-bit compare register n
(CRn).
TIOn pin output status is inverted at intervals of the count value preset to CRn by setting bit 0 (TOEn) of 8-bit timer
mode control register n (TMCn) to 1. This enables a square wave with any selected frequency to be output (duty
= 50%).
[Setting]
<1> Set each register.
• Set port latch and port mode register to 0.
• TCLn: Select count clock
• CRn:
Compare value
• TMCn: Clear and start mode by match of TMn and CRn
Timer output F/F inversion enabled
Timer output enabled → TIOn = 1
<2> After TCEn = 1 is set, count operation starts.
<3> Timer output F/F is inverted by match of TMn and CRn. After INTTMn is generated, TMn is cleared to 00H.
<4> Timer output F/F is inverted at the same interval and square wave is output from TIOn.
Remark n = 2, 3
LVSn
LVRn
Timer Output F/F Status Setting
1
0
High-level output
0
1
Low-level output
Preliminary User's Manual U14581EJ3V0UM00
N – 1
N
0000 0001 0002 0003
N
131

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mpd780851Mpd780851aMpd780852aMpd78f0852

Table of Contents