Square-Wave Output Range With 16-Bit Resolution - NEC PD789488 User Manual

Pd789489 subseries 8-bit single-chip microcontrollers
Table of Contents

Advertisement

(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, TOE600 = 0).
<3> Set a count clock for timer 60. (see Figure 7-7)
<4> Set P31 to the output mode (PM31 = 0), set the P31 output latch to 0, and set TO60 to output enable
(TOE600 = 1). (Use of TO50 is prohibited.)
<5> Set the operation mode of timer 50 and timer 60 to 16-bit timer counter mode (see Figures 7-6 and 7-7).
<6> Set count values in CR50 and CR60.
<7> Enable the operation of TM60 (TCE60 = 1
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 continue
counting. 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-10 shows the square-wave output range, and Figure 7-21 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.
Table 7-10. Square-Wave Output Range with 16-Bit Resolution
TCL602 TCL601 TCL600
0
0
0
0
0
1
0
1
0
0
1
1
1
0
0
1
0
1
Remarks 1. f
:
Main system clock oscillation frequency
X
2. f
: External input clock frequency
TMI
3. The parenthesized values apply to operation at f
148
CHAPTER 7 8-BIT TIMERS 50, 60, AND 61
Note
Minimum Pulse Width
µ
1/f
(0.2
s)
X
2
µ
2
/f
(0.8
s)
X
f
input cycle
TMI
f
/2 input cycle
TMI
2
f
/2
input cycle
TMI
3
f
/2
input cycle
TMI
User's Manual U15331EJ4V1UD
).
Maximum Pulse Width
16
2
/f
(13.1 ms)
X
18
2
/f
(52.4 ms)
X
16
input cycle × 2
f
TMI
16
f
/2 input cycle × 2
TMI
2
16
input cycle × 2
f
/2
TMI
3
16
input cycle × 2
f
/2
TMI
= 5.0 MHz.
X
Resolution
µ
1/f
(0.2
s)
X
2
µ
2
/f
(0.8
s)
X
f
input cycle
TMI
f
/2 input cycle
TMI
2
f
/2
input cycle
TMI
3
f
/2
input cycle
TMI

Advertisement

Table of Contents
loading

This manual is also suitable for:

Pd78f9488Pd78f9489Pd789489

Table of Contents