ADVANCED AND EVER ADVANCING
MITSUBISHI ELECTRIC
MITSUBISHI 8-BIT SINGLE-CHIP MICROCOMPUTER
740 FAMILY / 38000 SERIES
38B5
Group
User’s Manual
MITSUBISHI
ELECTRIC
keep safety first in your circuit designs !
q
Mitsubishi Electric Corporation puts the maximum effort into making semiconductor
products better and more reliable, but there is always the possibility that trouble
may occur with them. Trouble with semiconductors may lead to personal injury,
fire or property damage. Remember to give due consideration to safety when
making your circuit designs, with appropriate measures such as (i) placement
of substitutive, auxiliary circuits, (ii) use of non-flammable material or (iii) prevention
against any malfunction or mishap.
Notes regarding these materials
q
These materials are intended as a reference to assist our customers in the
selection of the Mitsubishi semiconductor product best suited to the customer’s
application; they do not convey any license under any intellectual property rights,
or any other rights, belonging to Mitsubishi Electric Corporation or a third party.
q
Mitsubishi Electric Corporation assumes no responsibility for any damage, or
infringement of any third-party’s rights, originating in the use of any product
data, diagrams, charts or circuit application examples contained in these materials.
q
All information contained in these materials, including product data, diagrams
and charts, represent information on products at the time of publication of these
materials, and are subject to change by Mitsubishi Electric Corporation without
notice due to product improvements or other reasons. It is therefore recommended
that customers contact Mitsubishi Electric Corporation or an authorized Mitsubishi
Semiconductor product distributor for the latest product information before
purchasing a product listed herein.
q
Mitsubishi Electric Corporation semiconductors are not designed or manufactured
for use in a device or system that is used under circumstances in which human
life is potentially at stake. Please contact Mitsubishi Electric Corporation or an
authorized Mitsubishi Semiconductor product distributor when considering the
use of a product contained herein for any specific purposes, such as apparatus
or systems for transportation, vehicular, medical, aerospace, nuclear, or undersea
repeater use.
q
The prior written approval of Mitsubishi Electric Corporation is necessary to
reprint or reproduce in whole or in part these materials.
q
If these products or technologies are subject to the Japanese export control
restrictions, they must be exported under a license from the Japanese government
and cannot be imported into a country other than the approved destination.
Any diversion or reexport contrary to the export control laws and regulations of
JAPAN and/or the country of destination is prohibited.
q
Please contact Mitsubishi Electric Corporation or an authorized Mitsubishi
Semiconductor product distributor for further details on these materials or the
products contained therein.
Preface
This user’s manual describes Mitsubishi’s CMOS 8-
bit microcomputers 38B5 Group.
After reading this manual, the user should have a
through knowledge of the functions and features of
the 38B5 Group, and should be able to fully utilize
the product. The manual starts with specifications
and ends with application examples.
For details of software, refer to the “740 Family
Software Manual.”
For details of development support tools, refer to the
“DEVELOPMENT SUPPORT TOOLS FOR
MICROCOMPUTERS” data book.
BEFORE USING THIS USER’S MANUAL
This user’s manual consists of the following three chapters. Refer to the chapter appropriate to your conditions,
such as hardware design or software development.
1. Organization
q
CHAPTER 1 HARDWARE
This chapter describes features of the microcomputer and operation of each peripheral function.
q
CHAPTER 2 APPLICATION
This chapter describes usage and application examples of peripheral functions, based mainly on
setting examples of relevant registers.
q
CHAPTER 3 APPENDIX
This chapter includes a list of registers, and necessary information for systems development using
the microcomputer, the mask ROM confirmation (for mask ROM version), ROM programming confirmation,
and the mark specifications which are to be submitted when ordering.
2. Structure of Register
The figure of each register structure describes its functions, contents at reset, and attributes as follows:
(Note 2)
Bits
b7 b6 b5 b4 b3 b2 b1 b0
0
Bit attributes
(Note 1)
Contents immediately after reset release
CPU mode register (CPUM) [Address : 3B
16
]
b
0
1
2
3
4
5
6
7
Stack page selection bit
Name
Processor mode bits
b1 b0
Functions
0 0 : Single-chip mode
01:
Not available
10:
11:
0 : 0 page
1 : 1 page
At reset
R W
0
0
0
0
0
0
!
!
Nothing arranged for these bits. These are write disabled
bits. When these bits are read out, the contents are “0.”
Fix this bit to “0.”
Main clock division ratio selection
bits
0 0 :
φ
= X
IN
/2 (High-speed mode)
0 1 :
φ
= X
IN
/8 (Middle-speed mode)
1 0 :
φ
= X
IN
/8 (Middle-speed mode)
1 1 :
φ
= X
IN
(Double-speed mode)
b7 b6
1
0
: Bit in which nothing is arranged
: Bit that is not used for control of the corresponding function
Notes 1:
Contents immediately after reset release
0••••••“0” at reset release
1••••••“1” at reset release
Undefined••••••Undefined or reset release
T
••••••Contents determined by option at reset release
2:
Bit attributes••••••The attributes of control register bits are classified into 3 bytes : read-only, write-only
and read and write. In the figure, these attributes are represented as follows :
R••••••Read
••••••Read enabled
!••••••Read
disabled
W••••••Write
••••••Write enabled
!
••••••Write disabled
Table of contents
Table of contents
CHAPTER 1 HARDWARE
DESCRIPTION ................................................................................................................................ 1-2
FEATURES .................................................................................................................................... 1-2
APPLICATION ................................................................................................................................ 1-2
PIN CONFIGURATION .................................................................................................................. 1-2
FUNCTIONAL BLOCK .................................................................................................................. 1-3
PIN DESCRIPTION ........................................................................................................................ 1-4
PART NUMBERING ....................................................................................................................... 1-6
GROUP EXPANSION .................................................................................................................... 1-7
Memory Type ............................................................................................................................ 1-7
Memory Size ............................................................................................................................. 1-7
Package ..................................................................................................................................... 1-7
FUNCTIONAL DESCRIPTION ...................................................................................................... 1-8
Central Processing Unit (CPU) .............................................................................................. 1-8
Memory .................................................................................................................................... 1-12
I/O Ports .................................................................................................................................. 1-14
Interrupts ................................................................................................................................. 1-20
Timers ...................................................................................................................................... 1-23
Serial I/O ................................................................................................................................. 1-28
FLD Controller ........................................................................................................................ 1-40
A-D Converter ......................................................................................................................... 1-52
Pulse Width Modulation (PWM) ........................................................................................... 1-53
Interrupt Interval Determination Function ............................................................................ 1-56
Watchdog Timer ..................................................................................................................... 1-58
Buzzer Output Circucit .......................................................................................................... 1-59
Reset Circuit ........................................................................................................................... 1-60
Clock Generating Circuit ....................................................................................................... 1-62
NOTES ON PROGRAMMING ..................................................................................................... 1-65
NOTES ON USE .......................................................................................................................... 1-65
DATA REQUIRED FOR MASK ORDERS ................................................................................ 1-66
DATA REQUIRED FOR ROM WRITING ORDERS ................................................................. 1-66
ROM PROGRAMMING METHOD .............................................................................................. 1-66
MASK OPTION OF PULL-DOWN RESISTOR ......................................................................... 1-67
FUNCTIONAL DESCRIPTION SUPPLEMENT ......................................................................... 1-69
CHAPTER 2 APPLICATION
2.1 I/O port ..................................................................................................................................... 2-2
2.1.1 Memory assignment ....................................................................................................... 2-2
2.1.2 Relevant registers .......................................................................................................... 2-3
2.1.3 Terminate unused pins .................................................................................................. 2-6
2.1.4 Notes on use .................................................................................................................. 2-7
2.1.5 Termination of unused pins .......................................................................................... 2-8
2.2 Timer....................................................................................................................................... 2-10
2.2.1 Memory map ................................................................................................................. 2-10
2.2.2 Relevant registers ........................................................................................................ 2-11
38B5 Group User’s Manual
i