(Tm1 And Tm2) Are Used As 16-Bit Timer/Event Counter; Square-Wave Output Operation Timing - NEC mPD780208 Subseries User Manual

8-bit single-chip microcontrollers
Table of Contents

Advertisement

(3) Square-wave output operation
Square-wave signals can be generated at the user-specified frequency. The frequency or pulse interval
is determined by the value preset in the 8-bit compare registers (CR10 and CR20). To set a count value,
set the value of the higher 8 bits to CR20, and the value of the lower 8 bits to CR10.
The TO2/P32 pin output status is reversed at intervals of the count value preset to CR10 and CR20 by
setting bit 4 (TOE2) of the 8-bit timer output control register (TOC1) to 1. This enables a square wave with
any selected frequency to be output.
Table 7-10. Square-Wave Output Ranges When 2-Channel 8-Bit Timer/Event Counters
TCL13
TCL12
TCL11
0
1
0
0
1
1
0
1
1
1
0
0
1
0
0
1
0
1
1
0
1
1
1
0
1
1
0
1
1
1
1
1
1
Remarks 1. f
: Main system clock oscillation frequency
X
2. TCL10 to TCL13: Bits 0 to 3 of timer clock select register 1 (TCL1)
3. Figures in parentheses apply to operation with f
Count clock
TM1
00H
TM2
00H
CR10
CR20
TO2
Count start
CHAPTER 7 8-BIT TIMER/EVENT COUNTER

(TM1 and TM2) Are Used as 16-Bit Timer/Event Counter

TCL10
Minimum Pulse Width
1
2 x 1/f
(400 ns)
X
2
0
2
x 1/f
(800 ns)
X
(1.6 µ s)
1
2
3
x 1/f
X
(3.2 µ s)
4
0
2
x 1/f
X
(6.4 µ s)
5
1
2
x 1/f
X
(12.8 µ s)
0
2
6
x 1/f
X
(25.6 µ s)
7
1
2
x 1/f
X
(51.2 µ s)
0
2
8
x 1/f
X
(102.4 µ s)
9
1
2
x 1/f
X
(204.8 µ s)
0
2
10
x 1/f
X
(819.2 µ s)
1
2
12
x 1/f
X
Figure 7-13. Square-Wave Output Operation Timing
N
N + 1
FFH 00H
01H
N
M
User's Manual U11302EJ4V0UM
Maximum Pulse Width
2
17
x 1/f
(26.2 ms)
X
18
2
x 1/f
(52.4 ms)
X
2
19
x 1/f
(104.9 ms)
X
20
2
x 1/f
(209.7 ms)
X
21
2
x 1/f
(419.4 ms)
X
2
22
x 1/f
(838.9 ms)
X
23
2
x 1/f
(1.7 s)
X
2
24
x 1/f
(3.4 s)
X
25
2
x 1/f
(6.7 s)
X
2
26
x 1/f
(13.4 s)
X
2
28
x 1/f
(53.7 s)
X
= 5.0 MHz.
X
FFH 00H
FFH 00H
01H
02H
M – 1 M
Interval time
Resolution
2 x 1/f
(400 ns)
X
2
2
x 1/f
(800 ns)
X
(1.6 µ s)
2
3
x 1/f
X
(3.2 µ s)
4
2
x 1/f
X
(6.4 µ s)
5
2
x 1/f
X
(12.8 µ s)
2
6
x 1/f
X
(25.6 µ s)
7
2
x 1/f
X
(51.2 µ s)
2
8
x 1/f
X
(102.4 µ s)
9
2
x 1/f
X
(204.8 µ s)
2
10
x 1/f
X
(819.2 µ s)
2
12
x 1/f
X
01H
N 00H
01H
00H
Level reverse
Counter clear
165

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mpd780204Mpd780206Mpd780208Mpd78p0208Mpd780204aMpd780205a ... Show all

Table of Contents