Square-Wave Output Range Of Timer 50 - NEC PD789488 User Manual

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

Advertisement

(3)
Operation as square-wave output with 8-bit resolution
Square waves of any frequency can be output at an interval specified by the value preset in 8-bit compare
register nm (CRnm).
To operate timer nm for square-wave output, settings must be made in the following sequence.
<1> When using timer 50, set P30 to output mode (PM30 = 0) and the P30 output latch to 0, respectively.
When using timer 60, set P31 to output mode (PM31 = 0) and the P31 output latch to 0, respectively.
When using timer 61, set P32 to output mode (PM32 = 0) and the P32 output latch to 0, respectively.
<2> Disable operation of timer counter nm (TMnm) (TCEnm = 0).
<3> Set a count clock for timer nm (see Figures 7-6, 7-7 and 7-9)
<4> For timer 50, enable timer output of TO50 (TOE50 = 1).
For timer 60, enable timer output of TO60 (TOE600 = 1).
For timer 61, enable timer output of TO61 (TOE610 = 1).
<5> Set a count value in CRnm.
<6> Enable the operation of TMnm (TCEnm0 = 1).
When the count value of TMnm matches the value set in CRnm, the TOnm pin output will be inverted.
Through application of this mechanism, square waves of any frequency can be output. As soon as a match
occurs, TMnm is cleared to 00H and continues counting. At the same time, an interrupt request signal
(INTTMnm) is generated.
The square-wave output is cleared to 0 by setting TCEnm to 0.
Tables 7-6 to 7-8 show the square-wave output range, and Figure 7-18 shows the timing of square-wave
output.
Caution Be sure to stop the timer operation before overwriting the count clock with different data.
Remark
nm = 50, 60, 61
TCL502 TCL501 TCL500
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
: Subsystem clock oscillation frequency
XT
3. The parenthesized values apply to operation at f
CHAPTER 7 8-BIT TIMERS 50, 60, AND 61
Table 7-6. Square-Wave Output Range of Timer 50
Minimum Pulse Width
µ
1/f
(0.2
s)
X
3
µ
2
/f
(1.6
s)
X
7
µ
2
/f
(25.6
s)
X
µ
1/f
(30.5
s)
XT
Input cycle of timer 60 match
signal
Input cycle of timer 60 output
User's Manual U15331EJ4V1UD
Maximum Pulse Width
8
µ
2
/f
(51.2
s)
X
11
µ
2
/f
(409.6
s)
X
15
2
/f
(6.55 ms)
X
8
2
/f
(7.81 ms)
XT
Input cycle of timer 60 match
8
signal × 2
Input cycle of timer 60 output
8
× 2
= 5.0 MHz or f
= 32.768 kHz.
X
XT
Resolution
µ
1/f
(0.2
s)
X
3
µ
2
/f
(1.6
s)
X
7
µ
2
/f
(25.6
s)
X
µ
1/f
(30.5
s)
XT
Input cycle of timer 60 match
signal
Input cycle of timer 60 output
141

Advertisement

Table of Contents
loading

This manual is also suitable for:

Pd78f9488Pd78f9489Pd789489

Table of Contents