DATA SHEET
MOS INTEGRATED CIRCUIT
m
PD784020, 784021
16/8-BIT SINGLE-CHIP MICROCOMPUTER
The
m
PD784021 is a product of the
m
PD784026 sub-series in the 78K/IV series. It contains various peripheral
hardware such as RAM, I/O ports, 8-bit resolution A/D and D/A converters, timers, serial interface, and interrupt
functions, as well as a high-speed, high-performance CPU.
The
m
PD784021 is a ROM-less product of the
m
PD784025 or
m
PD784026.
The
m
PD784020 differs from the
m
PD784021 only in its RAM size: 512 bytes are allocated for the
m
PD784020,
while 2048 bytes are allocated for the
m
PD784021.
For specific functions and other detailed information, consult the following user’s manual.
This manual is required reading for design work.
m
PD784026 Sub-Series User’s Manual, Hardware :
U10898E
78K/IV Series User’s Manual, Instruction
: U10905E
FEATURES
•
78K/IV series
•
Pin-compatible with the
m
PD78234 sub-series
•
Minimum instruction execution time: 160 ns
(at 25 MHz)
•
PWM outputs: 2
•
Standby function
HALT/STOP/IDLE mode
•
Number of I/O ports: 46
•
Timer/counters: 16-bit timer/counter
¥
3 units
16-bit timer
¥
1 unit
•
Serial interface: 3 channels
UART/IOE (3-wire serial I/O)
:2 channels
CSI (3-wire serial I/O, SBI) : 1 channel
•
•
•
•
•
Clock frequency division function
Watchdog timer : 1 channel
A/D converter
D/A converter
: 8-bit resolution
¥
8 channels
: 8-bit resolution
¥
2 channels
Supply voltage : V
DD
= 2.7 to 5.5 V
APPLICATIONS
LBP, automatic-focusing camera, PPC, printer, electronic typewriter, air conditioner, electronic musical instru-
ments, cellular telephone, etc.
This manual describes the
m
PD784021 unless otherwise specified.
The information in this document is subject to change without notice.
Document No. U11514EJ1V0DS00 (1st edition)
(Previous No.
IP-3234)
Date Published July 1996 P
Printed in Japan
The mark
H
shows major revised points.
©
1990
1996
m
PD784020, 784021
ORDERING INFORMATION
Part number
H
H
H
Package
80-pin plastic QFP (14
¥
14 mm)
80-pin plastic QFP (14
¥
14 mm)
80-pin plastic TQFP (fine pitch) (12
¥
12 mm)
Internal ROM
(bytes)
None
None
None
Internal RAM
(bytes)
512
2048
2048
m
PD784020GC-3B9
m
PD784021GC-3B9
m
PD784021GK-BE9
78K/IV SERIES PRODUCT DEVELOPMENT DIAGRAM
: Product under mass production
: Product under development
: Product under planning
Standard Products Development
µ
PD784038Y sub-series
Product containing for
an I
2
C bus interface circuit
µ
PD784038 sub-series
80-pin, 8-bit A/D, 8-bit D/A
ROM: 48K/64K/96K/128K
µ
PD784026 sub-series
80-pin, 8-bit A/D, 8-bit D/A
ROM: none/48K/64K
µ
PD784216Y sub-series
Product containing for
two I
2
C bus interface circuits
µ
PD784216 sub-series
100-pin, 8-bit A/D, 8-bit D/A
ROM: 96K/128K
µ
PD784054
80-pin, 10-bit A/D
ROM: 32K
µ
PD784046 sub-series sub-set
µ
PD784046 sub-series
80-pin, 10-bit A/D
ROM: 32K/64K
ASSP Development
µ
PD784915 sub-series
VTR servo, 100-pin, built-in
analog amplifier
ROM: 48K/62K
µ
PD784908 sub-series
100-pin, built-in IEBus
TM
ROM: 96K/128K
µ
PD784943 sub-series
80-pin, for CD-ROM
ROM: 56K
2
m
PD784020, 784021
FUNCTIONS
Product
Item
Number of basic instructions
(mnemonics)
General-purpose register
Minimum instruction execution
time
Internal
memory
Memory space
I/O ports
Total
Input
Input/output
Output
Additional
function
pins
Note
ROM
RAM
113
8 bits
¥
16 registers
¥
8 banks, or 16 bits
¥
8 registers
¥
8 banks (memory mapping)
160 ns/320 ns/640 ns/1280 ns (at 25 MHz)
None
512 bytes
Program and data: 1M byte
46
8
34
4
2048 bytes
m
PD784020
m
PD784021
Pins with pull- 32
up resistor
LED direct
drive outputs
Transistor
direct drive
8
8
4 bits
¥
2, or 8 bits
¥
1
Timer/counter 0:
(16 bits)
Timer register
¥
1
Capture register
¥
1
Compare register
¥
2
Timer register
¥
1
Capture register
¥
1
Capture/compare register
¥
1
Compare register
¥
1
Timer register
¥
1
Capture register
¥
1
Capture/compare register
¥
1
Compare register
¥
1
Timer register
¥
1
Compare register
¥
1
Pulse output capability
Ý
Toggle output
Ý
PWM/PPG output
Ý
One-shot pulse output
Pulse output capability
Ý
Real-time output (4 bits
¥
2)
Real-time output ports
Timer/counter
Timer/counter 1:
(8/16 bits)
Timer/counter 2:
(8/16 bits)
Pulse output capability
Ý
Toggle output
Ý
PWM/PPG output
Timer 3
(8/16 bits)
PWM outputs
Serial interface
A/D converter
D/A converter
Watchdog timer
Standby
Interrupt
Source
Software
Nonmaskable
Maskable
:
12-bit resolution
¥
2 channels
UART/IOE (3-wire serial I/O) : 2 channels (incorporating baud rate generator)
CSI (3-wire serial I/O, SBI) : 1 channel
8-bit resolution
¥
8 channels
8-bit resolution
¥
2 channels
1 channel
HALT/STOP/IDLE mode
23 (16 internal, 7 external (sampling clock variable input: 1)) + BRK instruction
BRK instruction
1 internal, 1 external
15 internal, 6 external
Ý
4-level programmable priority
Ý
3 operation statuses: vectored interrupt, macro service, context switching
Supply voltage
Package
V
DD
= 2.7 to 5.5 V
80-pin plastic QFP (14
¥
14 mm)
80-pin plastic TQFP (fine pitch) (12
¥
12 mm): for the
m
PD784021 only
H
H
Note
Additional function pins are included in the I/O pins.
3
m
PD784020, 784021
CONTENTS
1.
2.
3.
4.
5.
6.
DIFFERENCES BETWEEN
m
PD784026 SUB-SERIES ...........................................................
MAIN DIFFERENCES BETWEEN
m
PD784026 AND
m
PD78234 SUB-SERIES .....................
PIN CONFIGURATION (TOP VIEW) ........................................................................................
SYSTEM CONFIGURATION EXAMPLE (PPC) .......................................................................
BLOCK DIAGRAM .....................................................................................................................
LIST OF PIN FUNCTIONS ........................................................................................................
6.1
6.2
6.3
PORT PINS ......................................................................................................................................
NON-PORT PINS ............................................................................................................................
I/O CIRCUITS FOR PINS AND HANDLING OF UNUSED PINS .................................................
6
7
8
10
11
12
12
13
15
7.
CPU ARCHITECTURE ..............................................................................................................
7.1
7.2
MEMORY SPACE ...........................................................................................................................
CPU REGISTERS ............................................................................................................................
7.2.1
7.2.2
7.2.3
General-Purpose Registers ..........................................................................................
Control Registers ...........................................................................................................
Special Function Registers (SFRs) .............................................................................
18
18
21
21
22
23
8.
PERIPHERAL HARDWARE FUNCTIONS ...............................................................................
8.1
8.2
8.3
8.4
8.5
8.6
8.7
8.8
PORTS .............................................................................................................................................
CLOCK GENERATOR ....................................................................................................................
REAL-TIME OUTPUT PORT ..........................................................................................................
TIMERS/COUNTERS ......................................................................................................................
PWM OUTPUT (PWM0, PWM1) .....................................................................................................
A/D CONVERTER ...........................................................................................................................
D/A CONVERTER ...........................................................................................................................
SERIAL INTERFACE ......................................................................................................................
8.8.1
8.8.2
8.9
8.10
Asynchronous Serial Interface/Three-Wire Serial I/O (UART/IOE) .........................
Synchronous Serial Interface (CSI) .............................................................................
28
28
29
31
32
34
35
36
37
38
40
41
42
EDGE DETECTION FUNCTION .....................................................................................................
WATCHDOG TIMER .......................................................................................................................
9.
INTERRUPT FUNCTION ...........................................................................................................
9.1
9.2
9.3
9.4
9.5
INTERRUPT SOURCE ....................................................................................................................
VECTORED INTERRUPT ...............................................................................................................
CONTEXT SWITCHING ..................................................................................................................
MACRO SERVICE ...........................................................................................................................
EXAMPLES OF MACRO SERVICE APPLICATIONS ..................................................................
43
43
45
46
46
47
4
m
PD784020, 784021
10. LOCAL BUS INTERFACE .........................................................................................................
10.1
10.2
10.3
10.4
10.5
MEMORY EXPANSION ..................................................................................................................
MEMORY SPACE ...........................................................................................................................
PROGRAMMABLE WAIT ...............................................................................................................
PSEUDO-STATIC RAM REFRESH FUNCTION ...........................................................................
BUS HOLD FUNCTION ..................................................................................................................
49
49
50
51
51
51
11. STANDBY FUNCTION ..............................................................................................................
12. RESET FUNCTION ....................................................................................................................
13. INSTRUCTION SET ...................................................................................................................
14. ELECTRICAL CHARACTERISTICS .........................................................................................
15. PACKAGE DRAWINGS ............................................................................................................
16. RECOMMENDED SOLDERING CONDITIONS ........................................................................
APPENDIX A
APPENDIX B
DEVELOPMENT TOOLS ........................................................................................
RELATED DOCUMENTS .......................................................................................
52
53
54
59
80
82
83
85
H
H
5