131
CHAPTER 8 8-BIT TIMER/EVENT COUNTERS 2 TM2 AND 3 TM3
Preliminary User’s Manual U14581EJ3V0UM00
Figure 8-8. External Event Counter Operation Timings (with Rising Edge Specified)
TIOn
TMn count value
CRn
INTTMn
0000 0001 0002 0003 0004 0005
N – 1
N
0000 0001 0002 0003
N
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
LVSn
LVRn
Timer Output F/F Status Setting
1
0
High-level output
0
1
Low-level output
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
Summary of Contents for mPD780851
Page 2: ...2 Preliminary User s Manual U14581EJ3V0UM00 MEMO ...
Page 8: ...8 Preliminary User s Manual U14581EJ3V0UM00 MEMO ...
Page 12: ...12 Preliminary User s Manual U14581EJ3V0UM00 MEMO ...
Page 26: ...26 Preliminary User s Manual U14581EJ3V0UM00 MEMO ...
Page 46: ...46 Preliminary User s Manual U14581EJ3V0UM00 MEMO ...
Page 74: ...74 Preliminary User s Manual U14581EJ3V0UM00 MEMO ...
Page 90: ...90 Preliminary User s Manual U14581EJ3V0UM00 MEMO ...
Page 100: ...100 Preliminary User s Manual U14581EJ3V0UM00 MEMO ...
Page 136: ...136 Preliminary User s Manual U14581EJ3V0UM00 MEMO ...
Page 142: ...142 Preliminary User s Manual U14581EJ3V0UM00 MEMO ...
Page 186: ...186 Preliminary User s Manual U14581EJ3V0UM00 MEMO ...
Page 222: ...222 Preliminary User s Manual U14581EJ3V0UM00 MEMO ...
Page 230: ...230 Preliminary User s Manual U14581EJ3V0UM00 MEMO ...
Page 240: ...240 Preliminary User s Manual U14581EJ3V0UM00 MEMO ...
Page 262: ...262 Preliminary User s Manual U14581EJ3V0UM00 MEMO ...
Page 296: ...296 Preliminary User s Manual U14581EJ3V0UM00 MEMO ...
Page 304: ...304 Preliminary User s Manual U14581EJ3V0UM00 MEMO ...
Page 314: ...314 Preliminary User s Manual U14581EJ3V0UM00 MEMO ...