The 38C8 group is the 8-bit microcomputer based on the 740 family
core technology.
The 38C8 group has a LCD drive control circuit (bias control, time
sharing control), a 10-bit A-D converter, and a Serial I/O as additional
functions.
The various microcomputers in the 38C8 group include variations of
internal memory size and packaging. For details, refer to the section
on part numbering.
...................... (connect to external ceramic resonator or resistor)
●Sub-clock generating circuit
............................................. (connect to quartz-crystal oscilaltor)
●Power source voltage
In high-speed mode .................................................... 4.0 to 5.5 V
In middle-speed mode ................................................2.2 to 5.5 V
In low-speed mode ..................................................... 2.2 to 5.5 V
●Power dissipation
In high-speed mode ........................................................... 30 mW
(at 8 MHz oscillation frequency, at 5 V power source voltage)
In low-speed mode .............................................................60 µW
(at 32 kHz oscillation frequency, at 3 V power source voltage, at
WIT state, at voltage multiplier operating, LCD drive waveform
generating state)
●Operating temperature range ................................... – 20 to 85°C
APPLICATIONS
Dot-matrix-type displays
PRELIMINARY
Notice: This is not a final specification.
Some parametric limits are subject to
change.
PIN CONFIGURATION (TOP VIEW)
5
6
7
9
0
1
G3
S
E
0 61
G3
S
E
0 51
G3
S
E
0 41
8
G3
E
S
0 31
2
G3
G4
G4
G4
S
S
E
S
E
S
E
1
2
0
1
0
0
1
0
S E G3
S E G3
S E G3
S E G3
S E G2
S E G2
S E G2
S E G2
S E G2
S E G2
S E G2
S E G2
S E G2
S E G2
S E G1
S E G1
S E G1
S E G1
S E G1
S E G1
S E G1
S E G1
S E G1
S E G1
S E G9
S E G8
S E G7/ C O M2
S E G6/ C O M2
S E G5/ C O M2
S E G4/ C O M2
S E G3/ C O M1
S E G2/ C O M1
S E G1/ C O M1
SEG0/COM16
• Apply voltage of 4.0–5.5 V to VCC, and 0 V to VSS. (at high-speed mode)
• Reset input pin for active “L.”
• Input and output pins for the main clock generating circuit.
• Feedback resistor is built in between XIN pin and XOUT pin.
• Connect a ceramic resonator or a quartz-crystal oscillator between the XIN and XOUT pins to set the
oscillation frequency.
• If an external clock is used, connect the clock source to the XIN pin and leave the XOUT pin open.
• This pin determines the oscillation between XIN and XOUT. The oscillation method can be selected from
either by an oscillator or by a resistor.
• Input and output pins for sub-clock generating circuit. (Connect a quartz-crystal oscillator between the
XCIN and XCOUT pins to set the oscillation frequency . The clock generated the externals cannot be input
directly.)
• Reference voltage input pin for LCD.
• The input voltage to this pin is boosted threefold by voltage multiplier.
• LCD drive power source pins.
• LCD common output pins.
• LCD segment/common output pins.
• LCD segment output pins.
• 8-bit I/O port.
• CMOS compatible input level.
• CMOS 3-state output structure.
• 4-bit I/O port.
• CMOS compatible input level.
• CMOS 3-state output structure.
• 1-bit input port.
• CMOS compatible input level.
• 7-bit I/O port.
• CMOS compatible input level.
• CMOS 3-state output structure.
• I/O direction register allows each pin to be individually
programmed as either input or output.
• External capacitor connect pins for a voltage multiplier of LCD.
• Non-function pins.
• Leave the VSS (NC) pin open.
Function except a port function
• A-D converter analog input pin
• Key-on wake-up interrupt input pin
• A-D converter analog input pin
• External interrupt pin
• External interrupt pin
• A-D trigger input pin
•Timer function I/O pin
• Serial I/O I/O pin
4
PRELIMINARY
M
MF
X X X F P
P
R O M / P R O M
The fi
ROM
M
RAM si
Pack
R O M
b
Notice: This is not a final specification.
Some parametric limits are subject to
change.
P ART NUMBERING
r o d u c
t
3 8 C
89
MITSUBISHI MICROCOMPUTERS
38C8 Group
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER
–
age type
FP: 144P6Q-A package
n u m b e
O m i t t e d i n O n e T i m e P R O M v e r s i o n .
s i z
1 : 4 0 9 6 b y t e s
2 : 8 1 9 2 b y t e s
3 : 1 2 2 8 8 b y t e s
4 : 1 6 3 8 4 b y t e s
5 : 2 0 4 8 0 b y t e s
6 : 2 4 5 7 6 b y t e s
7 : 2 8 6 7 2 b y t e s
8 : 3 2 7 6 8 b y t e s
are reserved areas; they cannot be used.
e m o r y t y p
M : M a s k R O M v e r s i o n
E : O n e T i m e P R O M v e r s i o n
r
e
y t e
9 : 3 6 8 6 4
A : 4 0 9 6 0 b y t e s
B : 4 5 0 5 6 b y t e s
C : 4 9 1 5 2 b y t e s
D : 5 3 2 4 8 b y t e s
E : 5 7 3 4 4 b y t e s
F : 6 1 4 4 0 b y t e s
P r o d u c t s u n d e r d e v e l o p m e n t o r p l a n n i n g : t h e d e v e l o p m e n t s c h e d u l e a n d s p e c i f i c a t i o n m a y b e r e v i s e d w i t h o u t
n o t i c e . T h e d e v e l o p m e n t o f p l a n n i n g p r o d u c t s m a y b e s t o p p e d .
Fig. 4 Memory expansion plan
Currently planning products are listed below.
Table 2 Support products
Product name
M38C89MF-XXXFP
M38C89EFFP
(P) ROM size (bytes)
ROM size for User in ( )
61440 (61310)
61440 (61310)
R A M s i z e ( b y t e s )
RAM size
(bytes)
2048
2048
1,024
Package
144P6Q-A
144P6Q-A
1 , 5 3 62
Remarks
Mask ROM version
One Time PROM version
, 0 4
8
As of Dec. 2000
6
PRELIMINARY
Notice: This is not a final specification.
Some parametric limits are subject to
change.
MITSUBISHI MICROCOMPUTERS
38C8 Group
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER
FUNCTIONAL DESCRIPTION
CENTRAL PROCESSING UNIT (CPU)
The 38C8 group uses the standard 740 family instruction set. Refer
to the table of 740 family addressing modes and machine instructions or the 740 Family Software Manual for details on the instruction
set.
Machine-resident 740 family instructions are as follows:
The FST and SLW instruction cannot be used.
The STP, WIT, MUL, and DIV instruction can be used.
[Accumulator (A)]
The accumulator is an 8-bit register. Data operations such as data
transfer, etc., are executed mainly through the accumulator.
[Index Register X (X)]
The index register X is an 8-bit register. In the index addressing modes,
the value of the OPERAND is added to the contents of register X and
specifies the real address.
[Index Register Y (Y)]
The index register Y is an 8-bit register. In partial instruction, the
value of the OPERAND is added to the contents of register Y and
specifies the real address.
b7
[Stack Pointer (S)]
The stack pointer is an 8-bit register used during subroutine calls
and interrupts. This register indicates start address of stored area
(stack) for storing registers during subroutine calls and interrupts.
The low-order 8 bits of the stack address are determined by the contents of the stack pointer. The high-order 8 bits of the stack address
are determined by the stack page selection bit. If the stack page
selection bit is “0” , the high-order 8 bits becomes “0016”. If the stack
page selection bit is “1”, the high-order 8 bits becomes “0116”.
The operations of pushing register contents onto the stack and popping them from the stack are shown in Figure 6.
Store registers other than those described in Figure 6 with program
when the user needs them during interrupts or subroutine calls.
[Program Counter (PC)]
The program counter is a 16-bit counter consisting of two 8-bit registers PCH and PCL. It is used to indicate the address of the next instruction to be executed.
b0
AAccumulator
b7
b0
XIndex register X
b7
b0
YIndex register Y
b7b0
SStack pointer
b7b15b0
LProgram counterPCH
PC
b7b0
N V T B D I Z CProcessor status register (PS)
Carry flag
Zero flag
Interrupt disable flag
Decimal mode flag
Break flag
Index X mode flag
Overflow flag
Negative flag
Fig. 5 740 Family CPU register structure
7
PRELIMINARY
e
Notice: This is not a final specification.
Some parametric limits are subject to
change.
O n - g o i n g R o u t i n
MITSUBISHI MICROCOMPUTERS
38C8 Group
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER
P u s h r e t u r n a d d r e s s
o n s t a c k
POP return
address from stack
Interrupt request
M ( S )( P CH)
S ) –
( S )
M ( S )( P CL)
(S) (S)– 1
Subroutine
E x e c u t e R T S
S ) +
( S )
( P CL)M ( S )
(S) (S) + 1
( P CH)M ( S )
(Note)
(
(
M (S)(PCH)
E x e c u t e J S R
1
1
S ) –
( S )
(
1
M ( S )( P CL)
S ) –
( S )
(
1
M ( S )( P S )
S ) –
( S )
(
1
Interrupt
Service Routine
Execute RTI
S ) +
( S )
(
1
(PS)M (S)
S ) +
( S )
(
1
(PCL)M (S)
S ) +
( S )
(
1
Push return address
on stack
Push contents of processor
status register on stack
I Flag is set from “0” to “1”
Fetch the jump vector
POP contents of
processor status
register from stack
POP return
address
from stack
Note: Condition for acceptance of an interrupt Interrupt enable flag is “1”
Fig. 6 Register push and pop at interrupt generation and subroutine call
Table 3 Push and pop instructions of accumulator or processor status register
Push instruction to stack
Accumulator
Processor status register
I n t e r r u p t d i s a b l e f l a g i s “ 0 ”
PHA
PHP
(PCH)M (S)
Pop instruction from stack
PLA
PLP
8
PRELIMINARY
Notice: This is not a final specification.
Some parametric limits are subject to
change.
MITSUBISHI MICROCOMPUTERS
38C8 Group
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER
[Processor status register (PS)]
The processor status register is an 8-bit register consisting of 5 flags
which indicate the status of the processor after an arithmetic operation and 3 flags which decide MCU operation. Branch operations can
be performed by testing the Carry (C) flag , Zero (Z) flag, Overflow
(V) flag, or the Negative (N) flag. In decimal mode, the Z, V, N flags
are not valid.
•Bit 0: Carry flag (C)
The C flag contains a carry or borrow generated by the arithmetic
logic unit (ALU) immediately after an arithmetic operation. It can
also be changed by a shift or rotate instruction.
•Bit 1: Zero flag (Z)
The Z flag is set if the result of an immediate arithmetic operation
or a data transfer is “0”, and cleared if the result is anything other
than “0”.
•Bit 2: Interrupt disable flag (I)
The I flag disables all interrupts except for the interrupt
generated by the BRK instruction.
Interrupts are disabled when the I flag is “1”.
•Bit 3: Decimal mode flag (D)
The D flag determines whether additions and subtractions are
executed in binary or decimal. Binary arithmetic is executed when
this flag is “0”; decimal arithmetic is executed when it is “1”.
Decimal correction is automatic in decimal mode. Only the ADC
•Bit 4: Break flag (B)
The B flag is used to indicate that the current interrupt was
generated by the BRK instruction. The BRK flag in the processor
status register is always “0”. When the BRK instruction is used to
generate an interrupt, the processor status register is pushed
onto the stack with the break flag set to “1”.
•Bit 5: Index X mode flag (T)
When the T flag is “0”, arithmetic operations are performed
between accumulator and memory. When the T flag is “1”, direct
arithmetic operations and direct data transfers are enabled
between memory locations.
•Bit 6: Overflow flag (V)
The V flag is used during the addition or subtraction of one byte
of signed data. It is set if the result exceeds +127 to -128. When
the BIT instruction is executed, bit 6 of the memory location
operated on by the BIT instruction is stored in the overflow flag.
•Bit 7: Negative flag (N)
The N flag is set if the result of an arithmetic operation or data
transfer is negative. When the BIT instruction is executed, bit 7 of
the memory location operated on by the BIT instruction is stored
in the negative flag.
Table 4 Set and clear instructions of each bit of processor status register
Set instruction
Clear instruction
C flag
SEC
CLC
Z flag
–
–
I flag
SEI
CLI
D flag
SED
CLD
B flag
–
–
T flag
SET
CLT
V flag
–
CLV
N flag
–
–
9
PRELIMINARY
N
P
CPU
( C P U M
B
)
b
b
Notice: This is not a final specification.
Some parametric limits are subject to
change.
[CPU Mode Register (CPUM)] 003B16
The CPU mode register contains the stack page selection bit and the
internal system clock selection bit.
The CPU mode register is allocated at address 003B16.
The I/O ports P0–P3 and P41–P47 have direction registers which
determine the input/output direction of each individual pin. Each bit
in a direction register corresponds to one pin, each pin can be set to
be input port or output port.
When “0” is written to the bit corresponding to a pin, that pin becomes an input pin. When “1” is written to that bit, that pin becomes
an output pin.
If data is read from a pin set to output, the value of the port output
latch is read, not the value of the pin itself. Pins set to input are floating. If a pin set to input is written to, only the port output latch is
written to and the pin remains floating.
Pull-up Control
By setting the PULL register A (address 001616) or the PULL register
B (address 001716), ports P0 to P4 except for port P40 can control
pull-up with a program.
However, the contents of PULL register A and PULL register B do not
affect ports programmed as the output ports.
b7b0
b 7b0
PULL register A
(PULLA: address 0016
PULL register B
(PULLB: address 0017
N o t u s e d ( r e t u r n “ 0 ” w h e n r e a d )
P 41 p u l l - u p
P 4
2
p u l l - u p
P 43 p u l l - u p
P 4
4
p u l l - u p
P 45 p u l l - u p
P 46 p u l l - u p
P 4
7
p u l l - u p
16
16
0: No pull-up
1: Pull-up
)
)
Fig. 10 Structure of PULL register A and PULL register B
13
PRELIMINARY
Notice: This is not a final specification.
Some parametric limits are subject to
change.
Table 5 List of I/O port function
Pin
P00–P07
P10/AN4–
P13/AN7
P14–P17
P20–P27
P30/AN0–
P33/AN3
P40/INT0
P41/INT1
P42/CNTR0/
BEEP+
P43/CNTR1/
BEEPP44/RxD
P45/TxD
P46/SCLK
P47/SRDY
COM0–COM7,
COM8–COM
SEG0/COM16–
SEG7/COM23,
SEG60/COM31–
SEG67/COM
SEG8–SEG
24
59
Name
Port P0
Port P1
Port P2
Port P3
Port P4
Common
15
Segment/
Common
Segment
Input/Output
Input/Output,
individual bits
Input/Output,
individual bits
Input/Output,
individual bits
Input
Input/Output,
individual bits
Output
I/O format
CMOS 3-state output
CMOS compatible input
level
CMOS 3-state output
CMOS 3-state output
CMOS compatible input
level
CMOS compatible input
level
CMOS 3-state output
LCD common output
LCD segment output
LCD common ouput
LCD segment output
MITSUBISHI MICROCOMPUTERS
38C8 Group
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER
Non-port function
Key input (key-on
wake-up) interrupt input
A-D converter input
External interrupt input
Timer X function I/O
Timer Y function input
Serial I/O funtion
I/O
Related SFRs
PULL register A
PULL register A
A-D control register
PULL register A
PULL register A
Interrupt control register 2
PULL register A
A-D control register
PULL register B
Interrupt edge select
register
PULL register B
Timer X mode register
PULL register B
Timer Y mode register
PULL register B
Serial I/O control register
Serial I/O status register
UART control register
LCD mode register
Ref. No.
(1)
(2)
(1)
(1)
(2)
(3)
(1)
(4)
(5)
(6)
(7)
(8)
(9)
14
PRELIMINARY
Notice: This is not a final specification.
Some parametric limits are subject to
change.
MITSUBISHI MICROCOMPUTERS
38C8 Group
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER
( 1 ) P o r t s P 0 , P 14– P 17, P 2 , P 4
D i r e c t i o n
r e g i s t e r
D a t a b u s
P o r t l a t c h
K e y - o n w a k e - u p i n t e r r u p t i n p u t
1
i n t e r r u p t i n p u t , A D T
I N T
1
P u l l - u p c o n t r o l
E x c e p t P 0 , P 1
(3) Port P4
INT0 interrupt input
0
D a t a b u s
( 2 ) P o r ts P 10– P 13, P 3
D i r e c t i o n
r e g i s t e r
Data bus
Port latch
P u l l - u p c o n t r o l
A-D converter input
A n a l o g i n p u t p i n s e l e c t i o n b i t
( 4 ) P o r t P 4
D a t a b u s
2
D i r e c t i o n
r e g i s t e r
P o r t l a t c h
B u z z e r o u t p u t m o d e
T i m e r o u t p u t
Fig. 11 Port block diagram (1)
P u l l - u p c o n t r o l
C N T R0 i n t e r r u p t i n p u t
( 5 ) P o r t P 4
Data bus
Buzzer output mode
3
Direction
register
P o r t l a t c h
Timer output
CNTR
Pull-up control
1
interrupt input
15
PRELIMINARY
t
t
t
s
t
t
t
t
t
t
t
Notice: This is not a final specification.
Some parametric limits are subject to
change.
MITSUBISHI MICROCOMPUTERS
38C8 Group
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER
( 6 ) P o r t P 4
D a t a b u s
(8) Port P4
S e r i a l I / O s y n c h r o n o u
4
S e r i a l I / O e n a b l e b i
R e c e i v e e n a l b l e b i
D i r e c t i o n
r e g i s t e r
P o r t l a t c h
6
c l o c k s e l e c t i o n b i
S e r i a l I / O e n a b l e b i t
Serial I/O mode selection bi
Serial I/O enable bi
Direction
register
Pull-up control
S e r i a l I / O i n p u t
Pull-up control
( 7 ) P o r t P 4
P45/TxD P-channel output disable bit
D a t a b u s
(9) Port P4
S e r i a l I / O m o d e s e l e c t i o n b i
5
S e r i a l I / O e n a b l e b i
T r a n s m i t e n a b l e b i
Direction
register
P o r t l a t c h
Serial I/O output
7
S e r i a l I / O e n a b l e b i
S
R D Y
o u t p u t e n a b l e b i
Direction
register
Pull-up control
P u l l - u p c o n t r o l
Port latchData bus
Serial I/O clock output
Fig. 12 Port block diagram (2)
Serial I/O clock input
Data bus
Serial I/O ready output
P o r t l a t c h
16
Loading...
+ 35 hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.