The MB89950 series of microcontrollers are mid-range of microcontroller. They are
general-purpose and high-speed products in the F2MC-8L Family series of 8-bit single-
chip microcontr ollers operating at lo w voltages . It has UA RT, PWM, LCD cont roller and etc.
This manual covers the functions and operations of the MB89950 series of microcontrollers.
Refer to the
F2MC-8L Family Software Manual
for instructions.
iii
Table of Contents
1. GENERAL ......................................................................................................................1-1
1.1 Features ...................................................................................................................1-3
1.2 Product Series .........................................................................................................1-4
The MB89950 series of single-chip compact microcontroller using the F
MC-8L core for which can operate
at high-speeds and low voltages. They contain peripheral such as timers, UART, serial interfaces, and
external interrupts, including a 168-pixel LCD controller/driver; they are best suited for use in LCD panels.
1.1Features
•
High-speed processing even at low voltages
Minimum instruction execution time: 0.8 µs/5 MHz (V
2
•
F
MC-8L family CPU core
Instruction system most suited to controller
- Multiplication and division instructions
- 16-bit arithmetic operation
- Instruction test and branch instruction
- Bit manipulation instruction, etc.
•
LCD controller/driver
- Maximum 42 segment outputs × 4 common outputs
- Built-in LCD driver split resistor
CC
= 5 V)
•
Three-channel timer unit
- 8-bit PWM timer: (usable as both reload timer and PWM timer)
- 8-bit pulse width count timer: (usable as both reload timer)
- 20-bit time-based counter
•
Two serial interfaces
- 8-bit synchronous serial interface (The transfer direction can be selected to communicate with various
equipment.)
- UART (5, 7, and 8-bit transfers possible)
•
External-interrupt input: 2 channels
- 2 channels can be used to clear the low-power consumption modes.
(An edge-detection function is provided)
•
Low-power consumption modes
- Stop mode (Oscillation stops to minimize the current consumption.)
- Sleep mode (The CPU stops to reduce current consumption to about 30% of normal.)
1– 3
GENERAL
1.2Product Series
Table 1–1 lists the types and functions of the MB89950 series of microcontrollers.
Table 1–1 Types and Functions of MB89950 Series of Microcontrollers
Model nameMB89951MB89953M B89P 955MB89PV950
Classification
ROM capacity
RAM capacity
CPU function
Port
PWM Timer
Pulse-width Counter
Timer
Serial I/O
UART
LCD controller/driver
External Interrupt
Standby Mode
Package
Operation Voltage
EPROM
*2
Mass-produced product
(Mask ROM product)
4K × 8 bits
(internal ROM)
128 × 8 bits256 × 8 bits512 × 8 bits1024 × 8 bits
Number of basic instructions:136
Instruction bit length:8 bits
Instruction length:1 to 3 bytes
Data bit length:1, 8, 16 bits
Minimum instruction execution time:0.8 µs at 5 MHz (V
Interrupt processing time:7.2 µs at 5 MHz (V
I/O port (N-ch open drain): 22 (also used as segment pin)
I/O port (N-ch open drain): 4 (two of them are also used as LCD bias pins)
I/O port (CMOS): 7 (6 used as peripheral)
Total: 33 (Maximum)
P30 to P31FN-channel open-drain type general-purpose I/O ports
P32/V1 to
P33/V2
P40EGeneral-purpose I/O ports
P41/PWMEGeneral-purpose I/O port
P42/PWC/
INT1
P43/SIEGeneral-purpose I/O port
P44/SOEGeneral-purpose I/O port
P45/SCKEGeneral-purpose I/O port
CReset I/O pin
DN-channel open-drain type general-purpose I/O ports
DN-channel open-drain type general-purpose I/O ports
DN-channel open-drain type general-purpose I/O ports
DN-channel open-drain type general-purpose I/O ports
EGeneral-purpose I/O port
This pin is connected directly to V
This pin consists of an N-ch open-drain output with a pull-up resistor and
hysteresis input. A Low l evel is pu t out from this pin. A “LOW” vo ltage o n
this port generates a RESET condition.
Also serve as LCDC controller segment outputs.
Switching between port output and segment output is performed by the
mask option every 8 bits.
Also serve as LCDC controller segment outputs.
Switching between port output and segment output is performed by the
mask option.
Also serve as LCDC controller segment outputs.
Switching between port output and segment output is performed by the
mask option.
Also serve as LCDC controller power supply.
A pull-up resistor option is provided.
Serves as PWM timer toggle output (PWM).
A pull-up resistor option is provided.
Also serves as pul se-width coun t tim er input (PWC) a nd exter nal interr upt
input (INT1). The PWC and INT1 inputs are hysteresis type. A pull-up
resistor option is provided.
Also serves as serial I/O and UART data input (SI). The SI input is
hysteresis type.
A pull-up resistor option is provided.
Also serves as serial I/O and UART data output (SO).
A pull-up resistor option is provided.
Also serves as serial I/O and UART clock input/output (SCK). The SCK
input is hysteresis type.
A pull-up resistor option is provided.
SS
with pull down resistor.
1– 8
GENERAL
Pin No
0.650.8
2627
5 to 1
64 to 57
55 to 49
9 to 67 to 10
1011
5657
2425
6 to 1
64 to
58
56 to
50
Table 1–2 Pin Description
Pin NameCircuitFunction
P46/INT0EGeneral-purpose input port
Also serves as external-interrupt input (INT0).
The input is hysteresis type.
A pull-up resistor option is provided.
SEG0 to
GFor LCDC controller segment ouput
SEG19
COM0 TO
COM3
V3-For LCD driver power supply
Vcc-Power Pin
Vss-Power (GND) Pin
79O3
80VssOFor power supply (GND)
8204
83O5
84O6
85O7
86O8
87CE
88A10OFor address output
89OEO
91A11
93A8
94A13
95A14
96VccOFor EPROM power supply
OFor address output
IFor data input78O2
IFor data input
O
OFor address output92A9
OFor address output
For ROM out put enable
The High level is output in standby mode .
For ROM output enable.
The Low level is always output.
1– 9
GENERAL
Table 1–3 Pin Description for External ROM
(Continued)
• External EPROM pins (for MB89PV950)
Pins No.Pin NameI/OFunction
65
76
81
90
N.C.—
For internal connection
Keep open.
Fig. 1.4 I/O Circuits
ClassificationCircuitRemarks
A• Crystal oscillator
X1
• Feedback resistor: About 1 M
5 V (1 to 5 MHz)
X0
Standby control signal
B• CMOS input
• Pull down resistor (N-ch)
Ω
/
R
C• Output pull-up resistor (P-ch):
Ω
• About 50 M
R
P-ch
N-ch
• Hysteresis input
(5 V)
D• N-ch open-drain output
• CMOS input
N-ch
• The segment output is optional.
1– 10
GENERAL
Fig. 1.4 I/O Circuits
(Continued)
ClassificationCircuitRemarks
E• CMOS output
• CMOS input
R
P-ch
P-ch
N-ch
• Hysteresis input
(peripheral input)
• The pull-up resistor is optional.
F• N-ch open-drain output
• CMOS input
N-ch
G• LCDC output
1– 11
1.6Handling Devices
(1) Preventing latch-up
GENERAL
Latchup may occur on CMOS ICs if voltage higher than V
or lower than VSS is applied to input and output
CC
pins other than medium to high-voltage pins or if higher than the voltage which shows on Absolute Maximum
Ratings is applied between V
and VSS.
CC
When latch-up occurs, supply current increases rapidly and might thermally damage elements. When using,
take great care not to exceed the absolute maximum ratings.
(2) Treatment of Unused Input Pins
Leaving unused input pins open could cause malfunctions. They should be connected to pull-up or pulldown resistor.
(3) Power Supply Voltage Fluctuations
Although V
power supply voltage is assured to operate within the rated, a rapid change to the IC is therefore
CC
cause malfunctions, ev en if it occurs within the rated range. Stabilizing voltage supplied of the IC is therefore
important. As stabilization guidelines, it is recommended to control power so that V
(P-P. value) will be less that 10% of the standard V
value at the commercial frequency (50 to 60 Hz) and
CC
ripple fluctuations
CC
the transient fluctuation rate will be less than 0.1 V/ms at the time of a momentary fluctuation such as when
power is switched.
(4) Precaution When Using an External Clock
Even when an external clock is used, oscillation stabilization time is required for power-on reset (option
selection) and release from stop mode.
(5) Recommended Screening Conditions
The OTPROM product should be screened by high-temperature aging before mounting.
Verify program
High-temperature aging (150°C, 48H)
Read
Mount
The programming test cannot be performed for all bits of the preprogrammed OTPROM product due to its
characteristics. Consequently, 100% programming yielding cannot be ensured.
This chapter describes each block of the CPU hardware.
CPU
0000
0080
00C0
0100
0140
H
H
H
H
Register
H
MB89951
I/O
Reserved
RAM
2.1 CPU
This section describes the memory space and register composing CPU
hardware.
2.1.1 Memory Space
F2MC-8L CPU has a memory space of 64 Kilobytes. All I/O, data, and
program areas are located in this space. The I/O area is near the lowest
address and the data area is immediately above it. The data area can be
divided into register, stack, and direct-address areas according to the
applications. The program area is located near the highest address, and
the tables of interrupt and reset vectors and vector-call instructions are at
the highest address in this area. Fig.2.1 shows the structure of the
memory space for the MB89950 series of microcontrollers.
MB89PV950
H
H
H
Register
H
I/O
RAM
0000
0080
0100
0180
H
H
H
Register
H
MB89953
I/O
RAM
0000
0080
0100
0200
0280
H
H
H
Register
H
H
MB89P955
I/O
RAM
0000
0080
0100
0200
F000
0480
H
Vacant
E000
H
ROM
Vacant
C000
H
ROM
Vacant
8000
H
ROM
Vacant
H
ROM
Fig. 2.1 Memory Space of MB89950 Series Microcontrollers
2– 3
HARDWARE CONFIGURATION
CPU
(1) I/O area
This area is where various peripherals such as control and data registers
are located. The memory map for the I/O area is given in APPENDIX A.
(2) RAM area
This area is where the static RAM is located. Addresses from
017F
(
H
0100
H
to
013F
in MB89951,
H
0100
to
H
01FF0
in MB89P955 and
H
0100
H
to
MB89PV950) are also used as the general-purpose register area. One can
access these registers through register-related instructions or just treat
them as ordinary RAM.
(3) ROM area
This area is wh ere the in ternal ROM is locate d. Addres ses from
are also used for the table of interrupt, reset and vector-call
FFFF
H
FFC0
H
to
instructions. T able 2–1 shows the correspondence between each interrupt
number or reset and the table addresses to be referenced for the MB89950
series of microcontrollers.
When the MB89950 series of microcontrollers handle 16-bit data, the data
written at the lower address is treated as the upper 8-bit data and that written
at the next address is treated as the lower 8-bit data as shown in Fig. 2.2.
Memory
MOVW ABCDH , A
ABCF
H
ABCE
H
ABCD
ABCC
H
H
H
Fig. 2.2 Arrangement of 16 bit Data in Memory Space
This is the same when 16 bits are specified by the operand during execution
of an instruction. Bits closer to the OP code are treated as the upper byte
and those next to it are treated as the lower byte. This is also the same
when the memory address or 16-bit immediate data is specified by the
operand.
After execution
1234
A
Memory
ABCF
H
34
H
ABCE
H
12
H
ABCD
ABCC
H
H
H
[Example]
MOV A, 5678
MOV A, #1234
; Extended address
H
; 16-bit immediate data
H
Assemble
XXXXH XX XX
60 56 78
XXXX
XXXX
XXXX
H
H
H
E4 12 34
XX
; Extended address
; 16-bit immediate data
Fig. 2.3 Arrangement of 16 bit Data during Execution of Instruction
Data saved in the stack by an interrupt is also treated in the same manner.
2– 5
HARDWARE CONFIGURATION
CPU
2.1.3 Internal Registers in CPU
The MB89950 series of microcontrollers have dedicated registers in the
CPU and general-purpose registers in memory. The types of dedicated
registers are as follows.
•
Program counter (PC)16-bit length register indicating the location
where instruction s ar e stored .
•
Accumulator (A)16-bit length register storing results of
operations temporarily. The lower one byte
is used to execute 8-bit data processing
instructions.
•
Temporary accumulator (T)16-bit length register where the operations
are performed between this register and the
accumulator. The lower one byte is used to
execute 8-bit data processing instructions.
•
Index register (IX)16-bit length register for index modification.
•
Extra pointer (EP)16-bit length register for indicating memory
Processor status (PS)16-bit length register where register
pointers and condition codes are stored.
16 bits
P C
A
T
IX
EP
SP
PS
Program counter
Accumulator
Temporary accumulator
Index register
Extra pointer
Stack pointer
Processor status
2– 6
HARDWARE CONFIGURATION
CPU
for a register bank pointer (RP) and 8 lower bits for a condition code register
(CCR). (See Fig. 2.4.)
The 16 bits of the processor status (PS) can be divided into 8 upper bits
1514131211109876543210
PS
RP
Vacant Vacant Vacant
RP
HINZVC
IL1, 0
CCR
Fig. 2.4 Structure of Processor Status
The RP indicates the address of the current register bank. The relationship
between the contents of the RP and the real addresses is as shown in
Figure 2.5.
Fig. 2.5 Rule for Translating Real Addresses at General-purpose Register Area
The CCR has bits indicating the results of operations and transfer data
contents, and bits controlling the CPU operation when an interrupt occurs.
- H-flagH-flag is set when a carry or a borrow out of bit 3 into bit 4
is generated as a result of operations; it is cleared in other
cases. This flag is used for decimal-correction instructions.
- I-flagAn interrupt is enabled when this flag is 1 and is disabled
when it is 0. The I-flag is 0 at reset.
- IL1 and IL0 These bits indicate the level of the currently-enabled
interrupt. The CPU executes interrupt processing only when
an interrupt with a value smaller than the value indicated by
this bit is requested.
IL1IL0Interrupt levelHigh and low
00
1
High
01
102
113
low = No interrupt
- N-flagThe N-flag is set when the most significant bit is 1 as a result
of operations; it is cleared when the MSB is 0.
2– 7
HARDWARE CONFIGURATION
CPU
- Z-flagZ-flag is set when zero is the result of operations; it is
cleared in other cases.
- V-flagV -flag is set when a two’s complement overflow occurs as a
result of operations; it is reset when an overflow does not
occur.
- C-flagC-flag is set when a carry or a borrow out of bit 7 is generated
as a result of operations; it is cleared in other cases. When
the shift instruction is executed, the value of the C- flag is
shifted out.
•
General-purpose register..... 8-bit length register where data are stored.
8-bit general-purpose registers are provided in the register banks in the
memory for storing data. Eight registers are provided per bank for and up
to 16 banks can be used for MB89953 (8 banks are provided in MB89951,
32 banks are provided in MB89P955 and MB89PV950).
The register bank pointer (RP) indicates the currently-used bank.
Note: The register banks are as follows depend on RAM area.
MB89951
MB89953
MB89P955
MB89PV950
0100
0100
0100
0100
H
H
H
H
to
to
to
to
013F
017F
01FF
01FF
8 banks
H
16 banks
H
32 banks
H
32 banks
H
Address =
0100
+ 8*(RP)
H
Memory area
Fig. 2.6 Register Bank Configuration
R0
R1
R2
R3
R4
R5
R6
R7
16 banks
2– 8
HARDWARE CONFIGURATION
CPU
Clock
oscillator
2.1.4 Clock Control Block
This block controls the standby operation and software reset.
(1) Machine clock control block diagram
(a) Machine clock control section
STPSLPSPL
Pin state
Stop
CPU operation clock
Clock control
Peripheral operation clock
From time-base timer
Power-on reset
Watchdog timer reset
External reset
Software reset
HC1
HC3
Stop release signal
Selector
Option
(b) Reset control section
Reset control
(2) Register list
Address:
0008
H
8 bits
STBC
Internal reset signal
Standby control register
2– 9
HARDWARE CONFIGURATION
CPU
0008
(3) Description of registers
The detail of each register is described below.
STBCAddress:
H
(a) Standby control register (STBC)
Bit 7Bit 6Bit 5Bit 4Bit 3Bit 2Bit 1Bit 0
Address:
0008
STPSLPSPLRST————
H
(W)(W)(R/W)(W )
(Initial value)
0001XXXX
[Bit 7] STP: Stop bit
This bit is used to specify switching CPU to the stop mode.
0
1
No operation
Stop mode
This bit is cleared at reset or stop cancellation.
0 is always read when this bit is read.
[Bit 6] SLP: Sleep bit
This bit is used to specify switching the CPU to the sleep mode.
0
1
No operation
Sleep mode
This bit is cleared at reset, sleep cancellation or stop cancellation.
0 is always read when this bit is read.
[Bit 5] SPL: Pin state specifying bit
This bit is used to specify the external pin state in the stop mode.
0
1
Holds pin state and level immediately before stop mode
High impedance
This bit is cleared at reset.
[Bit 4] RST: Software reset bit
This bit is used to specify the software reset.
0
1
Generates 4-cycle reset signal
No operation
1 is always read when this bit is read.
2– 10
HARDWARE CONFIGURATION
CPU
(4) Description of operation
(a) Low-power consumption mode
This chip has three operation modes shown in the table below. The sleep
mode and stop mode reduce the power consumption. The system clock
can be selected out of three according to the system condition to minimize
power consumption.
Table 2–2 Operating Mode of Low-power Consumption Modes
Each operating clock pulse
Oscillation
mode
RUN
SLEEP
STOPStopStopsStopsExternal interrupt
Clock
pulse
Oscillates
CPU
2.5 MHz
Stops
(5 MHz clock)
Time-base
timer
2.5 MHz2.5 MHz
peripheral
Each
Wake-up source
in each mode
Various interrupt
requests
• The SLEEP mode stops only the operating clock pulse of the CPU; other
operations are continued.
• The STOP mode stops the oscillation. Data can be held with the lowest
power consumption in this mode.
a. SLEEP mode
• Switching to Sleep mode
- Writing 1 at the SLP (bit 6) of the STBC register switches the mode to
SLEEP mode.
- The SLEEP mode is the mode to stop clock pulse operating the CPU;
only the CPU stops and the peripherals continue to operate.
- If an interrupt is requested when 1 is written at the SLP (bit 6),
instruction ex ecution continues without switching to the SLEEP mode.
- In the SLEEP mode, the contents of registers and RAM immediately
before entering the SLEEP mode are held.
• Canceling SLEEP mode
- The SLEEP mode is canceled by inputting the reset signal or
requesting an interrupt.
- When the reset signal is input during the SLEEP mode, the CPU is
switched to the reset state and the SLEEP mode is canceled.
- When an interrupt level higher than 11 is requested from a peripheral
during the SLEEP mode, the SLEEP mode is canceled.
- When the I flag and IL bit are enable after canceling, the CPU executes
the interrupt processing like an ordinary interrupt. When they are
disabled, the CPU starts processing the next instruction given before
entering the SLEEP mode.
2– 11
HARDWARE CONFIGURATION
CPU
b. STOP mode
• Switching to STOP mode
- Writing 1 at the STP (bit 7) of the STBC register switches the mode to
STOP mode.
- The STOP mode stops clock oscillation and the CPU and all
peripherals stop.
- The input/output pins and output pins in the STOP mode can be
controlled by the SPL (bit 5) of the STBC register so that they are held
in the state immediately before entering the STOP mode, or so that
they enter in the high-impedance state.
- If an interrupt is requested when 1 is written at the STP (bit 7),
instruction execution continues without switching to the STOP mode.
- In the STOP mode, the contents of registers and RAM immediately
before entering the STOP mode are held.
• Canceling STOP mode
- The STOP mode is canceled either by inputting the reset signal or by
requesting an interrupt.
- When the reset signal is input during the STOP mode, the CPU is
switched to the reset state and the STOP mode is canceled.
- When an interrupt higher than level 11 is requested from the external
interrupt circuit during the STOP mode, the STOP mode is canceled.
- When the I flag and IL bit are enabled after canceling, the CPU
executes the interrupt processing like an ordinary interrupt. When they
are disabled, the CPU starts processing the next instruction given
before entering the STOP mode.
- The oscillation stabilization time can be selected from the two types
in Table 2–3 as options.
- If the STOP mode is canceled by inputting the reset signal, the CPU
is switched to the oscillation stabilization state. Therefore, the reset
sequence is not executed unless the oscillation stabilization time is
elapsed. The oscillation stabilization time corresponds to the
optionally selected oscillation stabilization time of the main clock.
However, when Power-on reset unavailable is selected by the mask
option, the CPU is not switched to the oscillation stabilization state
even if the STOP mode is canceled by inputting the reset signal.
Table 2–3 Selection of Oscillation Stabilization Time
Oscillation
stabilization time
18
14
/f
CH
/f
CH
About 2
About 2
Oscillation stabilization
Remarks
time at 5 MHz
About 52.4 msFor crystal oscillator
About 3.28 msFor crystal oscillator
2– 12
HARDWARE CONFIGURATION
CPU
(b) State transition diagram
STOP
Clock stops.
(8)
(3)
Oscillation stabilization
waiting
(7)
SLEEP
Clock oscillates.
(5)
(4)
Clock oscillates.
(9)
RUN
(1)(2)
Power-on
(1) When power-on reset available selected
(2) When power-on reset unavailable selected
(3) After oscillation stabilizing
(4) Set STP bit to 1.
(5) Set SLP bit to 1.
(7) External reset when power-on reset unavailable selected
(8) External reset or interrupt when power-on reset available selected
(9) External reset or interrupt
2– 13
HARDWARE CONFIGURATION
CPU
(c) Reset
There are four types of reset depending on the source shown in Table 2–4.
When the power-on reset or reset during the stop state is used, the
oscillation stabilization time is needed after the oscillator starts operating.
The time-base timer controls this stabilization time. Consequently, the
operation does not start immediately even after canceling the reset.
Howev er, if P ower-on reset is not selected by the mask option, no oscillation
stabilization time is required in any state after external pins have been
released from the reset.
When setting external-reset pin to Low
When writing 0 at RST (bit 4) of STBC
When watchdog timer overflows
When turning power on
Note: A longer time than the optionally-specified oscillation stabilization
time should be allowed for reset at power-on of P ower-on reset
unavailable products. In other cases, the time is based on theorist
timing given in the
characteristics.”
MB89950 SERIES DATA SHEET
“AC
2– 14
HARDWARE CONFIGURATION
CPU
Peripheral #1
F2MC-8L bus
Test
register
GL
2.1.5 Interrupt Controller
The interrupt controller for the F2MC-8L family is located between the CPU
and each peripheral. This controller receives interrupt requests from the
peripherals, assigns priority to them. When the interrupt controller transfers
the priority to the CPU, it also decides the priority of same-level interrupts.
(1) Block diagram
CPU
2
Address decoder
Level
G
Peripheral #2
•
•
Peripheral #n
G
•
•
•
G
L
•
•
•
L
Level
•
•
•
Level
•
•
•
Level
deciding
block
G
G
Same level
priority
deciding
block
Interrupt
vector
generation
•
block
•
•
(2) Register list
Interrupt controller consists of interrupt-level registers (ILR1, 2, and 3) and
interrupt-test register (ITR).
8 bits
Address:
Address:
Address:
Address:
007C
007D
007E
007F
H
H
H
H
ILR1
ILR2
ILR3
ITR
WInterrupt level register #1
WInterrupt level register #2
WInterrupt level register #3
—Interrupt test register
2– 15
Loading...
+ 80 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.