The MSM66589/66P589/66Q589 is a high-speed, high-performance 16-bit microcontroller that
employs OKI original nX-8/500S CPU core.
The MSM66589/66P589/66Q589 includes a 16-bit CPU, ROM, RAM, a 10-bit A/D converter,
serial ports, flexible timers, pulse-width modulator (PWM), and I/O ports.
The MSM66Q589 is a Flash EEPROM version.
• Data memory space: 64K bytes
Internal RAM: 4K bytes
• High-speed execution
Minimum instruction execution time : 100 nsec (@ 20 MHz)
• Built-in multiplier
• Powerful instruction set: Instruction set superior in orthogonal matrix
8/16-bit data transfer instructions
8/16-bit arithmetic instructions
Multiplication and division operation instructions
Bit manipulation instructions
Bit logic instructions
ROM table reference instructions
• I/O port
Analog input only ports: 16 channels
Input-output ports: 11 ports ¥ 8 bits, 1 port ¥ 6 bits
(Each bit can be configured to be an input or output)
• Flexible timers
Free run counters: 19 bits ¥ 1, 16 bits ¥ 1
19-bit CAP with a divider: 4
16-bit double buffer RTO: 6
16-bit RTO/PWM: 2
16-bit CAP/RTO: 6
• 8-bit general timer: 1
8-bit event counter: 1
• 16-bit PWM: 8
Input clock divider: 1
• 8-bit serial ports
1/27
¡ SemiconductorMSM66589/66P589/66Q589
UART mode with BRG: 1
Synchronous/UART switchable mode
with BRG: 1
• 10-bit A/D converter: 16 channels
• Transition detector: 6
• Watchdog timer: 1
• Interrupts
Non-maskable: 1
Maskable: Internal 47/external 2
(4-level priority can be set)
P0: 8-bit input-output port. Each bit can be assigned to be an input or an output.
AD: When an external memory is used, these pins output the lower 8 bits of the address.
These pins also input or output the data.
P1: 8-bit input-output port. Each bit can be assigned to input or output.
A: When an external memory is used, these pins output the upper 8 bits of the address.
P2: 8-bit input-output port. Each bit can be assigned to input or output.
RTO: Output pin for real time output
FTM10: Capture input pin or real-time output pin
P3: 8-bit input-output port. Each bit can be assigned to input or output.
FTM11A: Capture input pin or real-time output pin
FTM11B-D: 4-port real-time output pin
CAP : Capture input pin
P4: 8-bit input-output port. Each bit can be assigned to input or output.
ETMCK: External clock input pin of 8-bit general timer
ECTCK: External clock input pin of 8-bit event counter
TRNS: Transition detector input pin
P5: 6-bit input-output port. Each bit can be assigned to input or output.
PSEN: Strobe pulse output pin to fetch to external program memory
ALE: Timing pulse output pin to latch the lower 8 bits of the address output from port 0
when the CPU accesses the external memory
P6_0/INT0
P6_1/INT1
P6_2/RXD1
P6_3/TXD1
P6_4/RXC1
P6_5/TXC1
P6_6/RXD0
P6_7/TXD0
P7_0/WR
P7_1/RD
P7_2/WAIT
P7_3/CLKOUT
P7_4-P7_7/
PWM0-PWM3
P8_0-P8_3/
PWM4-PWM7
P8_4-P8_7
P9_0/A16
P9_1-P9_7
P10_0-P10_1/
RTO12-RTO13
P10_2-P10_5/
FTM14-FTM17
P10_6-P10_7
I/O
I/O
I/O
I/O
I/O
P6: 8-bit input-output port. Each bit can be assigned to input or output.
INT0, 1: External interrupt request input pin
RXD1 : SCI1 Receiver data input pin
TXD1 : SCI1 Transmitter data output pin
RXC1 : SCI1 Receiver circuit clock pin
TXC1 : SCI1 Transmitter circuit clock pin
RXD0 : SCI0 Receiver data input pin
TXD0 : SCI0 Transmitter data output pin
P7: 8-bit input-output port. Each bit can be assigned to input or output.
WR: Write strobe output pin for external data memory
RD: Read strobe output pin for external data memory
WAIT: CPU wait request input pin when accessing external data memory
CLKOUT: Output pin to output clock pulse specified by PRPHF
PWM: PWM output pin
P8: 8-bit input-output port. Each bit can be assigned to input or output.
PWM: PWM output pin
P9: 8-bit input-output port. Each bit can be assigned to input or output.
A16: When an external program memory is used, this pin outputs the MSB of the
address.
P10: 8-bit input-output port. Each bit can be assigned to input or output.
RTO: Output pin for real time output.
FTM: Capture input pin or real-time output pin
P11_0-P11_7
I/O
P11: 8-bit input-output port. Each bit can be assigned to input or output.
5/27
¡ SemiconductorMSM66589/66P589/66Q589
PIN DESCRIPTION (Continued)
SymbolTypeDescription
AI0-AI15Analog signal input pin for A/D converter
AV
DD
V
REF
AGNDGND input pin for A/D converter
OSC0
I
I
I
Power supply input pin for A/D converter
Reference voltage input pin for A/D converter
I
I
Basic clock oscillation pin
OSC1
O
When P0, P1, P2, P7_4-P7_7, and P8-P11 are in an output state and OE pin is "H"
level, P0, P1, P2, P7_4-P7_7, and P8-P11 go to a high-impedance state.
OE
I
When P0, P1, P2, P7_4-P7_7, and P8-P11 are in an output state and OE pin is "L"
level, P0, P1, P2, P7_4-P7_7, and P8-P11 output "H" or "L" level.
However, when P0, P1, P2, P7_4-P7_7, and P8-P11 are in an input state, these
ports are not under the influence of OE pin.
Normally set to "H" level. If set to "L" level, the program memory goes into
I
I
external access mode and accesses external program memory
Power supply pin
V
EA
DD
GNDGround pin
I
6/27
¡ SemiconductorMSM66589/66P589/66Q589
CSR
TSR
70
REGISTERS
Accumulator
Control Register (CR)
Program Status Word
150
ACC
150
PSW
Bit 15 : Carry flag (CY)
Bit 14 : Zero flag (ZF)
Bit 13 : Half carry flag (HC)
Bit 12 : Data descriptor (DD)
Bit 11 : Sign flag (S)
Bit 10 : Master interrupt priority flag (MIP)
Bit 9 : Overflow flag (OV)
Bit 8 : Master interrupt enable flag (MIE)
Bit 7 : Multiply and accumulate operation bank flag (MAB)*
Bit 6 : User flag (F1)
Bit 5 : Bank common base (BCB1)*
Bit 4 : Bank common base (BCB0)*
Bit 3 : User flag (F0)
Bit 2-0 : System control base 2-0 (SCB2-0)
* Bit 7 (MAB), Bit 5 (BCB1), and Bit 4 (BCB0) can be used
as the User flag.
Program Counter
Local Register Base
System Stack Pointer
Segment Register
Code Segment Register
Table Segment Register
Pointing Register (PR)
Index Register 1
Index Register 2
Data pointer
User Stack Pointer
✩ mark in the address column indicates that there is a nonexistent bit in its register.
System Stack Pointer
Local Register Base
Program Status Word
Accumulator
Table Segment Register
ROM Window Register
ROM Ready Control Register
RAM Ready Control Register
Stop Code Acceptor
Standby Control Register
Port 0 Data Register
Port 1 Data Register
Port 2 Data Register
Port 3 Data Register
Port 4 Data Register
Port 5 Data Register
Port 6 Data Register
Port 7 Data Register
Port 0 Mode Register
Port 1 Mode Register
Port 2 Mode Register
Port 3 Mode Register
Port 4 Mode Register
Port 5 Mode Register
Port 6 Mode Register
Port 7 Mode Register
Port 8 Data Register
Port 9 Data Register
Port 10 Data Register
Port 11 Data Register