CHAPTER 7 8-BIT TIMER
158
User’s Manual U15075EJ1V0UM00
(3)
Operation as square-wave output with 16-bit resolution
Square waves of any frequency can be output at an interval specified by the count value preset in CR50 and
CR60.
To operate as a square-wave output with 16-bit resolution, settings must be made in the following sequence.
<1> Disable operation of TM50 and TM60 (TCE50 = 0, TCE60 = 0).
<2> Disable output of TO50 and TO60 (TOE50 = 0, TOE60 = 0).
<3> Set a count clock for timer 60.
<4> Select either TO60 or TO61 as the timer output pin.
If TO60 is selected: Set P32 to the output mode (PM32 = 0), set the P32 output latch to 0, and set
TO60 to output enable (TO60 = 1). (Use of TO50 is prohibited.)
If TO61 is selected: Set P33 to the output mode (PM33 = 0), set the P33 output latch to 0, and set
TO61 to output enable (TOE61 = 1). (Use of TO50 is prohibited.)
<5> Set count values in CR50 and CR60.
<6> Enable the operation of TM60 (TCE60 = 1
Note
).
Note
Start and clear of the timer in the 16-bit timer counter mode are controlled by TCE60 (the value of
TCE50 is invalid).
When the count values of TM50 and TM60 simultaneously match the values set in CR50 and CR60
respectively, the TO60 pin output will be inverted. Through application of this mechanism, square waves of
any frequency can be output. As soon as a match occurs, TM50 and TM60 are cleared to 00H and counting
continues. At the same time, an interrupt request signal (INTTM60) is generated (INTTM50 is not
generated).
The square-wave output is cleared to 0 by setting TCE60 to 0.
Table 7-8 shows the square wave output range, and Figure 7-18 shows timing of square wave output.
Cautions 1. Be sure to stop the timer operation before overwriting the count clock with different
data.
2. In the 16-bit timer counter mode, TO50 cannot be used. Be sure to set TOE50 = 0 to
disable TO50 output.
Remark
Items in parentheses are for when the TO61 pin is selected for timer output.
Table 7-8. Square-Wave Output Range with 16-Bit Resolution (During f
X
= 5.0 MHz Operation)
TCL602
TCL601
TCL600
Minimum Pulse Width
Maximum Pulse Width
Resolution
0
0
0
1/f
X
(0.2
µ
s)
2
16
/f
X
(13.1 ms)
1/f
X
(0.2
µ
s)
0
0
1
2/f
X
(0.4
µ
s)
2
17
/f
X
(26.2 ms)
2/f
X
(0.4
µ
s)
0
1
0
f
TMI
input cycle
f
TMI
input cycle
×
2
16
f
TMI
input cycle
0
1
1
f
TMI
/2 input cycle
f
TMI
/2 input cycle
×
2
16
f
TMI
/2 input cycle
1
0
0
f
TMI
/2
2
input cycle
f
TMI
/2
2
input cycle
×
2
16
f
TMI
/2
2
input cycle
1
0
1
f
TMI
/2
3
input cycle
f
TMI
/2
3
input cycle
×
2
16
f
TMI
/2
3
input cycle
Remark
f
X
: Main system clock oscillation frequency
Содержание mPD789425
Страница 2: ...2 User s Manual U15075EJ1V0UM00 MEMO ...
Страница 6: ...6 User s Manual U15075EJ1V0UM00 MEMO ...
Страница 10: ...10 User s Manual U15075EJ1V0UM00 MEMO ...
Страница 24: ...24 User s Manual U15075EJ1V0UM00 MEMO ...
Страница 36: ...36 User s Manual U15075EJ1V0UM00 MEMO ...
Страница 46: ...46 User s Manual U15075EJ1V0UM00 MEMO ...
Страница 176: ...User s Manual U15075EJ1V0UM00 176 MEMO ...
Страница 196: ...User s Manual U15075EJ1V0UM00 196 MEMO ...
Страница 210: ...User s Manual U15075EJ1V0UM00 210 MEMO ...
Страница 262: ...262 User s Manual U15075EJ1V0UM00 MEMO ...
Страница 278: ...278 User s Manual U15075EJ1V0UM00 MEMO ...
Страница 296: ...296 User s Manual U15075EJ1V0UM00 MEMO ...
Страница 298: ...User s Manual U15075EJ1V0UM00 298 MEMO ...
Страница 316: ...User s Manual U15075EJ1V0UM00 316 MEMO ...