147
CHAPTER 7 8-BIT TIMER/EVENT COUNTER
Preliminary User’s Manual U13420EJ2V0UM00
7.4.3. Square-wave output (8-bit resolution) operation
A square wave with any selected frequency is output at intervals of the value preset to the 8-bit compare register
5n (CR5n).
TO5n pin output status is reversed at intervals of the count value preset to CR5n by setting bit 0 (TOE5n) of 8-
bit timer mode control register 5n (TMC5n) 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.
• TCL5n: Select count clock
• CR5n: Compared value
• TMC5n: Clear and Start mode by match of TM5n and CR5n
LVS5n
LVR5n
Timer output F/F status setting
1
0
High-level output
0
1
Low-level output
Timer output F/F reverse enable
Timer output enable
→
TOE5n = 1
<2> After TCE5n = 1 is set, count operation starts
<3> Timer output F/F is reversed by match of TM5n and CR5n. After INTTM5n is generated, TM5n is cleared
to 00H
<4> Timer output F/F is reversed at the same interval and square wave is output from TO5n
Remark
n = 0,1
Figure 7-9. Square-Wave Output Operation Timing
Note TO5n output initial value can be set by bits 2 and 3 (LVR5n, LVS5n) of the 8-bit timer mode control register
5n (TMC5n)
Remark
n = 0,1
Count clock
TMn count value
CR5n
TO5n
Note
Count start
00H
01H
02H
N–1
N
00H
01H
02H
N–1
N
00H
N
Содержание mPD780065 Series
Страница 2: ...Preliminary User s Manual U13420EJ2V0UM00 2 MEMO ...
Страница 10: ...10 Preliminary User s Manual U13420EJ2V0UM00 MEMO ...
Страница 22: ...22 Preliminary User s Manual U13420EJ2V0UM00 MEMO ...
Страница 134: ...134 Preliminary User s Manual U13420EJ2V0UM00 MEMO ...
Страница 154: ...154 Preliminary User s Manual U13420EJ2V0UM00 MEMO ...
Страница 160: ...160 Preliminary User s Manual U13420EJ2V0UM00 MEMO ...
Страница 186: ...186 Preliminary User s Manual U13420EJ2V0UM00 MEMO ...
Страница 326: ...326 Preliminary User s Manual U13420EJ2V0UM00 MEMO ...
Страница 342: ...342 Preliminary User s Manual U13420EJ2V0UM00 MEMO ...
Страница 350: ...350 Preliminary User s Manual U13420EJ2V0UM00 MEMO ...