M37212M4 MITSUBISHI | Alldatasheet

Document overview

  • Manufacturer or author: Provided By ALLDATASHEET.COM(FREE DATASHEET DOWNLOAD SITE)
  • PDF pages: 119

Technical content

  1. DESCRIPTION The M37212M6-XXXSP/FP, M37212M4/M8-XXXSP are single-chip microcomputers designed with CMOS silicon gate technology. They have a OSD, I 2C-BUS interface, and PWM, so it is useful for a chan- nel selection system for TV. The feature of the M37212EFSP/FP are similar to those of the M37212M6-XXXSP/FP except that these chips have a built-in PROM which can be written electrically. The differences between the M37212M6-XXXSP/FP and M37212M4/M8-XXXSP are the ROM size and the RAM size as shown below. Accordingly, the following de- scriptions will be for M37212M6-XXXSP/FP unless otherwise noted. 2. FEATURES l Memory size 24K bytes (M37212M6-XXXSP/FP) 32K bytes (M37212M8-XXXSP) 62K bytes (M37212EFSP/FP) 384 bytes (M37212M6-XXXSP/FP) 576 bytes (M37212M8-XXXSP) 1280 bytes (M37212EFSP/FP) (*ROM correction memory included) l The minimum instruction execution time l Subroutine nesting maximum 96 levels (M37212M4/M8-XXXSP, M37212M6-XXXSP/FP) maximum 128 levels (M37212EFSP/FP) l Programmable I/O ports (at 8 MHz oscillation frequency, VCC =5.5V, at OSD display) Note: Only M37212M8-XXXSP and M37212EFSP/FP have ROM correction function. SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER for VOLTAGE SYNTHESIZER with ON-SCREEN DISPLAY CONTROLLER M37212M4/M8–XXXSP , M37212M6–XXXSP/FP M37212EFSP/FP MITSUBISHI MICROCOMPUTERS Rev. 1.0 l OSD function (It is possible to display 3lines or more by software) Horizontal: 64 levels Vertical: 128 levels 3. APPLICATION TV

SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER for VOLTAGE SYNTHESIZER with ON-SCREEN DISPLAY CONTROLLER M37212M4/M8–XXXSP, M37212M6–XXXSP/FP M37212EFSP/FP MITSUBISHI MICROCOMPUTERS Rev. 1.0 TABLE OF CONTENTS

8.6 MULTI-MASTER I

  1. 19. ONE TIME PROM VERSIONS M37212EFSP/FP MARKING .... 93

SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER for VOLTAGE SYNTHESIZER with ON-SCREEN DISPLAY CONTROLLER M37212M4/M8–XXXSP, M37212M6–XXXSP/FP M37212EFSP/FP MITSUBISHI MICROCOMPUTERS Rev. 1.0 P 41/ SC L K/ A - D 6 XO U T H S Y N C VS Y N C P 60/ P W M 0 P 61/ P W M 1 P 62/ P W M 2 P 63/ P W M 3 P 00/ P W M 4 P 01/ P W M 5 P 40/ SO U T I N )/ A - D 7 D A P 35/ I N T 2 / A - D 4 P 34/ I N T 1 P 33/ T I M 3 P 32/ T I M 2 P 24 P 25 C N VS S XI N VS S P 52/ R P 53/ G P 54/ B P 55/ O U T 1 P 20 P 21 P 22 P 10/ O U T 2 / A - D 8 P 11/ S C L 1 P 12/ S C L 2 P 13/ S D A 1 P 14/ S D A 2 P 15/ I N T 3 / A - D 1 P 16/ A - D 2 P 30 P 31 R E S E T O S C 1 / P 36 O S C 2 / P 37 VC C P 17/ A - D 3 P 02/ P W M 6 P 03/ P W M 7 P 42/ SI N / A - D 5 P 26 P 27 P 23 P 04 P 05 P 06 P 07 M 3 7 2 1 2 M 4 / M 6 / M 8 - X X X S P , M 3 7 2 1 2 E F S P 4. PIN CONFIGURATION Outline 52P4B Fig. 4.1 Pin Configuration 1 (Top View)

SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER for VOLTAGE SYNTHESIZER with ON-SCREEN DISPLAY CONTROLLER M37212M4/M8–XXXSP, M37212M6–XXXSP/FP M37212EFSP/FP MITSUBISHI MICROCOMPUTERS Rev. 1.0 P 075 P 10/ O U T 2 / A - D 8 P 11/ S C L 1 P 12/ S C L 2 P 13/ S D A 1 P 14/ S D A 2 P 15/ I N T 3 / A - D 1 P 16/ A - D 2 P 30 P 31 R E S E T O S C 1 / P 36 O S C 2 / P 37 VC C P 17/ A - D 3 H S Y N C VS Y N C P 60/ P W M 0 P 61/ P W M 1 P 62/ P W M 2 P 63/ P W M 3 P 00/ P W M 4 P 01/ P W M 5 P 02/ P W M 6 P 03/ P W M 7 XO U T VS S P 41/ SC L K/ A - D 6 P 40/ SO U T I N )/ A - D 7 D A P 35/ I N T 2 / A - D 4 P 34/ I N T 1 P 33/ T I M 3 P 32/ T I M 2 P P 25 P 42/ SI N / A - D 5 C N VS S XI N P 26 P 27 P 52/ R P 53/ G P 54/ B P 55/ O U T 1 P 20 P 21 P 22 P 23 P 04 P 05 P 06 N C N C N C N C N C N C N C N C N C N C N C N C N C N C N C N C N C N C N C N C N C N C N C N C N C N C N C 9 2 M 3 7 2 1 2 M 6 - X X X F P , M 3 7 2 1 2 E F F P N C Outline 80P6N-A NC : Unconnected Fig. 4.2 Pin Configuration 2 (Top View)

SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER for VOLTAGE SYNTHESIZER with ON-SCREEN DISPLAY CONTROLLER M37212M4/M8–XXXSP, M37212M6–XXXSP/FP M37212EFSP/FP MITSUBISHI MICROCOMPUTERS Rev. 1.0 5. FUNCTIONAL BLOCK DIAGRAM Fig. 5.1 Functional Block Diagram of M37212 OUT1 Clock input Clock output XIN X OUT Reset input VCC V SS CNV SS Clock output for display Input ports P36, P37 OSC1 OSC2 Clock input for display INT2 INT1 P5 (4) B G R HSYNC VSYNC A-D comparator 14-bit PWM circuit 8-bit PWM circuit Accumulator A (8) Timer 4 T4 (8) Timer 3 T3 (8) Timer 2 T2 (8) Timer 1 T1 (8) Timer count source selection circuit TIM2 TIM3 Instruction register (8) Instruction decoder Control signal CRT circuit Stack pointer S (8) Index register Y (8) Index register X (8) Processor status register PS (8) 8-bit arithmetic and logical unit ROM Program counter PC L (8) Program counter PC H (8) RAM Data bus Clock generating circuit RESET Output ports P52–P5 5 Address bus SI/O(8) SIN SCLK SOUT(/IN) INT3 4142434410 9 8 7 I/O port P0 3334353637383940 P1 (8) I/O ports P10–P14 2221201945464748 P2 (8) I/O port P2 I/O ports P30, P31 18313214 P3 (6) Multi-master I C-BUS interface P0 (8) SDA SCL 49505152 21 2524 30 27 26 23 29 28 ( ) Timing output OUT2 DA 151617 P4 (3) 111213 PWM5 PWM4 PWM3 PWM2 PWM1 PWM0 PWM7 PWM6 Input ports P15–P1 7 Input ports P32–P35 P6 (4) Output ports P60–P6 3 6543 I/O ports P40, P41 Input port P42 Output for display

SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER for VOLTAGE SYNTHESIZER with ON-SCREEN DISPLAY CONTROLLER M37212M4/M8–XXXSP, M37212M6–XXXSP/FP M37212EFSP/FP MITSUBISHI MICROCOMPUTERS Rev. 1.0 6. PERFORMANCE OVERVIEW Table 6.1 Performance Overview Parameter Functions Number of basic instructions 71 Number of basic instructions 0.5 µs (the minimum instruction execution time, at 8 MHz oscillation fre quency) Instruction execution time 8 MHz (maximum) Memory size ROM M37212M4-XXXSP 16K bytes M37212M6-XXXSP/FP 24K bytes M37212M8-XXXSP 32K bytes M37212EFSP/FP 62K bytes RAM M37212M4-XXXSP 320 bytes M37212M6-XXXSP/FP 384 bytes M37212M8-XXXSP 576 bytes (ROM correction memory included) M37212EFSP/FP 1280 bytes (ROM correction memory included) OSD ROM 8 K bytes OSD RAM 96 bytes Input/Output ports P0 I/O 8-bit 5 1 (N-channel open-drain output structure, can be used as PWM output pins) P10–P14 I/O 5-bit 5 1 (CMOS input/output output structure, however, N-channel open- drain output structure, when P11–P14 are used as multi-master I2C-BUS interface, can be used as OSD output, A-D input, multi-master I2C-BUS interface) P15–P17 Input 3-bit 5 1 (can be used as INT input pin, A-D input pins) P20–P27 I/O 8-bit 5 1 (CMOS input/output structure) P30, P31 I/O 2-bit 5 1 (CMOS input/output structure) P32–P37 Input 6-bit 5 1 (can be used as external clock input pins, INT input pins, OSD display clock I/O pins, A-D input pins) P40, P41 I/O 2-bit 5 1 (N-channel open-drain output structure, can be used as serial I/O pins, A-D input pins) P42 Input 1-bit 5 1(can be used as serial input pin, A-D input pin) P52–P55 Output 4-bit 5 1 (CMOS output structure, can be used as OSD output pins) P60–P63 Output 4-bit 5 1 (N-channel open-drain output structure, can be used as PWM output pins) Serial I/O 8-bit 5 1 Multi-master I2C-BUS interface 1 (2 systems) A-D comparator 8 channels (6-bit resolution) PWM output circuit 14-bit 5 1, 8-bit 5 8 Timers 8-bit timer 5 4 Subroutine nesting 96 levels (maximum) Interrupt <14 sources> INT external interrupt 5 3, Internal timer interrupt 5 4, Serial I/O interrupt 5 1, OSD interrupt 5 1, Multi-master I2C-BUS interface interrupt 5 1, f(XIN)/4096 interrupt 5 1, VSYNC interrupt 5 1, BRK interrupt 5 1, Reset 5 1 Clock generating circuit 2 built-in circuits (externally connected a ceramic resonator or a quartz- crystal oscillator)

SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER for VOLTAGE SYNTHESIZER with ON-SCREEN DISPLAY CONTROLLER M37212M4/M8–XXXSP, M37212M6–XXXSP/FP M37212EFSP/FP MITSUBISHI MICROCOMPUTERS Rev. 1.0 Parameter Functions OSD display Number of display characters 24 characters 5 2 lines function Dot structure 12 5 16 dots Kinds of characters 254 kinds Kinds of character sizes 3 kinds Character font coloring 1 screen: 8 kinds (per character unit) Display position Horizontal: 64 levels, Vertical: 128 levels Power source voltage 5 V ± 10 % Power dissipation OSD ON 165 mW typ. (at oscillation frequency f(X IN) = 8 MHz, fOSC = 8 MHz) OSD OFF 110 mW typ. (at oscillation frequency f(X IN) = 8 MHz) In stop mode 1.65 mW (maximum) Operating temperature range –10 °C to 70 °C Device structure CMOS silicon gate process Package M37212M4/M6/M8-XXXSP, M37212EFSP 52-pin plastic molded SDIP M37212M6-XXXFP, M37212EFSP 80-pin plastic molded QFP Table 6.2 Performance Overview (continued)

SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER for VOLTAGE SYNTHESIZER with ON-SCREEN DISPLAY CONTROLLER M37212M4/M8–XXXSP, M37212M6–XXXSP/FP M37212EFSP/FP MITSUBISHI MICROCOMPUTERS Rev. 1.0 Pin Name Input/ FunctionsOutput VCC , Power source Apply voltage of 5 V ± 10 % to (typical) VCC , and 0 V to VSS . VSS. CNV SS CNV SS This is connected to VSS . RESET Reset input Input To enter the reset state, the reset input pin must be kept at a “L” for 2 µs or more (under normal VCC conditions). If more time is needed for the quartz-crystal oscillator to stabilize, this “L” condition should be maintained for the required time. XIN Clock input Input This chip has an internal clock generating circuit. To control generating frequency, an external ceramic resonator or a quartz-crystal oscillator is connected between pins XIN and XOUT Clock output Output X OUT . If an external clock is used, the clock source should be connected to the XIN pin and the XOUT pin should be left open. P00/PWM4– I/O port P0 I/O Port P0 is an 8-bit I/O port with direction register allowing each I/O bit to be individually P03/PWM7, programmed as input or output. At reset, this port is set to input mode. The output structure P04–P07 is N-channel open-drain output. (See note) PWM output Output Pins P0 0–P03 are also used as PWM output pins PWM4–PWM7 respectively. The output structure is N-channel open-drain output. P10/OUT2/ I/O port P1 I/O Port P10–P1 4 are a 5-bit I/O port and has basically the same functions as port P0. The A-D8, output structure is CMOS output. P11/SCL1, OSD output Output Pins P1 0 is also used as OSD output pin OUT2. The output structure is CMOS output. P12/SCL2, Multi-master I/O Pins P1 1–P14 are used as SCL1, SCL2, SDA1 and SDA2 respectively, when multi-master P13/SDA1, I2C-BUS interface I 2C-BUS interface is used. The output structure is N-channel open-drain output. P14/SDA2, Analog input Input P1 0 pin is also used as analog input pin A-D8. P15/INT3/ Input port P1 Input Port P1 5–P17 are a 3-bit input port and has basically the same functions as port P0. A-D1, Analog input Input Pins P1 5–P17 are also used as analog input pins A-D1 to A-D3 respectively. P16/A-D2, External interrupt Input P1 5 pin is also used as INT external interrupt input pin INT3. P17/A-D3 input P20–P27 I/O port P2 I/O Port P2 is an 8-bit I/O port and has basically the same functions as port P0. The output structure is CMOS output. (See note) P30, P31 I/O port P3 I/O Ports P3 0, P31 are a 2-bit I/O port and has basically the same functions as port P0. The output structure is CMOS output. P32/TIM2, Input port P3 Input Ports P3 2–P37 are a 6-bit input port and has basically the same functions as port P0. P33/TIM3, External clock input Input Pins P3 2, P33 are also used as external clock input pins TIM2, TIM3 respectively. P34/INT1, External interrupt Input Pins P3 4, P35 are also used as INT external interrupt input pins INT1, INT2 respectively. P35/INT2/ input A-D4, Analog input Input P3 5 pin is also used as analog input pin A-D4. P36/OSC1, Clock input for Input P3 6 pin is also used as OSD display clock input pin OSC1. P37/OSC2 OSD display Clock output for Output P3 7 pin is also used as OSD display clock output pin OSC2. The output structure is CMOS OSD display output. 7. PIN DESCRIPTION Table 7.1 Pin Description

SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER for VOLTAGE SYNTHESIZER with ON-SCREEN DISPLAY CONTROLLER M37212M4/M8–XXXSP, M37212M6–XXXSP/FP M37212EFSP/FP MITSUBISHI MICROCOMPUTERS Rev. 1.0 Note : Port Pi (i = 0 to 3) has the port Pi direction register which can be used to program each bit as an input (“0”) or an output (“1”). The pins programmed as “1” in the direction register are output pins. When pins are programmed as “0,” they are input pins. When pins are programmed as output pins, the output data are written into the port latch and then output. When data is read from the output pins, the output pin level is not read but the data of the port latch is read. This allows a previously-output value to be read correctly even if the output “L” voltage has risen, for example, because a light emitting diode was directly driven. The input pins are in the floating state, so the values of the pins can be read. When data is written into the input pin, it is written only into the port latch, while the pin remains in the floating state. Pin Name Input/ FunctionsOutput P40/SOUT(/IN)/ I/O port P4 I/O Ports P4 0, P41 are a 2-bit I/O port and has basically the same functions as port P0. The A-D7, output structure is N-channel open-drain output. P41/SCLK / Serial I/O data I/O Pin P4 0 is also used as serial I/O data input/output pin SOUT(/IN). The output structure is N- A-D6, input/output channel open-drain output. Serial I/O synchronizing I/O Pin P4 1 is also used as serial I/O synchronizing clock input/output pin SCLK . The output clock input/output structure is N-channel open-drain output. Analog input pin Input Pin P4 0, P41 are also used as analog input pins A-D7, A-D6 respectively. P42/SIN/ Input port P4 Input Port P4 2 is a 1-bit input port and has basically the same functions as port P0. A-D5, Serial I/O data Input Pin P4 2 is also used as serial I/O data input pin SIN. input Analog input Input Pin P4 2 is also used as analog input pin A-D5. P52/R, Output port P5 Output Ports P5 2–P55 are a 4-bit output port and has basically the same functions as port P0. The P53/G, output structure is CMOS output. P54/B, OSD output Output Pins P5 2–P55 are also used as OSD output pins R, G, B, OUT1 respectively. The output P55/OUT1 structure is CMOS output. P60PWM0– Output port P6 Output Ports P6 0–P63 are a 4-bit I/O port and has basically the same functions as port P0. The P63/PWM3 output structure is N-channel open-drain output. PWM output Output Pins P6 0–P63 are also used as PWM output pins PWM0–PWM3 respectively. The output structure is N-channel open-drain output. H SYNC H SYNC input Input This is a horizontal synchronizing signal input for OSD. VSYNC VSYNC input Input This is a vertical synchronizing signal input for OSD. DA DA output Output This is a 14-bit PWM output pin. Table 7.2 Pin Description (continued)

SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER for VOLTAGE SYNTHESIZER with ON-SCREEN DISPLAY CONTROLLER M37212M4/M8–XXXSP, M37212M6–XXXSP/FP M37212EFSP/FP MITSUBISHI MICROCOMPUTERS Rev. 1.0 Fig. 7.1 I/O Pin Block Diagram (1) CMOS output Ports P10, P2, P30, P31 Note :Port P10 is also used as OUT2/ A-D8. N-channel open-drain output Ports P40, P41 Note :Each port is also used as follows : P40 : SOUT(/IN)/A-D7 P41 : SCLK /A-D6 N-channel open-drain output Port P0 Note :Each port is also used as follows : P00–P03 : PWM4–PWM7 Port P0 Data bus Direction register Port latch Ports P10, P2, P30, P31 Data bus Direction register Port latch Ports P40, P41 Data bus Direction register Port latch SIN, SCLK Ports P11–P14 Data bus Direction register Port latch I2C-BUS clock I2C-BUS data BSEL0 BSEL1 SCL1, SCL2, SDA1, SDA2 N-channel open-drain output CMOS output Ports P11–P14 Notes 1:Each port is also used as follows : P11 : SCL1 P12 : SCL2 P13 : SDA1 P14 : SDA2 2:The output structure of ports P11– P14 is N-channel open-drain output when using as multi-master I2C- BUS interface (it is the same with ports P40 and P41).

SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER for VOLTAGE SYNTHESIZER with ON-SCREEN DISPLAY CONTROLLER M37212M4/M8–XXXSP, M37212M6–XXXSP/FP M37212EFSP/FP MITSUBISHI MICROCOMPUTERS Rev. 1.0 Ports P16, P17 Note :Each port is also used as follows : P16 : A-D2 P17 : A-D3 Schmidt input Ports P15, P32–P37, P42 Note :Each port is also used as follows : P15 : INT3/A-D1 P32 : TIM2 P33 : TIM3 P34 : INT1 P35 : INT2/A-D4 P36 : OSC1 P37 : OSC2 P42 : SIN/A-D5 Fig. 7.2 I/O Pin Block Diagram (2) N-chanel open drain output Ports P60–P63 Note :Each port is also used as follows : P60–P63 : PWM0–PWM3 CMOS output Ports D-A, R, G, B, OUT1, OUT2 Note :Each pin is also used as follows : R : P5 G : P53 B : P54 OUT1 : P55 OUT2 : P10/A-D8 Internal circuit D-A, R, G, B, OUT1 , OUT2 Data bus Ports P15, P32–P37, P42 TIM2, TIM3, INT1, INT2, SIN, INT3 Data bus Ports P16, P17 Data bus Ports P60–P63 Port latch H SYNC , VSYNC Internal circuit Schmidt input Ports HSYNC , VSYNC

SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER for VOLTAGE SYNTHESIZER with ON-SCREEN DISPLAY CONTROLLER M37212M4/M8–XXXSP, M37212M6–XXXSP/FP M37212EFSP/FP MITSUBISHI MICROCOMPUTERS Rev. 1.0 8. FUNCTIONAL DESCRIPTION

8.1 CENTRAL PROCESSING UNIT (CPU)

This microcomputer uses the standard 740 Family instruction set. Refer to the table of 740 Family addressing modes and machine instructions or the SERIES 740 <Software> User’s Manual for de- tails on the instruction set. Machine-resident 740 Family instructions are as follows: The FST, SLW instruction cannot be used. The MUL, DIV, WIT and STP instructions can be used.

8.1.1 CPU Mode Register

The CPU mode register contains the stack page selection bit and internal system clock selection bit. The CPU mode register is allo- cated at address 00FB 16. Fig. 8.1.1 CPU Mode Register b 7b 6b 5b 4b 3 b 2b 1b 0 B A f t e r r e s e t RW C P U M o d e R e g i s t e r 0 , 1 3 t o 7 I n d e t e r m i n a t e I n d e t e r m i n a t e N a m eF u n c t i o n s F i x t h e s e b i t s t o “ 1 . ” 1S t a c k p a g e s e l e c t i o n b i t C M ) ( S e e n o t e 0 : 0 p a g e p a g e 1 00 C P U m o d e r e g i s t e r ( C M ) [ A d d r e s s 0 0 F B1 R W RW R W N o t e : T h i s b i t i s s e t t o “ 1 ” a f t e r t h e r e s e t r e l e a s e . 111 F i x t h e s e b i t s t o “ 0 . ”

SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER for VOLTAGE SYNTHESIZER with ON-SCREEN DISPLAY CONTROLLER M37212M4/M8–XXXSP, M37212M6–XXXSP/FP M37212EFSP/FP MITSUBISHI MICROCOMPUTERS Rev. 1.0

8.2 MEMORY

8.2.1 Special Function Register (SFR) Area

The special function register (SFR) area in the zero page contains control registers such as I/O ports and timers.

8.2.2 RAM

RAM is used for data storage and for stack area of subroutine calls and interrupts.

8.2.3 ROM

ROM is used for storing user programs as well as the interrupt vector area.

8.2.4 OSD RAM

RAM for display is used for specifying the character codes and col- ors to display.

8.2.5 OSD ROM

ROM for display is used for storing character data.

8.2.6 Interrupt Vector Area

The interrupt vector area contains reset and interrupt vectors.

8.2.7 Zero Page

The 256 bytes from addresses 000016 to 00FF16 are called the zero page area. The internal RAM and the special function registers (SFR) are allocated to this area. The zero page addressing mode can be used to specify memory and register addresses in the zero page area. Access to this area with only 2 bytes is possible in the zero page addressing mode.

8.2.8 Special Page

The 256 bytes from addresses FF0016 to FFFF16 are called the spe- cial page area. The special page addressing mode can be used to specify memory addresses in the special page area. Access to this area with only 2 bytes is possible in the special page addressing mode.

8.2.9 ROM Correction Memory (RAM)

This is used as the program area for ROM correction. Note: Only M37212M8-XXXSP and M37212EFSP/FP have ROM correction memory. Fig. 8.2.1 Memory Map (M37212M4/M8-XXXSP, M37212M6-XXXSP/FP) 0 0 0 01 0 0 C 01 0 0 F F1 0 6 B 71 F F F F1 F F D E1 F F 0 01 0 6 0 01 1 1 F F F1

1 F F F F1

b y t e s S e e n o t e 0 1 7 F1 0 1 B F1 1 0 0 0 01 O S D R O M K b y t e s S F R a r e a I n t e r r u p t v e c t o r a r e a S p e c i a l p a g e Z e r o p a g e N o t e : R e f e r t o T a b l e 8 . 1 0 . 3 O S D R A M . 0 1 0 01 0 0 B F1 N o t u s e d A 0 0 01 N o t u s e d C 0 0 01 N o t u s e d M 3 7 2 1 2 M 6 - X X X S P F P R A M b y t e s M 3 7 2 1 2 M 4 - X X X S P R A M b y t e s M 3 7 2 1 2 M 6 - X X X S P F P R O M K b y t e s M 3 7 2 1 2 M 4 - X X X S P R O M K b y t e s n M M M X X X S P M M X X X S P F P

SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER for VOLTAGE SYNTHESIZER with ON-SCREEN DISPLAY CONTROLLER M37212M4/M8–XXXSP, M37212M6–XXXSP/FP M37212EFSP/FP MITSUBISHI MICROCOMPUTERS Rev. 1.0 Fig. 8.2.2 Memory Map (M37212M8-XXXSP, M37212EFSP/FP) 0 0 0 01 0 0 C 01 0 0 F F1 0 6 B 71 F F F F1 F F D E1 F F 0 01 0 6 0 01 1 1 F F F1 b y t e s S e e n o t e M 3 7 2 1 2 E F S P R A M b y t e s 0 8 0 01 1 0 0 0 01 O S D R O M K b y t e s 0 2 C 01 S F R a r e a I n t e r r u p t v e c t o r a r e a S p e c i a l p a g e Z e r o p a g e N o t u s e d N o t e : R e f e r t o T a b l e 8 . 1 0 . 3 O S D R A M 0 2 1 71 0 2 1 B1 R O M c o r r e c t i o n f u n c t i o n V e c t o r a d d r e s s C V e c t o r a d d r e s s E 0 1 0 01 0 0 B F1 0 5 F F1 N o t u s e d 0 2 E 01 M 3 7 2 1 2 M 8 - X X X S P R A M b y t e s 0 1 F F1 N o t u s e d N o t u s e d 0 3 3 F1 2 p a g e r e g i s t e r M 3 7 2 1 2 E F S P R O M K b y t e s M 3 7 2 1 2 M 8 - X X X S P R O M K b y t e s 8 0 0 01 n M M X X X S P M E F S P F P

SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER for VOLTAGE SYNTHESIZER with ON-SCREEN DISPLAY CONTROLLER M37212M4/M8–XXXSP, M37212M6–XXXSP/FP M37212EFSP/FP MITSUBISHI MICROCOMPUTERS Rev. 1.0 Fig. 8.2.3 Memory Map of Special Function Register (SFR) (1) n S F R a r e a a d d r e s s e s C t o D D 01 D 11 D 21 D 31 D 41 D 51 D 61 D 71 D 81 D 91 D A1 D B1 D C 1 D D 1 D E1 D F1 C 01 C 11 C 21 C 31 C 41 C 51 C 61 C 71 C 81 C 91 C B1 C C 1 C D 1 C E1 C F1 C A1 A d d r e s s P o r t P 5 ( P 5 ) P o r t P 5 d i r e c t i o n r e g i s t e r ( D 5 ) D A - H r e g i s t e r ( D A - H ) D A - L r e g i s t e r ( D A - L ) P W M 0 r e g i s t e r ( P W M 0 ) P o r t P 1 ( P 1 ) P o r t P 1 d i r e c t i o n r e g i s t e r ( D 1 ) P o r t P 3 ( P 3 ) P o r t P 3 d i r e c t i o n r e g i s t e r ( D 3 ) P o r t P 2 ( P 2 ) P o r t P 2 d i r e c t i o n r e g i s t e r ( D 2 ) R e g i s t e r P o r t P 0 ( P 0 ) P o r t P 0 d i r e c t i o n r e g i s t e r ( D 0 ) P W M 1 r e g i s t e r ( P W M 1 ) P W M 2 r e g i s t e r ( P W M 2 ) P W M 3 r e g i s t e r ( P W M 3 ) P W M 4 r e g i s t e r ( P W M 4 ) P W M o u t p u t c o n t r o l r e g i s t e r 1 ( P W ) b 7 b 0 B i t a l l o c a t i o n S t a t e i m m e d i a t e l y a f t e r r e s e t 0 01 b 7 b 0 0 01 0 01 0? ???0 0 S e r i a l I / O m o d e r e g i s t e r ( S M ) S e r i a l I / O r e g i s t e r ( S I O ) 0 01 P o r t P 6 ( P 6 ) P W M o u t p u t c o n t r o l r e g i s t e r 2 ( P N ) I2C d a t a s h i f t r e g i s t e r S I2C c o n t r o l r e g i s t e r S D I2C c l o c k c o n t r o l r e g i s t e r S I2C s t a t u s r e g i s t e r S I2C a d d r e s s r e g i s t e r S D P 5 2 S E L 00P 5 3 S E L P 5 4 S E L P 5 5 S E L P 5 2P 5 3P 5 4P 5 5 P 3 1 DP 3 0 D 0 ?000 ??0 P W 0P W 1P W 2P W 3P W 4P W 5P W 6P W 7 P N 2P N 3P N 4 0 01 0 01 0 F1 S A D 0S A D 1S A D 2S A D 3S A D 4S A D 5S A D 6 R B W L R BA D 0A A SA LP I NB BT R XM S T B C 0B C 1B C 2E S OA L SB S E L 0B S E L 1 1 0 B I T S A D D 1D 2D 3D 4D 5D 6D 7D 0 0 01 0 01 S M 0S M 1S M 2S M 3S M 5S M 6 0 C C R 0C C R 1C C R 2C C R 3C C R 4A C K F A S T M O D E A C K B I T 0 01 0 01 00 ?00010 : F i x t o t h i s b i t t o “ 0 ” d o n o t w r i t e t o B i t a l l o c a t i o n S t a t e i m m e d i a t e l y a f t e r r e s e t F u n c t i o n b i t : N o f u n c t i o n b i t : F i x t o t h i s b i t t o “ 1 ” d o n o t w r i t e t o N a m e : : “ 0 ” i m m e d i a t e l y a f t e r r e s e t : I n d e t e r m i n a t e i m m e d i a t e l y a f t e r r e s e t : “ 1 ” i m m e d i a t e l y a f t e r r e s e t P o r t P 4 ( P 4 ) P o r t P 4 d i r e c t i o n r e g i s t e r ( D 4 ) P N 0P N 1 P 4 1 DP 4 0 D P 4 1P 4 0 P 6 1P 6 0P 6 2 0 ?000 ??0 0 01 0 F1 P 6 3 1111

SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER for VOLTAGE SYNTHESIZER with ON-SCREEN DISPLAY CONTROLLER M37212M4/M8–XXXSP, M37212M6–XXXSP/FP M37212EFSP/FP MITSUBISHI MICROCOMPUTERS Rev. 1.0 Fig. 8.2.4 Memory Map of Special Function Register (SFR) (2) F 01 F 11 F 21 F 31 F 41 F 51 F 61 F 71 F 81 F 91 F A1 F B1 F C 1 F D 1 F E1 F F1 E 01 E 11 E 21 E 31 E 41 E 51 E 61 E 71 E 81 E 91 E B1 E C 1 E D 1 E E1 E F1 E A1

6 C R T c o n t r o l r e g i s t e r ( C C )

C R T p o r t c o n t r o l r e g i s t e r ( C R T P ) A - D m o d e r e g i s t e r ( A D M ) A - D c o n t r o l r e g i s t e r ( A D C ) T i m e r 1 ( T 1 ) V e r t i c a l p o s i t i o n r e g i s t e r 2 ( C V 2 ) C o l o r r e g i s t e r 0 ( C O 0 ) C o l o r r e g i s t e r 1 ( C O 1 ) C h a r a c t e r s i z e r e g i s t e r ( C S ) B o r d e r s e l e c t i o n r e g i s t e r ( M D ) H o r i z o n t a l p o s i t i o n r e g i s t e r ( H R ) V e r t i c a l p o s i t i o n r e g i s t e r 1 ( C V 1 ) T i m e r 2 ( T 2 ) T i m e r 3 ( T 3 ) T i m e r 4 ( T 4 ) T i m e r 1 2 m o d e r e g i s t e r ( T 1 2 M ) T i m e r 3 4 m o d e r e g i s t e r ( T 3 4 M ) P W M 5 r e g i s t e r ( P W M 5 ) I n t e r r u p t i n p u t p o l a r i t y r e g i s t e r ( R E ) I n t e r r u p t r e q u e s t r e g i s t e r 1 ( I R E Q 1 ) I n t e r r u p t r e q u e s t r e g i s t e r 2 ( I R E Q 2 ) I n t e r r u p t c o n t r o l r e g i s t e r 1 ( I C O N 1 ) I n t e r r u p t c o n t r o l r e g i s t e r 2 ( I C O N 2 ) C o l o r r e g i s t e r 2 ( C O 2 ) C o l o r r e g i s t e r 3 ( C O 3 ) C R T c l o c k s e l e c t i o n r e g i s t e r ( C K ) C P U m o d e r e g i s t e r ( C M ) b 7 b 0 C C C C T 3 4 M 0 C M 2 T M 1 RT M 2 RT M 3 RT M 4 RO S D RV S C RI T 3 R C K 0M S R I T 1 RI T 2 RS 1 R T M 1 ET M 2 ET M 3 ET M 4 EO S D EV S C EI T 3 E I T 1 EI T 2 ES 1 EM S E b 7 b 0 F F1 0 71 F F1 0 71 001 11 11 0 01 0 01 0 01 0 01 FC 1 0 01 0 01 0 01 P W M 6 r e g i s t e r ( P W M 6 ) P W M 7 r e g i s t e r ( P W M 7 ) I I C R R E3R E4 H R 0H R 1H R 2H R 3H R 4H R 5 C V 1 0 C S 1 0C S 1 1C S 2 0C S 2 1 M D 1 0M D 2 0 C C V S Y CR / G / BO U T 2O P 5 O U T 1O P 6H S Y C A D M0 A D C0 0 01 000 0?0?0 000 ????0 0 01 0 01 n S F R a r e a a d d r e s s e s E t o F A d d r e s s R e g i s t e r B i t a l l o c a t i o nS t a t e i m m e d i a t e l y a f t e r r e s e t : F i x t o t h i s b i t t o “ 0 ” d o n o t w r i t e t o B i t a l l o c a t i o n S t a t e i m m e d i a t e l y a f t e r r e s e t F u n c t i o n b i t : N o f u n c t i o n b i t : F i x t o t h i s b i t t o “ 1 ” d o n o t w r i t e t o N a m e : : “ 0 ” i m m e d i a t e l y a f t e r r e s e t : I n d e t e r m i n a t e i m m e d i a t e l y a f t e r r e s e t : “ 1 ” i m m e d i a t e l y a f t e r r e s e t I I C E

00 R E5

T 3 4 M 1T 3 4 M 2T 3 4 M 3T 3 4 M 4T 3 4 M 5 T 1 2 M 0T 1 2 M 1T 1 2 M 2T 1 2 M 3T 1 2 M 40 A D C1A D C2A D C3A D C4A D C5 A D M1A D M2A D M4 00 C K0C O P 7 C O 3 1C O 3 2C O 3 3C O 3 5C O 3 4C O 3 6C O 3 7 C O 2 1C O 2 2C O 2 3C O 2 5C O 2 4C O 2 6C O 2 7 C O 1 1C O 1 2C O 1 3C O 1 5C O 1 4C O 1 6C O 1 7 C O 0 1C O 0 2C O 0 3C O 0 5C O 0 4C O 0 6C O 0 7 C V 1 1C V 1 2C V 1 3C V 1 4C V 1 5C V 1 6 C V 2 0C V 2 1C V 2 2C V 2 3C V 2 4C V 2 5C V 2 6 0 01 0 01 0 01 0 01 0 01 ?00 00000 0 01 0 01 0000 ?00 0 000 0

SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER for VOLTAGE SYNTHESIZER with ON-SCREEN DISPLAY CONTROLLER M37212M4/M8–XXXSP, M37212M6–XXXSP/FP M37212EFSP/FP MITSUBISHI MICROCOMPUTERS Rev. 1.0 Fig. 8.2.5 Memory Map of 2 Page Register Area b 7b 0b 7b 0 2 1 71 2 1 81 2 1 91 2 1 B1 2 1 A1 R O M c o r r e c t i o n e n a b l e r e g i s t e r ( R C R ) R O M c o r r e c t i o n a d d r e s s 1 ( h i g h - o r d e r ) R O M c o r r e c t i o n a d d r e s s 1 ( l o w - o r d e r ) R O M c o r r e c t i o n a d d r e s s 2 ( h i g h - o r d e r ) R O M c o r r e c t i o n a d d r e s s 2 ( l o w - o r d e r ) R C R 1R C R 0 0 01 0 01 0 01 0 01 00 0 01 n p a g e r e g i s t e r a r e a a d d r e s s e s t o A d d r e s s R e g i s t e r B i t a l l o c a t i o nS t a t e i m m e d i a t e l y a f t e r r e s e t : F i x t o t h i s b i t t o “ 0 ” d o n o t w r i t e t o F u n c t i o n b i t : N o f u n c t i o n b i t : F i x t o t h i s b i t t o “ 1 ” d o n o t w r i t e t o N a m e : : “ 0 ” i m m e d i a t e l y a f t e r r e s e t : I n d e t e r m i n a t e i m m e d i a t e l y a f t e r r e s e t : “ 1 ” i m m e d i a t e l y a f t e r r e s e t N o t e : O n l y M 3 7 2 1 2 M 8 - X X X S P a n d M 3 7 2 1 2 E F S P / F P h a v e 2 p a g e r e g i s t e r . < B i t a l l o c a t i o n >< S t a t e i m m e d i a t e l y a f t e r r e s e t >

SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER for VOLTAGE SYNTHESIZER with ON-SCREEN DISPLAY CONTROLLER M37212M4/M8–XXXSP, M37212M6–XXXSP/FP M37212EFSP/FP MITSUBISHI MICROCOMPUTERS Rev. 1.0 Fig. 8.2.6 Internal State of Processor Status Register and Program Counter at Reset b 7 b 0 b 7 b 0 R e g i s t e r P r o c e s s o r s t a t u s r e g i s t e r ( P S ) B i t a l l o c a t i o nS t a t e i m m e d i a t e l y a f t e r r e s e t P r o g r a m c o u n t e r ( P C H ) P r o g r a m c o u n t e r ( P C L) C o n t e n t s o f a d d r e s s F F F F1 C o n t e n t s o f a d d r e s s F F F E1 : F i x t o t h i s b i t t o “ 0 ” d o n o t w r i t e t o F u n c t i o n b i t : N o f u n c t i o n b i t : F i x t o t h i s b i t t o “ 1 ” d o n o t w r i t e t o N a m e : : “ 0 ” i m m e d i a t e l y a f t e r r e s e t : I n d e t e r m i n a t e i m m e d i a t e l y a f t e r r e s e t : “ 1 ” i m m e d i a t e l y a f t e r r e s e t < B i t a l l o c a t i o n >< S t a t e i m m e d i a t e l y a f t e r r e s e t >

SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER for VOLTAGE SYNTHESIZER with ON-SCREEN DISPLAY CONTROLLER M37212M4/M8–XXXSP, M37212M6–XXXSP/FP M37212EFSP/FP MITSUBISHI MICROCOMPUTERS Rev. 1.0 Priority

8.3 INTERRUPTS

Interrupts can be caused by 14 different sources consisting of 4 ex- ternal, 8 internal, 1 software, and reset. Interrupts are vectored inter- rupts with priorities as shown in Table 8.3.1. Reset is also included in the table because its operation is similar to an interrupt. When an interrupt is accepted, ‹ The contents of the program counter and processor status regis- ter are automatically stored into the stack. \` The interrupt disable flag I is set to “1” and the corresponding interrupt request bit is set to “0.” ´ The jump destination address stored in the vector address enters the program counter. Other interrupts are disabled when the interrupt disable flag is set to “1.” All interrupts except the BRK instruction interrupt have an interrupt request bit and an interrupt enable bit. The interrupt request bits are in interrupt request registers 1 and 2 and the interrupt enable bits are interrupt-related registers. Interrupts other than the BRK instruction interrupt and reset are ac- cepted when the interrupt enable bit is “1,” interrupt request bit is “1,” and the interrupt disable flag is “0.” The interrupt request bit can be set to “0” by a program, but not set to “1.” The interrupt enable bit can be set to “0” and “1” by a program. Reset is treated as a non-maskable interrupt with the highest priority. Figure 8.3.1 shows interrupt control.

8.3.1 Interrupt Causes

(1) VSYNC , OSD interrupts The VSYNC interrupt is an interrupt request synchronized with the vertical sync signal. The OSD interrupt occurs after character block display to the CRT is completed. (2) INT1 to INT3 external interrupts The INT1 to INT3 interrupts are external interrupt inputs, the sys- tem detects that the level of a pin changes from LOW to HIGH or from HIGH to LOW, and generates an interrupt request. The in- put active edge can be selected by bits 3 to 5 of the interrupt input polarity register (address 00F9 16) : when this bit is “0,” a change from LOW to HIGH is detected; when it is “1,” a change from HIGH to LOW is detected. Note that both bits are cleared to “0” at reset. (3) Timers 1 to 4 interrupts An interrupt is generated by an overflow of timers 1 to 4. Vector Addresses FFFF 16, FFFE16 FFFD 16, FFFC16 FFFB 16, FFFA16 FFF9 16, FFF816 FFF5 16, FFF416 FFF3 16, FFF216 FFF1 16, FFF016 FFEF 16, FFEE16 FFED 16, FFEC16 FFEB 16, FFEA16 FFE9 16, FFE816 FFE7 16, FFE616 FFE5 16, FFE416 FFDF 16, FFDE16 Interrupt Source Reset OSD interrupt INT2 external interrupt INT1 external interrupt Timer 4 interrupt f(X IN)/4096 interrupt VSYNC interrupt Timer 3 interrupt Timer 2 interrupt Timer 1 interrupt Serial I/O interrupt Multi-master I 2C-BUS interface interrupt INT3 external interrupt BRK instruction interrupt Remarks Non-maskable Active edge selectable Active edge selectable Active edge selectable Non-maskable Table 8.3.1 Interrupt Vector Addresses and Priority

SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER for VOLTAGE SYNTHESIZER with ON-SCREEN DISPLAY CONTROLLER M37212M4/M8–XXXSP, M37212M6–XXXSP/FP M37212EFSP/FP MITSUBISHI MICROCOMPUTERS Rev. 1.0 (4) Serial I/O interrupt This is an interrupt request from the clock synchronous serial I/O function. (5) f(XIN)/4096 interrupt The f (XIN)/4096 interrupt occurs regularly with a f(XIN)/4096 pe- riod. Set bit 0 of PWM output control register 1 to “0.” (6) Multi-master I2C-BUS interface interrupt This is an interrupt request related to the multi-master I2C-BUS interface. (7) BRK instruction interrupt This software interrupt has the least significant priority. It does not have a corresponding interrupt enable bit, and it is not af- fected by the interrupt disable flag I (non-maskable). Fig. 8.3.1 Interrupt Control Interrupt request bit Interrupt enable bit Interrupt disable flag I BRK instruction Reset Interrupt request

SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER for VOLTAGE SYNTHESIZER with ON-SCREEN DISPLAY CONTROLLER M37212M4/M8–XXXSP, M37212M6–XXXSP/FP M37212EFSP/FP MITSUBISHI MICROCOMPUTERS Rev. 1.0 Fig. 8.3.2 Interrupt Request Register 1 b 7b 6 b 5b 4b 3 b 2b 1b 0 I n t e r r u p t r e q u e s t r e g i s t e r 1 ( I R E Q 1 ) [ A d d r e s s 0 0 F C BN a m e F u n c t i o n s A f t e r r e s e t RW I n t e r r u p t R e q u e s t R e g i s t e r 0 0 : N o i n t e r r u p t r e q u e s t i s s u e d I n t e r r u p t r e q u e s t i s s u e d T i m e r 1 i n t e r r u p t r e q u e s t b i t T M R

1 T i m e r 2 i n t e r r u p t

r e q u e s t b i t T M R

2 T i m e r 3 i n t e r r u p t

r e q u e s t b i t T M R 3T i m e r 4 i n t e r r u p t r e q u e s t b i t T M R

4 O S D i n t e r r u p t r e q u e s t

b i t O S D R 5 VS Y N C i n t e r r u p t r e q u e s t b i t V S C R 6 M u l t i m a s t e r I2C B U S i n t e r f a c e i n t e r r u p t r e q u e s t b i t I I C R 0 : N o i n t e r r u p t r e q u e s t i s s u e d I n t e r r u p t r e q u e s t i s s u e d 0 : N o i n t e r r u p t r e q u e s t i s s u e d I n t e r r u p t r e q u e s t i s s u e d 0 : N o i n t e r r u p t r e q u e s t i s s u e d I n t e r r u p t r e q u e s t i s s u e d 0 : N o i n t e r r u p t r e q u e s t i s s u e d I n t e r r u p t r e q u e s t i s s u e d 0 : N o i n t e r r u p t r e q u e s t i s s u e d I n t e r r u p t r e q u e s t i s s u e d 0 : N o i n t e r r u p t r e q u e s t i s s u e d I n t e r r u p t r e q u e s t i s s u e d 0 ] 0 ] 0 ] 0 ] 0 ] 0 ] 0 ] c a n b e s e t b y s o f t w a r e b u t c a n n o t b e s e t R R R R R R R R I N T 3 e x t e r n a l i n t e r r u p t r e q u e s t b i t I T R 0 : N o i n t e r r u p t r e q u e s t i s s u e d I n t e r r u p t r e q u e s t i s s u e d Fig. 8.3.3 Interrupt Request Register 2 b 7b 6b 5b 4b 3 b 2b 1b 0 I n t e r r u p t r e q u e s t r e g i s t e r 2 ( I R E Q 2 ) [ A d d r e s s 0 0 F D BN a m e F u n c t i o n s A f t e r r e s e t RW I n t e r r u p t R e q u e s t R e g i s t e r

0 I N T 1 e x t e r n a l i n t e r r u p t

r e q u e s t b i t I T R 0 : N o i n t e r r u p t r e q u e s t i s s u e d I n t e r r u p t r e q u e s t i s s u e d

1 I N T 2 e x t e r n a l i n t e r r u p t

r e q u e s t b i t I T R

2 S e r i a l I / O i n t e r r u p t

r e q u e s t b i t S R 4 f ( XI N ) / 4 0 9 6 i n t e r r u p t r e q u e s t b i t M S R 5 , 6 7 F i x t h i s b i t t o “ 0 . ” 0 : N o i n t e r r u p t r e q u e s t i s s u e d I n t e r r u p t r e q u e s t i s s u e d 0 : N o i n t e r r u p t r e q u e s t i s s u e d I n t e r r u p t r e q u e s t i s s u e d c a n b e s e t b y s o f t w a r e b u t c a n n o t b e s e t 0 ] 0 ] 0 ] 0 ] 0 : N o i n t e r r u p t r e q u e s t i s s u e d I n t e r r u p t r e q u e s t i s s u e d R R R R R — R W0 N o t h i n g i s a s s i g n e d . T h e s e b i t s a r e w r i t e d i s a b l e b i t s . W h e n t h e s e b i t s a r e r e a d o u t t h e v a l u e s a r e 0R —N o t h i n g i s a s s i g n e d . T h i s b i t i s a w r i t e d i s a b l e b i t . W h e n t h i s b i t i s r e a d o u t t h e v a l u e i s

SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER for VOLTAGE SYNTHESIZER with ON-SCREEN DISPLAY CONTROLLER M37212M4/M8–XXXSP, M37212M6–XXXSP/FP M37212EFSP/FP MITSUBISHI MICROCOMPUTERS Rev. 1.0 Fig. 8.3.4 Interrupt Control Register 1 b 7b 6 b 5b 4b 3 b 2b 1b 0 I n t e r r u p t c o n t r o l r e g i s t e r 1 ( I C O N 1 ) [ A d d r e s s 0 0 F E1 BN a m eF u n c t i o n s RW I n t e r r u p t C o n t r o l R e g i s t e r

0 T i m e r 1 i n t e r r u p t

e n a b l e b i t T M E 0 : I n t e r r u p t d i s a b l e d I n t e r r u p t e n a b l e d e n a b l e b i t T M E e n a b l e b i t T M E

4 O S D i n t e r r u p t e n a b l e b i t

O S D E 0 : I n t e r r u p t d i s a b l e d I n t e r r u p t e n a b l e d 0 : I n t e r r u p t d i s a b l e d I n t e r r u p t e n a b l e d 0 : I n t e r r u p t d i s a b l e d I n t e r r u p t e n a b l e d RW RW RW RW RW R T i m e r 4 i n t e r r u p t e n a b l e b i t T M E 0 : I n t e r r u p t d i s a b l e d I n t e r r u p t e n a b l e d 5 VS Y N C i n t e r r u p t e n a b l e b i t V S C E 0 : I n t e r r u p t d i s a b l e d I n t e r r u p t e n a b l e d 0 RW 6 0 : I n t e r r u p t d i s a b l e d I n t e r r u p t e n a b l e d 0 RW A f t e r r e s e t I N T 3 e x t e r n a l i n t e r r u p t e n a b l e b i t I T E M u l t i m a s t e r I2C B U S i n t e r f a c e i n t e r r u p t e n a b l e b i t I I C E 0 : I n t e r r u p t d i s a b l e d I n t e r r u p t e n a b l e d W Fig. 8.3.5 Interrupt Control Register 2 b 7b 6 b 5b 4b 3 b 2b 1b 0 I n t e r r u p t c o n t r o l r e g i s t e r 2 ( I C O N 2 ) [ A d d r e s s 0 0 F F1 BN a m eF u n c t i o n s I n t e r r u p t C o n t r o l R e g i s t e r 2 e n a b l e b i t I T E 0 : I n t e r r u p t d i s a b l e d I n t e r r u p t e n a b l e d e n a b l e b i t I T E e n a b l e b i t S E 4 f ( XI N ) / 4 0 9 6 i n t e r r u p t e n a b l e b i t M S E 0 : I n t e r r u p t d i s a b l e d I n t e r r u p t e n a b l e d 0 : I n t e r r u p t d i s a b l e d I n t e r r u p t e n a b l e d 0 : I n t e r r u p t d i s a b l e d I n t e r r u p t e n a b l e d F i x t h i s b i t t o “ 0 . ” F i x t h e s e b i t s t o “ 0 . ” 000 N o t h i n g i s a s s i g n e d . T h e s e b i t s a r e w r i t e d i s a b l e b i t s . W h e n t h e s e b i t s a r e r e a d o u t t h e v a l u e s a r e i n d e t e r m i n a t e A f t e r r e s e t i n d e t e r m i n a t e RW RW RW RW RW R R W W R –7 5 , 6

SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER for VOLTAGE SYNTHESIZER with ON-SCREEN DISPLAY CONTROLLER M37212M4/M8–XXXSP, M37212M6–XXXSP/FP M37212EFSP/FP MITSUBISHI MICROCOMPUTERS Rev. 1.0 Fig. 8.3.6 Interrupt Input Polarity Register b 7b 6b 5b 4b 3b 2b 1b 0 I n t e r r u p t i n p u t p o l a r i t y r e g i s t e r ( R E ) [ A d d r e s s 0 0 F 91 BN a m eF u n c t i o n s A f t e r r e s e t R W I n t e r r u p t I n p u t P o l a r i t y R e g i s t e r 0 , 1 I N T 1 p o l a r i t y s w i t c h b i t R E 0 : P o s i t i v e p o l a r i t y N e g a t i v e p o l a r i t y 0 : P o s i t i v e p o l a r i t y N e g a t i v e p o l a r i t y 0 : P o s i t i v e p o l a r i t y N e g a t i v e p o l a r i t y I N T p o l a r i t y s w i t c h b i t R E I N T p o l a r i t y s w i t c h b i t R E N o t h i n g i s a s s i g n e d . T h e s e b i t s a r e w r i t e d i s a b l e b i t s . W h e n t h e s e b i t s a r e r e a d o u t t h e v a l u e s a r e F i x t h i s b i t t o “ 0 . ” F i x t h i s b i t t o “ 0 . ” N o t h i n g i s a s s i g n e d . T h i s b i t i s a w r i t e d i s a b l e b i t . W h e n t h i s b i t i s r e a d o u t t h e v a l u e i s R W R W R W R W R W

SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER for VOLTAGE SYNTHESIZER with ON-SCREEN DISPLAY CONTROLLER M37212M4/M8–XXXSP, M37212M6–XXXSP/FP M37212EFSP/FP MITSUBISHI MICROCOMPUTERS Rev. 1.0

8.4 TIMERS

This microcomputer has 4 timers: timers 1 to 4. All timers are 8-bit timers with the 8-bit timer latch. The timer block diagram is shown in Figure 8.4.3. All of the timers count down and their divide ratio is 1/(n+1), where n is the value of timer latch. By writing a count value to the correspond- ing timer latch (addresses 00F0 16 to 00F316 : timers 1 to 4), the value is also set to a timer, simultaneously. The count value is decremented by 1. The timer interrupt request bit is set to “1” by a timer overflow at the next count pulse, after the count value reaches “00 16.”

8.4.1 Timer 1

Timer 1 can select one of the following count sources:

  • f(X IN)/16
  • f(XIN)/4096 The count source of timer 1 is selected by setting bit 0 of timer 12 mode register 1 (address 00F416). Timer interrupt request occurs at timer 1 overflow.

8.4.2 Timer 2

Timer 2 can select one of the following count sources:

  • f(X IN)/16
  • Timer 1 overflow signal
  • External clock from the TIM2 pin The count source of timer 2 is selected by setting bits 4 and 1 of timer 12 mode register (address 00F4 16). When timer 1 overflow signal is a count source for the timer 2, the timer 1 functions as an 8- bit prescaler. Timer 2 interrupt request occurs at timer 2 overflow.

8.4.3 Timer 3

Timer 3 can select one of the following count sources:

  • f(XIN)/16
  • External clock from the HSYNC pin
  • External clock from the TIM3 pin The count source of timer 3 is selected by setting bits 5 and 0 of timer 34 mode register (address 00F5 16). Timer 3 interrupt request occurs at timer 3 overflow.

8.4.4 Timer 4

Timer 4 can select one of the following count sources:

  • f(X IN)/16
  • f(XIN)/2
  • Timer 3 overflow signal The count source of timer 3 is selected by setting bits 1 and 4 of timer 34 mode register (address 00F5 16). When timer 3 overflow signal is a count source for the timer 4, the timer 3 functions as an 8- bit prescaler. Timer 4 interrupt request occurs at timer 4 overflow. At reset, timers 3 and 4 are connected by hardware and “FF 16” is automatically set in timer 3; “0716” in timer 4. The f(XIN)/16 is se- lected as the timer 3 count source. The internal reset is released by timer 4 overflow in this state and the internal clock is connected. At execution of the STP instruction, timers 3 and 4 are connected by hardware and “FF 16” is automatically set in timer 3; “0716” in timer 4. However, the f(XIN)/16 is not selected as the timer 3 count source. So set both bit 0 of timer 34 mode register (address 00F516) and bit 6 at address 00C716 to “0” before execution of the STP instruction (f(XIN)/16 is selected as the timer 3 count source). The internal STP state is released by timer 4 overflow in this state and the internal clock is connected. As a result of the above procedure, the program can start under a stable clock.

SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER for VOLTAGE SYNTHESIZER with ON-SCREEN DISPLAY CONTROLLER M37212M4/M8–XXXSP, M37212M6–XXXSP/FP M37212EFSP/FP MITSUBISHI MICROCOMPUTERS Rev. 1.0 Fig. 8.4.2 Timer 34 Mode Register b 7b 6 b 5b 4b 3 b 2b 1b 0 T i m e r 3 4 m o d e r e g i s t e r ( T 3 4 M ) [ A d d r e s s 0 0 F 51 B A f t e r r e s e t RW T i m e r 3 4 M o d e R e g i s t e r N a m e F u n c t i o n s T i m e r 3 c o u n t s o u r c e s e l e c t i o n b i t T M 0 RW

1 T i m e r 4 i n t e r n a l

i n t e r r u p t c o u n t s o u r c e s e l e c t i o n b i t T M 0R W T i m e r 3 c o u n t s t o p b i t T M 0 : C o u n t s t a r t C o u n t s t o p T i m e r 4 c o u n t s t o p b i t T M 0 : C o u n t s t a r t C o u n t s t o p

4 T i m e r 4 c o u n t s o u r c e

s e l e c t i o n b i t T M 0 : I n t e r n a l c l o c k s o u r c e f XI N )

5 T i m e r 3 e x t e r n a l c o u n t

s o u r c e s e l e c t i o n b i t T M 0 : T I M 3 p i n i n p u t H S Y N C p i n i n p u t RW RW RW RW 0 : f ( XI N ) / 1 6 E x t e r n a l c l o c k s o u r c e 0 : T i m e r 3 o v e r f l o w s i g n a l f XI N ) 6 , 7N o t h i n g i s a s s i g n e d . T h e s e b i t s a r e w r i t e d i s a b l e b i t s . W h e n t h e s e b i t s a r e r e a d o u t t h e v a l u e s a r e 0— R Fig. 8.4.1 Timer 12 Mode Register b 7b 6 b 5b 4b 3 b 2b 1b 0 T i m e r m o d e r e g i s t e r ( T 1 2 M ) [ A d d r e s s 0 0 F 41 B A f t e r r e s e t W T i m e r 1 2 M o d e R e g i s t e r N a m e F u n c t i o n s T i m e r 1 c o u n t s o u r c e s e l e c t i o n b i t T M 0 : f ( XI N ) / 1 6 f XI N ) T i m e r 2 c o u n t s o u r c e s e l e c t i o n b i t T M 0 : I n t e r r u p t c l o c k s o u r c e E x t e r n a l c l o c k f r o m T I M p i n T i m e r 1 c o u n t s t o p b i t T M 0 : C o u n t s t a r t C o u n t s t o p T i m e r 2 c o u n t s t o p b i t T M 0 : C o u n t s t a r t C o u n t s t o p T i m e r 2 i n t e r n a l c o u n t s o u r c e s e l e c t i o n b i t T M R WR WR WR WR WR0 : f ( XI N ) / 1 6 T i m e r o v e r f l o w 5 F i x t h i s b i t t o “ 0 . ” 0 WR 6 , 7N o t h i n g i s a s s i g n e d . T h e s e b i t s a r e w r i t e d i s a b l e b i t s . W h e n t h e s e b i t s a r e r e a d o u t t h e v a l u e s a r e 0— R

SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER for VOLTAGE SYNTHESIZER with ON-SCREEN DISPLAY CONTROLLER M37212M4/M8–XXXSP, M37212M6–XXXSP/FP M37212EFSP/FP MITSUBISHI MICROCOMPUTERS Rev. 1.0 Timer 1 (8) 1/2 1/8 Timer 1 latch (8) T12M0 T12M2 T12M4 T12M1 T12M3 Timer 2 (8) Timer 2 latch (8) Timer 3 (8) Timer 3 latch (8) Timer 4 (8) Timer 4 latch (8) Data bus Timer 1 interrupt request Timer 2 interrupt request T34M0 T34M2 T34M5 T34M4 T34M3 T34M1 XIN TIM2 TIM3 Selection gate : Connected to black colored side at reset T12M : Timer 12 mode register T34M : Timer 34 mode register FF16 0716 H SYNC Reset STP instruction Timer 3 interrupt request Timer 4 interrupt request Notes 1: “H” pulse width of external clock inputs TIM2 and TIM3 needs 4 machine cycles or more. 2: When the external clock source is selected, timers 2 and 3 are counted at a rising edge of input signal. 3: In the stop mode or the wait mode, external clock inputs TIM2 and TIM3 cannot be used. Fig. 8.4.3 Timer Block Diagram

SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER for VOLTAGE SYNTHESIZER with ON-SCREEN DISPLAY CONTROLLER M37212M4/M8–XXXSP, M37212M6–XXXSP/FP M37212EFSP/FP MITSUBISHI MICROCOMPUTERS Rev. 1.0

8.5 SERIAL I/O

This microcomputer has a built-in serial I/O which can either transmit or receive 8-bit data serially in the clock synchronous mode. The serial I/O block diagram is shown in Figure 8.5.1. The synchro- nous clock I/O pin (S CLK ), data output pin (SOUT ), and data input pin (SIN) also functions as port P4. Bit 3 of the serial I/O mode register (address 00DC16) selects whether the synchronous clock is supplied internally or externally (from the S CLK pin). When an internal clock is selected, bits 1 and 0 select whether f(XIN) or f(XCIN) is divided by 4, 16, 32, or 64. To use SIN pin for serial I/O, set the corresponding bit of the port P2 direction regis- ter (address 00C516) to “0.” Fig. 8.5.1 Serial I/O Block Diagram The operation of the serial I/O is described below. The operation of the serial I/O differs depending on the clock source; external clock or internal clock. Serial I/O shift register (8) Data bus Serial I/O interrupt request Selection gate : Connected to black colored side at reset.Synchronization circuit Frequency divider 1/81/4 1/16 SM1 SM0 Serial I/O counter (8) SM5 : LSB MSB S SM2 SM6 XIN SIN SOUT(/IN) SCLK SM3 P40 latch P41 latch SM3 (Address 00DD16) Note : When the data is set in the serial I/O register (address 00DD16), the register functions as the serial I/O shift register. SM : Serial I/O mode register (See note)

SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER for VOLTAGE SYNTHESIZER with ON-SCREEN DISPLAY CONTROLLER M37212M4/M8–XXXSP, M37212M6–XXXSP/FP M37212EFSP/FP MITSUBISHI MICROCOMPUTERS Rev. 1.0 Internal clock : The serial I/O counter is set to “7” during the write cycle into the serial I/O register (address 00DD16), and the transfer clock goes HIGH forcibly. At each falling edge of the transfer clock after the write cycle, serial data is output from the S OUT pin. Transfer direction can be selected by bit 5 of the serial I/O mode register. At each rising edge of the transfer clock, data is input from the SIN pin and data in the serial I/O register is shifted 1 bit. After the transfer clock has counted 8 times, the serial I/O counter becomes “0” and the transfer clock stops at HIGH. At this time the interrupt request bit is set to “1.” Fig. 8.5.2 Serial I/O Timing (for LSB first) S y n c h r o n o u s c l o c k T r a n s f e r c l o c k S e r i a l I / O r e g i s t e r w r i t e s i g n a l S e r i a l I / O o u t p u t SO U T D 0 D 1 D 2 D 3 D 4 D 5 D 6 D 7 ( S e e n o t e ) S e r i a l I / O i n p u t SI N N o t e : W h e n a n i n t e r n a l c l o c k i s s e l e c t e d , t h e SO U T p i n i s a t h i g h - i m p e d a n c e a f t e r t r a n s f e r i s c o m p l e t e d . I n t e r r u p t r e q u e s t b i t i s s e t t o “ 1 ” External clock : The an external clock is selected as the clock source, the interrupt request is set to “1” after the transfer clock has been counted 8 counts. However, transfer operation does not stop, so the clock should be controlled externally. Use the external clock of 1 MHz or less with a duty cycle of 50%. The serial I/O timing is shown in Figure 8.5.2. When using an exter- nal clock for transfer, the external clock must be held at HIGH for initializing the serial I/O counter. When switching between an inter- nal clock and an external clock, do not switch during transfer. Also, be sure to initialize the serial I/O counter after switching. Notes 1: On programming, note that the serial I/O counter is set by writing to the serial I/O register with the bit managing instructions, such as SEB and CLB. 2:When an external clock is used as the synchronous clock, write trans- mit data to the serial I/O register when the transfer clock input level is HIGH.

SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER for VOLTAGE SYNTHESIZER with ON-SCREEN DISPLAY CONTROLLER M37212M4/M8–XXXSP, M37212M6–XXXSP/FP M37212EFSP/FP MITSUBISHI MICROCOMPUTERS Rev. 1.0 Fig. 8.5.3 Serial I/O Mode Register b 7b 6 b 5b 4b 3 b 2b 1b 0 S e r i a l I / O m o d e r e g i s t e r ( S M ) [ A d d r e s s 0 0 D C 1 BN a m eF u n c t i o n s S e r i a l I / O M o d e R e g i s t e r 0 , 1I n t e r n a l s y n c h r o n o u s c l o c k s e l e c t i o n b i t s S M S M b b f XI N ) f XI N ) f XI N ) f XI N )

2 S y n c h r o n o u s c l o c k

s e l e c t i o n b i t S M

3 S e r i a l I / O p o r t

s e l e c t i o n b i t S M

5 T r a n s f e r d i r e c t i o n

s e l e c t i o n b i t S M 0 : P 40, P 41 SO U T I N SC L K 0 : E x t e r n a l c l o c k I n t e r n a l c l o c k 0 : L S B f i r s t M S B f i r s t 4 F i x t h i s b i t t o “ 0 . ” 7 N o t h i n g i s a s s i g n e d . T h i s b i t i s a w r i t e d i s a b l e b i t . W h e n t h i s b i t i s r e a d o u t t h e v a l u e i s A f t e r r e s e t RW 0R W RW RW R W RW RW 0R — S e r i a l i n p u t p i n s e l e c t i o n b i t S M 0 : I n p u t s i g n a l f r o m SI N p i n . I n p u t s i g n a l f r o m SO U T p i n

SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER for VOLTAGE SYNTHESIZER with ON-SCREEN DISPLAY CONTROLLER M37212M4/M8–XXXSP, M37212M6–XXXSP/FP M37212EFSP/FP MITSUBISHI MICROCOMPUTERS Rev. 1.0

8.5.1 Serial I/O Common Transmission/Recep-

By writing “1” to bit 6 of the serial I/O mode register, signals SIN and SOUT are switched internally to be able to transmit or receive the serial data. Figure 8.5.4 shows signals on serial I/O common transmission/re- ception mode. Note:When receiving the serial data after writing “FF16” to the serial I/O regis- ter. Fig. 8.5.4 Signals on Serial I/O Common Transmission/Reception Mode S e r i a l I / O s h i f t r e g i s t e r ( 8 ) “ 1 ” “ 0 ” C l o c kSC L K SO U T I N SI N S M 6 S M : S e r i a l I / O m o d e r e g i s t e r

SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER for VOLTAGE SYNTHESIZER with ON-SCREEN DISPLAY CONTROLLER M37212M4/M8–XXXSP, M37212M6–XXXSP/FP M37212EFSP/FP MITSUBISHI MICROCOMPUTERS Rev. 1.0 Function In conformity with Philips I2C-BUS standard: 10-bit addressing format 7-bit addressing format High-speed clock mode Standard clock mode In conformity with Philips I 2C-BUS standard: Master transmission Master reception Slave transmission Slave reception 16.1 kHz to 400 kHz (at φ = 4 MHz) Table 8.6.1 Multi-master I2C-BUS Interface Functions Item Format Communication mode SCL clock frequency φ : System clock = f(XIN)/2 Note :We are not responsible for any third party’s infringement of patent rights or other rights attributable to the use of the control function (bits 6 and 7 of the I 2C control register at address 00DA16) for connections between the I2C-BUS interface and ports (SCL1, SCL2, SDA1, SDA2).

8.6 MULTI-MASTER I2C-BUS INTERFACE

The multi-master I2C-BUS interface is a serial communications cir- cuit, conforming to the Philips I2C-BUS data transfer format. This interface, offering both arbitration lost detection and a synchronous functions, is useful for the multi-master serial communications. Figure 8.6.1 shows a block diagram of the multi-master I 2C-BUS in- terface and Table 8.6.1 shows multi-master I2C-BUS interface func- tions. This multi-master I 2C-BUS interface consists of the I2C address reg- ister, the I2C data shift register, the I2C clock control register, the I2C control register, the I2C status register and other control circuits. Fig. 8.6.1 Block Diagram of Multi-master I2C-BUS Interface I2C address register (S0D)b7 b0 SAD6 SAD5 SAD4 SAD3 SAD2 SAD1 SAD0 RBW Noise elimination circuit Serial data (SDA) Address comparator I C data shift register Data control circuit I2C clock control register (S2) System clock(f) Interrupt generating circuit Interrupt request signal (IICIRQ) MST TRX BB PIN AL AAS AD0 LRB I C status register (S1) b7 b0 BSEL1 BSEL0 10BIT SAD ALS BC2 BC1 BC0 I2C control register (S1D) Bit counter BB circuit Clock control circuit Noise elimination circuit Serial clock (SCL) b7 b0 ACK ACK BIT FAST MODE CCR4 CCR3 CCR2 CCR1 CCR0 Internal data bus Clock division AL circuit ESO

SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER for VOLTAGE SYNTHESIZER with ON-SCREEN DISPLAY CONTROLLER M37212M4/M8–XXXSP, M37212M6–XXXSP/FP M37212EFSP/FP MITSUBISHI MICROCOMPUTERS Rev. 1.0

8.6.1 I2C Data Shift Register

The I2C data shift register (S0 : address 00D716) is an 8-bit shift register to store receive data and write transmit data. When transmit data is written into this register, it is transferred to the outside from bit 7 in synchronization with the SCL clock, and each time one-bit data is output, the data of this register are shifted one bit to the left. When data is received, it is input to this register from bit 0 in synchronization with the SCL clock, and each time one-bit data is input, the data of this register are shifted one bit to the left. The I 2C data shift register is in a write enable status only when the ESO bit of the I2C control register (address 00DA16) is “1.” The bit counter is reset by a write instruction to the I2C data shift register. When both the ESO bit and the MST bit of the I2C status register (address 00D916) are “1,” the SCL is output by a write instruction to the I2C data shift register. Reading data from the I2C data shift regis- ter is always enabled regardless of the ESO bit value. Note:To write data into the I2C data shift register after setting the MST bit to “0” (slave mode), keep an interval of 8 machine cycles or more. Fig. 8.6.2 Data Shift Register b 7b 6b 5b 4b 3b 2b 1b 0 I2C d a t a s h i f t r e g i s t e r S A d d r e s s D B F u n c t i o n sA f t e r r e s e tR W I C D a t a S h i f t R e g i s t e r t o T h i s i s a n 8 - b i t s h i f t r e g i s t e r t o s t o r e r e c e i v e d a t a a n d w r i t e t r a n s m i t d a t a I n d e t e r m i n a t e N o t e : 2T o w r i t e d a t a i n t o t h e I C d a t a s h i f t r e g i s t e r a f t e r s e t t i n g t h e M S T b i t t o s l a v e m o d e k e e p a n i n t e r v a l o f m a c h i n e c y c l e s o r m o r e N a m e D 0 t o D 7 RW

SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER for VOLTAGE SYNTHESIZER with ON-SCREEN DISPLAY CONTROLLER M37212M4/M8–XXXSP, M37212M6–XXXSP/FP M37212EFSP/FP MITSUBISHI MICROCOMPUTERS Rev. 1.0

8.6.2 I2C Address Register

The I2C address register (address 00D816) consists of a 7-bit slave address and a read/write bit. In the addressing mode, the slave ad- dress written in this register is compared with the address data to be received immediately after the START condition are detected. (1) Bit 0: read/write bit (RBW) Not used when comparing addresses, in the 7-bit addressing mode. In the 10-bit addressing mode, the first address data to be received is compared with the contents (SAD6 to SAD0 + RBW) of the I2C address register. The RBW bit is cleared to “0” automatically when the stop condition is detected. (2) Bits 1 to 7: slave address (SAD0–SAD6) These bits store slave addresses. Regardless of the 7-bit address- ing mode and the 10-bit addressing mode, the address data trans- mitted from the master is compared with the contents of these bits. Fig. 8.6.3 I2C Address Register b 7b 6b 5b 4b 3b 2b 1b 0

0 R e a d / w r i t e b i t

R B W t o S l a v e a d d r e s s S A D t o S A D < O n l y i n 1 0 - b i t a d d r e s s i n g ( i n s l a v e ) m o d e > T h e l a s t s i g n i f i c a n t b i t o f a d d r e s s d a t a i s c o m p a r e d W a i t t h e f i r s t b y t e o f s l a v e a d d r e s s a f t e r S T A R T c o n d i t i o n r e a d s t a t e W a i t t h e f i r s t b y t e o f s l a v e a d d r e s s a f t e r R E S T A R T c o n d i t i o n w r i t e s t a t e < I n b o t h m o d e s > T h e a d d r e s s d a t a i s c o m p a r e d I2C A d d r e s s R e g i s t e r I2C a d d r e s s r e g i s t e r S D A d d r e s s D B N a m e F u n c t i o n s A f t e r r e s e tR W R W

SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER for VOLTAGE SYNTHESIZER with ON-SCREEN DISPLAY CONTROLLER M37212M4/M8–XXXSP, M37212M6–XXXSP/FP M37212EFSP/FP MITSUBISHI MICROCOMPUTERS Rev. 1.0

8.6.3 I2C Clock Control Register

The I2C clock control register (address 00DB16) is used to set ACK control, SCL mode and SCL frequency. (1) Bits 0 to 4: SCL frequency control bits (CCR0–CCR4) These bits control the SCL frequency. (2) Bit 5: SCL mode specification bit (FAST MODE) This bit specifies the SCL mode. When this bit is set to “0,” the stan- dard clock mode is set. When the bit is set to “1,” the high-speed clock mode is set. (3) Bit 6: ACK bit (ACK BIT) This bit sets the SDA status when an ACK clock] is generated. When this bit is set to “0,” the ACK return mode is set and SDA goes to LOW at the occurrence of an ACK clock. When the bit is set to “1,” the ACK non-return mode is set. The SDA is held in the HIGH status at the occurrence of an ACK clock. However, when the slave address matches the address data in the reception of address data at ACK BIT = “0,” the SDA is automatically made LOW (ACK is returned). If there is a mismatch between the slave address and the address data, the SDA is automatically made HIGH (ACK is not returned). ]ACK clock: Clock for acknowledgement Fig. 8.6.4 I2C Address Register (4) Bit 7: ACK clock bit (ACK) This bit specifies a mode of acknowledgment which is an acknowl- edgment response of data transmission. When this bit is set to “0,” the no ACK clock mode is set. In this case, no ACK clock occurs after data transmission. When the bit is set to “1,” the ACK clock mode is set and the master generates an ACK clock upon comple- tion of each 1-byte data transmission.The device for transmitting address data and control data releases the SDA at the occurrence of an ACK clock (make SDA HIGH) and receives the ACK bit generated by the data receiving device. Note:Do not write data into the I2C clock control register during transmission. If data is written during transmission, the I2C clock generator is reset, so that data cannot be transmitted normally. b 7b 6b 5b 4b 3b 2b 1b 0 I2C c l o c k c o n t r o l r e g i s t e r S A d d r e s s D I2C C l o c k C o n t r o l R e g i s t e r t o S C L f r e q u e n c y c o n t r o l b i t s C C R t o C C R S C L m o d e s p e c i f i c a t i o n b i t F A S T M O D E 0 : S t a n d a r d c l o c k m o d e H i g h s p e e d c l o c k m o d e 0S t a n d a r d c l o c k m o d e B N a m e F u n c t i o n s A f t e r r e s e t R W A C K b i t A C K B I T A C K c l o c k b i t A C K 0 : A C K i s r e t u r n e d . A C K i s n o t r e t u r n e d 0 : N o A C K c l o c k A C K c l o c k H i g h s p e e d c l o c k m o d e S e t u p d i s a b l e d S e t u p d i s a b l e d0 0 t o 0 2 S e t u p d i s a b l e d 3 3 30 3 S e t u p d i s a b l e d 2 5 00 4 1 0 0 4 0 0 ( S e e n o t e )0 5 8 3 . 31 6 60 6 C C R v a l u e 1 C C R v a l u e . . . 1 7 . 2 3 4 . 51 D 1 6 . 63 3 . 31 E 1 6 . 1 3 2 . 31 F ( a t f = 4 M H z , u n i t : k H z ) N o t e : A t 4 0 0 k H z i n t h e h i g h - s p e e d c l o c k m o d e , t h e d u t y i s a s b e l o w . p e r i o d p e r i o d I n t h e o t h e r c a s e s t h e d u t y i s a s b e l o w p e r i o d p e r i o d S e t u p v a l u e o f C C R C C R

0 R W

SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER for VOLTAGE SYNTHESIZER with ON-SCREEN DISPLAY CONTROLLER M37212M4/M8–XXXSP, M37212M6–XXXSP/FP M37212EFSP/FP MITSUBISHI MICROCOMPUTERS Rev. 1.0

8.6.4 I2C Control Register

The I2C control register (address 00DA16) controls the data commu- nication format. (1) Bits 0 to 2: bit counter (BC0–BC2) These bits decide the number of bits for the next 1-byte data to be transmitted. An interrupt request signal occurs immediately after the number of bits specified with these bits are transmitted. When a START condition is received, these bits become “000 2” and the address data is always transmitted and received in 8 bits. (2) Bit 3: I2C interface use enable bit (ESO) This bit enables usage of the multimaster I2C BUS interface. When this bit is set to “0,” the use disable status is provided, so the SDA and the SCL become high-impedance. When the bit is set to “1,” use of the interface is enabled. When ESO = “0,” the following is performed.

  • PIN = “1,” BB = “0” and AL = “0” are set (they are bits of the I status register at address 00D916 ).
  • Writing data to the I2C data shift register (address 00D716) is dis- abled. (3) Bit 4: data format selection bit (ALS) This bit decides whether or not to recognize slave addresses. When this bit is set to “0,” the addressing format is selected, so that ad- dress data is recognized. When a match is found between a slave address and address data as a result of comparison or when a gen- eral call (refer to “8.6.5 I 2C Status Register,” bit 1) is received, trans- mission processing can be performed. When this bit is set to “1,” the free data format is selected, so that slave addresses are not recog- nized. (4) Bit 5: addressing format selection bit (10BIT SAD) This bit selects a slave address specification format. When this bit is set to “0,” the 7-bit addressing format is selected. In this case, only the high-order 7 bits (slave address) of the I 2C address register (ad- dress 00D816) are compared with address data. When this bit is set to “1,” the 10-bit addressing format is selected, all the bits of the I2C address register are compared with address data. (5) Bits 6 and 7: connection control bits between I2C-BUS interface and ports (BSEL0, BSEL1) These bits controls the connection between SCL and ports or SDA and ports (refer to Figure 8.6.5). Fig. 8.6.5 Connection Port Control by BSEL0 and BSEL1 Note: Set the corresponding direction register to “1” to use the port as multi-master I2C-BUS interface. “ 0 ” B S E L S C L 1 / P 11 S C L 2 / P 12 “ 0 ” B S E L “ 0 ” B S E L S D A 1 / P 13 S D A 2 / P 14 “ 0 ” B S E L M u l t i - m a s t e r I2C B U S i n t e r f a c e S C L S D A

SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER for VOLTAGE SYNTHESIZER with ON-SCREEN DISPLAY CONTROLLER M37212M4/M8–XXXSP, M37212M6–XXXSP/FP M37212EFSP/FP MITSUBISHI MICROCOMPUTERS Rev. 1.0 Fig. 8.6.6 I2C Control Register b 7b 6b 5b 4b 3b 2b 1b 0 t o B i t c o u n t e r N u m b e r o f t r a n s m i t r e c i e v e b i t s B C t o B C b 2 b 1 b 0

3 I2C

B U S i n t e r f a c e u s e e n a b l e b i t E S O 0 : D i s a b l e d E n a b l e d 4D a t a f o r m a t s e l e c t i o n b i t A L S 0 : A d d r e s s i n g f o r m a t F r e e d a t a f o r m a t 5A d d r e s s i n g f o r m a t s e l e c t i o n b i t B I T S A D 0 : 7 - b i t a d d r e s s i n g f o r m a t b i t a d d r e s s i n g f o r m a t 6 , 7 C o n n e c t i o n c o n t r o l b i t s b e t w e e n I C B U S i n t e r f a c e a n d p o r t s B S E L B S E L b 7 b 6 C o n n e c t i o n p o r t ( S e e n o t e ) N o n e S C L S D A S C L S D A S C L S D A S C L S D A I2C c o n t r o l r e g i s t e r S D A d d r e s s D I2C C o n t r o l R e g i s t e r B N a m e F u n c t i o n s A f t e r r e s e t R W R W R W R W R W R W

SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER for VOLTAGE SYNTHESIZER with ON-SCREEN DISPLAY CONTROLLER M37212M4/M8–XXXSP, M37212M6–XXXSP/FP M37212EFSP/FP MITSUBISHI MICROCOMPUTERS Rev. 1.0

8.6.5 I2C Status Register

The I2C status register (address 00D916) controls the I2C-BUS inter- face status. The low-order 4 bits are read-only bits and the high- order 4 bits can be read out and written to. (1) Bit 0: last receive bit (LRB) This bit stores the last bit value of received data and can also be used for ACK receive confirmation. If ACK is returned when an ACK clock occurs, the LRB bit is set to “0.” If ACK is not returned, this bit is set to “1.” Except in the ACK mode, the last bit value of received data is input. The state of this bit is changed from “1” to “0” by executing a write instruction to the I 2C data shift register (address 00D716). (2) Bit 1: general call detecting flag (AD0) This bit is set to “1” when a general call] whose address data is all “0” is received in the slave mode. By a general call of the master device, every slave device receives control data after the general call. The AD0 bit is set to “0” by detecting the STOP condition or START condition. ]General call: The master transmits the general call address “00 16” to all slaves. (3) Bit 2: slave address comparison flag (AAS) This flag indicates a comparison result of address data. n In the slave receive mode, when the 7-bit addressing format is selected, this bit is set to “1” in one of the following conditions.

  • The address data immediately after occurrence of a START con- dition matches the slave address stored in the high-order 7 bits of the I 2C address register (address 00D816).
  • A general call is received. n In the slave reception mode, when the 10-bit addressing format is selected, this bit is set to “1” with the following condition.
  • When the address data is compared with the I 2C address regis- ter (8 bits consists of slave address and RBW), the first bytes match. n The state of this bit is changed from “1” to “0” by executing a write instruction to the I 2C data shift register (address 00D716). (4) Bit 3: arbitration lost] detecting flag (AL) n the master transmission mode, when a device other than the mi- crocomputer sets the SDA to “L,”, arbitration is judged to have been lost, so that this bit is set to “1.” At the same time, the TRX bit is set to “0,” so that immediately after transmission of the byte whose arbitra- tion was lost is completed, the MST bit is set to “0.” When arbitration is lost during slave address transmission, the TRX bit is set to “0” and the reception mode is set. Consequently, it becomes possible to re- ceive and recognize its own slave address transmitted by another master device. ]Arbitration lost: The status in which communication as a master is disabled. (5) Bit 4: I2C-BUS interface interrupt request bit (PIN) This bit generates an interrupt request signal. Each time 1-byte data is transmitted, the state of the PIN bit changes from “1” to “0.” At the same time, an interrupt request signal is sent to the CPU. The PIN bit is set to “0” in synchronization with a falling edge of the last clock (including the ACK clock) of an internal clock and an interrupt re- quest signal occurs in synchronization with a falling edge of the PIN bit. When the PIN bit is “0,” the SCL is kept in the “0” state and clock generation is disabled. Figure 8.6.8 shows an interrupt request sig- nal generating timing chart. The PIN bit is set to “1” in any one of the following conditions.
  • Executing a write instruction to the I 2C data shift register (address 00D7 16).
  • When the ESO bit is “0”
  • At reset The conditions in which the PIN bit is set to “0” are shown below:
  • Immediately after completion of 1-byte data transmission (includ- ing when arbitration lost is detected)
  • Immediately after completion of 1-byte data reception
  • In the slave reception mode, with ALS = “0” and immediately after completion of slave address or general call address reception
  • In the slave reception mode, with ALS = “1” and immediately after completion of address data reception (6) Bit 5: bus busy flag (BB) This bit indicates the status of use of the bus system. When this bit is set to “0,” this bus system is not busy and a START condition can be generated. When this bit is set to “1,” this bus system is busy and the occurrence of a START condition is disabled by the START condition duplication prevention function (See note). This flag can be written by software only in the master transmission mode. In the other modes, this bit is set to “1” by detecting a START condition and set to “0” by detecting a STOP condition. When the ESO bit of the I 2C control register (address 00DA16) is “0” and at reset, the BB flag is kept in the “0” state. (7) Bit 6: communication mode specification bit (transfer direction specification bit: TRX) This bit decides the direction of transfer for data communication. When this bit is “0,” the reception mode is selected and the data of a trans- mitting device is received. When the bit is “1,” the transmission mode is selected and address data and control data are output into the SDA in synchronization with the clock generated on the SCL. When the ALS bit of the I 2C control register (address 00DA16) is “0” in the slave reception mode is selected, the TRX bit is set to “1” ___ (transmit) if the least significant bit (R/W bit) of the address data trans- ___ mitted by the master is “1.” When the ALS bit is “0” and the R/W bit is “0,” the TRX bit is cleared to “0” (receive). The TRX bit is cleared to “0” in one of the following conditions.
  • When arbitration lost is detected.
  • When a STOP condition is detected.
  • When occurence of a START condition is disabled by the START condition duplication prevention function (Note).
  • With MST = “0” and when a START condition is detected.
  • With MST = “0” and when ACK non-return is detected.
  • At reset

SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER for VOLTAGE SYNTHESIZER with ON-SCREEN DISPLAY CONTROLLER M37212M4/M8–XXXSP, M37212M6–XXXSP/FP M37212EFSP/FP MITSUBISHI MICROCOMPUTERS Rev. 1.0 (8) Bit 7: Communication mode specification bit (master/slave specification bit: MST) This bit is used for master/slave specification for data communica- tion. When this bit is “0,” the slave is specified, so that a START condition and a STOP condition generated by the master are received, and data communication is performed in synchronization with the clock generated by the master. When this bit is “1,” the master is specified and a START condition and a STOP condition are gener- ated, and also the clocks required for data communication are gen- erated on the SCL. The MST bit is cleared to “0” in one of the following conditions.

  • Immediately after completion of 1-byte data transmission when arbitration lost is detected
  • When a STOP condition is detected.
  • When occurence of a START condition is disabled by the START condition duplication preventing function (Note).
  • At reset Fig. 8.6.7 I2C Status Register b 7b 6b 5b 4b 3b 2b 1b 0 I2C s t a t u s r e g i s t e r S A d d r e s s D I2C S t a t u s R e g i s t e r 6 , 7 b 7 b 6 S l a v e r e c i e v e m o d e S l a v e t r a n s m i t m o d e M a s t e r r e c i e v e m o d e M a s t e r t r a n s m i t m o d e B N a m e F u n c t i o n s A f t e r r e s e tR W C o m m u n i c a t i o n m o d e s p e c i f i c a t i o n b i t s T R X M S T 0 : B u s f r e e B u s b u s y B u s b u s y f l a g ( B B ) : I n t e r r u p t r e q u e s t i s s u e d N o i n t e r r u p t r e q u e s t i s s u e d I B U S i n t e r f a c e i n t e r r u p t r e q u e s t b i t P I N 0 : N o t d e t e c t e d D e t e c t e d A r b i t r a t i o n l o s t d e t e c t i n g f l a g A L S e e n o t e 0 : A d d r e s s m i s m a t c h A d d r e s s m a t c h S l a v e a d d r e s s c o m p a r i s o n f l a g A A S S e e n o t e 0 : N o g e n e r a l c a l l d e t e c t e d G e n e r a l c a l l d e t e c t e d G e n e r a l c a l l d e t e c t i n g f l a g A D S e e n o t e 0 : L a s t b i t = “ 0 ” L a s t b i t L a s t r e c e i v e b i t ( L R B ) S e e n o t e N o t e : T h e s e b i t s a n d f l a g s c a n b e r e a d o u t , b u t c a n n n o t b e w r i t t e n . I n d e t e r m i n a t e R— RW R W

( S e e n o t e ) ( S e e n o t e ) ( S e e n o t e ) ( S e e n o t e ) Fig. 8.6.8 Interrupt Request Signal Generation Timing S C L P I N I I C I R Q Note:The START condition duplication prevention function disables the START condition generation, reset of bit counter reset, and SCL output, when the following condition is satisfied: a START condition is set by another master device.

SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER for VOLTAGE SYNTHESIZER with ON-SCREEN DISPLAY CONTROLLER M37212M4/M8–XXXSP, M37212M6–XXXSP/FP M37212EFSP/FP MITSUBISHI MICROCOMPUTERS Rev. 1.0

8.6.6 START Condition Generation Method

When the ESO bit of the I2C control register (address 00DA16) is “1,” execute a write instruction to the I2C status register (address 00D916) to set the MST, TRX and BB bits to “1.” A START condition will then be generated. After that, the bit counter becomes “000 2” and an SCL for 1 byte is output. The START condition generation timing and BB bit set timing are different in the standard clock mode and the high- speed clock mode. Refer to Figure 8.6.9 for the START condition generation timing diagram, and Table 8.6.2 for the START condition/ STOP condition generation timing table. Fig. 8.6.9 START Condition Generation Timing Diagram I2C status register write signal Set time for BB flag Hold timeSetup time SCL SDA BB flag Setup time

8.6.7 STOP Condition Generation Method

When the ESO bit of the I2C control register (address 00DA16) is “1,” execute a write instruction to the I2C status register (address 00D916) for setting the MST bit and the TRX bit to “1” and the BB bit to “0”. A STOP condition will then be generated. The STOP condition genera- tion timing and the BB flag reset timing are different in the standard clock mode and the high-speed clock mode. Refer to Figure 8.6.10 for the STOP condition generation timing diagram, and Table 8.6.2 for the START condition/STOP condition generation timing table. Fig. 8.6.10 STOP Condition Generation Timing Diagram Table 8.6.2 START Condition/STOP Condition Generation Tim- ing Table Item Setup time (START condition) Setup time (STOP condition) Hold time Set/reset time for BB flag Standard Clock Mode 5.0 µs (20 cycles) 4.25 µs (17 cycles) 5.0 µs (20 cycles) 3.0 µs (12 cycles) High-speed Clock Mode 2.5 µs (10 cycles) 1.75 µs (7 cycles) 2.5 µs (10 cycles) 1.5 µs (6 cycles) Note: Absolute time at φ = 4 MHz. The value in parentheses denotes the number of φ cycles. I2C s t a t u s r e g i s t e r w r i t e s i g n a l R e s e t t i m e f o r B B f l a g H o l d t i m eS e t u p t i m e S C L S D A B B f l a g

SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER for VOLTAGE SYNTHESIZER with ON-SCREEN DISPLAY CONTROLLER M37212M4/M8–XXXSP, M37212M6–XXXSP/FP M37212EFSP/FP MITSUBISHI MICROCOMPUTERS Rev. 1.0

8.6.8 START/STOP Condition Detect Conditions

The START/STOP condition detect conditions are shown in 8.6.3 are satisfied, a START/STOP condition can be detected. Note: When a STOP condition is detected in the slave mode (MST = 0), an interrupt request signal “IICIRQ” is generated to the CPU. Fig. 8.6.11 START Condition/STOP Condition Detect Timing Dia- gram Standard Clock Mode 6.5 µs (26 cycles) < SCL release time 3.25 µs (13 cycles) < Setup time 3.25 µs (13 cycles) < Hold time High-speed Clock Mode 1.0 µs (4 cycles) < SCL release time 0.5 µs (2 cycles) < Setup time 0.5 µs (2 cycles) < Hold time Table 8.6.3 START Condition/STOP Condition Detect Conditions Note:Absolute time at φ = 4 MHz. The value in parentheses denotes the num- ber of φ cycles. H o l d t i m eS e t u p t i m e S C L S D A S T A R T c o n d i t i o n S D A S T O P c o n d i t i o n S C L r e l e a s e t i m e H o l d t i m eS e t u p t i m e

8.6.9 Address Data Communication

There are two address data communication formats, namely, 7-bit addressing format and 10-bit addressing format. The respective ad- dress communication formats is described below. (1) 7-bit addressing format To meet the 7-bit addressing format, set the 10BIT SAD bit of the I2C control register (address 00DA16) to “0.” The first 7-bit address data transmitted from the master is compared with the high-order 7-bit slave address stored in the I 2C address register (address 00D816). At the time of this comparison, address comparison of the RBW bit of the I2C address register (address 00D816) is not made. For the data transmission format when the 7-bit addressing format is selected, refer to Figure 8.6.12, (1) and (2). (2) 10-bit addressing format To meet the 10-bit addressing format, set the 10BIT SAD bit of the I2C control register (address 00DA16) to “1.” An address comparison is made between the first-byte address data transmitted from the master and the 7-bit slave address stored in the I 2C address register (address 00D816). At the time of this comparison, an address com- parison between the RBW bit of the I2C address register (address 00D8 16) and the R/W bit which is the last bit of the address data transmitted from the master is made. In the 10-bit addressing mode, the R/W bit which is the last bit of the address data not only specifies the direction of communication for control data but also is processed as an address data bit. When the first-byte address data matches the slave address, the AAS bit of the I 2C status register (address 00D916) is set to “1.” After the second-byte address data is stored into the I2C data shift register (address 00D716), make an address comparison between the sec- ond-byte data and the slave address by software. When the address data of the 2nd bytes matches the slave address, set the RBW bit of the I 2C address register (address 00D816) to “1” by software. This processing can match the 7-bit slave address and R/W data, which are received after a RESTART condition is detected, with the value of the I2C address register (address 00D816). For the data transmis- sion format when the 10-bit addressing format is selected, refer to Figure 8.6.12, (3) and (4).

SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER for VOLTAGE SYNTHESIZER with ON-SCREEN DISPLAY CONTROLLER M37212M4/M8–XXXSP, M37212M6–XXXSP/FP M37212EFSP/FP MITSUBISHI MICROCOMPUTERS Rev. 1.0

8.6.10 Example of Master Transmission

An example of master transmission in the standard clock mode, at the SCL frequency of 100 kHz and in the ACK return mode is shown below. À Set a slave address in the high-order 7 bits of the I 2C address register (address 00D816) and “0” in the RBW bit. \` Set the ACK return mode and SCL = 100 kHz by setting “8516” in the I2C clock control register (address 00DB16). ´ Set “1016” in the I2C status register (address 00D916) and hold the SCL at the HIGH. fl Set a communication enable status by setting “4816” in the I2C control register (address 00DA16). ˜ Set the address data of the destination of transmission in the high- order 7 bits of the I2C data shift register (address 00D716) and set “0” in the least significant bit. – Set “F016” in the I2C status register (address 00D916) to generate a START condition. At this time, an SCL for 1 byte and an ACK clock automatically occurs. † Set transmit data in the I 2C data shift register (address 00D716). At this time, an SCL and an ACK clock automatically occurs. ˙ When transmitting control data of more than 1 byte, repeat step ˘ . ¨ Set “D016” in the I2C status register (address 00D916). After this, if ACK is not returned or transmission ends, a STOP condition will be generated.

8.6.11 Example of Slave Reception

An example of slave reception in the high-speed clock mode, at the SCL frequency of 400 kHz, in the ACK non-return mode, using the addressing format, is shown below. À Set a slave address in the high-order 7 bits of the I 2C address register (address 00D816) and “0” in the RBW bit. \` Set the no ACK clock mode and SCL = 400 kHz by setting “2516” in the I2C clock control register (address 00DB16). ´ Set “1016” in the I2C status register (address 00D916) and hold the SCL at the HIGH. fl Set a communication enable status by setting “4816” in the I2C control register (address 00DA16). ˜ When a START condition is received, an address comparison is made. – •When all transmitted address are“0” (general call): AD0 of the I2C status register (address 00D916) is set to “1”and an interrupt request signal occurs.

  • When the transmitted addresses match the address set in À : ASS of the I2C status register (address 00D916) is set to “1” and an interrupt request signal occurs.
  • In the cases other than the above: AD0 and AAS of the I2C status register (address 00D916) are set to “0” and no interrupt request signal occurs. † Set dummy data in the I2C data shift register (address 00D716). ˙ When receiving control data of more than 1 byte, repeat step ˘ . ¨ When a STOP condition is detected, the communication ends.

SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER for VOLTAGE SYNTHESIZER with ON-SCREEN DISPLAY CONTROLLER M37212M4/M8–XXXSP, M37212M6–XXXSP/FP M37212EFSP/FP MITSUBISHI MICROCOMPUTERS Rev. 1.0 Fig. 8.6.12 Address Data Communication Format SS l a v e a d d r e s s A D a t aA D a t aA / A PR / W 7 b i t s“ 0 ”1 t o 8 b i t s1 t o 8 b i t s SS l a v e a d d r e s s A D a t a AD a t a AP 7 b i t s“ 1 ”1 t o 8 b i t s1 t o 8 b i t s ( 1 ) A m a s t e r - t r a n s m i t t e r t r a n s m i t s d a t a t o a s l a v e - r e c e i v e r S S l a v e a d d r e s s s t b i t s A A D a t a 7 b i t s“ 0 ”8 b i t s1 t o 8 b i t s ( 2 ) A m a s t e r - r e c e i v e r r e c e i v e s d a t a f r o m a s l a v e - t r a n s m i t t e r S l a v e a d d r e s s n d b y t e A D a t aA / A P 1 t o 8 b i t s S S l a v e a d d r e s s s t b i t s A A 7 b i t s“ 0 ”8 b i t s7 b i t s 3 ) A m a s t e r - t r a n s m i t t e r t r a n s m i t s d a t a t o a s l a v e - r e c e i v e r w i t h a 1 0 - b i t a d d r e s s S l a v e a d d r e s s n d b y t e D a t a 1 t o 8 b i t s S r S l a v e a d d r e s s s t b i t s A D a t a A P 1 t o 8 b i t s“ 1 ” ( 4 ) A m a s t e r - r e c e i v e r r e c e i v e s d a t a f r o m a s l a v e - t r a n s m i t t e r w i t h a 1 0 - b i t a d d r e s s S: S T A R T c o n d i t i o nP S T O P c o n d i t i o n A: A C K b i tR W R e a d W r i t e b i t S r:R e s t a r t c o n d i t i o n F r o m m a s t e r t o s l a v e F r o m s l a v e t o m a s t e r R / W R / W R / W R / W

8.6.12 Precautions when using multi-master

(1) Read-modify-write instruction The precautions when the raead-modify-write instruction such as SEB, CLB etc. is executed for each register of the multi-master I2C-BUS interface are described below. 2C data shift register (S0) When executing the read-modify-write instruction for this register during transfer, data may become a value not intended. 2C address register (S0D) When the read-modify-write instruction is executed for this register at detecting the STOP condition, data may become a value not intended. It is because hardware changes the read/write bit (RBW) at the above timing. 2C status register (S1) Do not execute the read-modify-write instruction for this register because all bits of this register are changed by hardware. 2C control register (S1D) When the read-modify-write instruction is executed for this register at detecting the START condition or at completing the byte transfer, data may become a value not intended. Because hardware changes the bit counter (BC0–BC2) at the above timing. 2C clock control register (S2) The read-modify-write instruction can be executed for this register. (2) START condition generating procedure us- ing multi-master À Procedure example (The necessary conditions of the generating procedure are described as the following \ to ˜ ). LDA — (Taking out of slave address value) SEI (Interrupt disabled) BBS 5,S1,BUSBUSY (BB flag confirming and branch process) BUSFREE: STA S0 (Writing of slave address value) LDM #$F0, S1 (Trigger of START condition generating) CLI (Interrupt enabled) BUSBUSY: CLI (Interrupt enabled) \ Use “STA,” “STX” or “STY” of the zero page addressing instruction for writing the slave address value to the I 2C data shift register. ´ Use “LDM” instruction for setting trigger of START condition gener- ating. fl Write the slave address value of above \` and set trigger of START condition generating of above ´ continuously shown the above procedure example. ˜ Disable interrupts during the following three process steps:

  • BB flag confirming
  • Writing of slave address value
  • Trigger of START condition generating When the condition of the BB flag is bus busy, enable interrupts immediately.

SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER for VOLTAGE SYNTHESIZER with ON-SCREEN DISPLAY CONTROLLER M37212M4/M8–XXXSP, M37212M6–XXXSP/FP M37212EFSP/FP MITSUBISHI MICROCOMPUTERS Rev. 1.0 (3) RESTART condition generating procedure À Procedure example (The necessary conditions of the generating procedure are described as the following \ to ¯ .) Execute the following procedure when the PIN bit is “0.” LDM #$00, S1 (Select slave receive mode) LDA — (Taking out of slave address value) SEI (Interrupt disabled) STA S0 (Writing of slave address value) LDM #$F0, S1 (Trigger of RESTART condition generating) CLI (Interrupt enabled) \ Select the slave receive mode when the PIN bit is “0.” Do not write “1” to the PIN bit. Neither “0” nor “1” is specified for the writing to the BB bit. The TRX bit becomes “0” and the SDA pin is released. ´ The SCL pin is released by writing the slave address value to the I 2C data shift register. Use “STA,” “STX” or “STY” of the zero page addressing instruction for writing. fl Use “LDM” instruction for setting trigger of RESTART condition gen- erating. ˜ Write the slave address value of above ´ and set trigger of RE- START condition generating of above ˆ continuously shown the above procedure example. – Disable interrupts during the following two process steps:

  • Writing of slave address value
  • Trigger of RESTART condition generating (4) STOP condition generating procedure À Procedure example (The necessary conditions of the generating procedure are described as the following \ to ˆ .) SEI (Interrupt disabled) LDM #$C0, S1 (Select master transmit mode) NOP (Set NOP) LDM #$D0, S1 (Trigger of STOP condition generating) CLI (Interrupt enabled) \ Write “0” to the PIN bit when master transmit mode is select. ´ Execute “NOP” instruction after setting of master transmit mode. Also, set trigger of STOP condition generating within 10 cycles af- ter selecting of master trasmit mode. fl Disable interrupts during the following two process steps:
  • Select of master transmit mode
  • Trigger of STOP condition generating (5) Writing to I2C status register Do not execute an instruction to set the PIN bit to “1” from “0” and an instruction to set the MST and TRX bits to “0” from “1” simultaneously. It is because it may enter the state that the SCL pin is released and the SDA pin is released after about one machine cycle. Do not ex- ecute an instruction to set the MST and TRX bits to “0” from “1” si- multaneously when the PIN bit is “1.” It is because it may become the same as above. (6) Process of after STOP condition generating Do not write data in the I2C data shift register S0 and the I2C status register S1 until the bus busy flag BB becomes “0” after generating the STOP condition in the master mode. It is because the STOP condition waveform might not be normally generated. Reading to the above registers do not have the problem.

SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER for VOLTAGE SYNTHESIZER with ON-SCREEN DISPLAY CONTROLLER M37212M4/M8–XXXSP, M37212M6–XXXSP/FP M37212EFSP/FP MITSUBISHI MICROCOMPUTERS Rev. 1.0

8.7 PWM OUTPUT FUNCTION

This microcomputer is equipped with two 14-bit PWM (DA) and eight 8-bit PWMs (PWM0–PWM7). DA1 and DA2 have a 14-bit resolution with the minimum resolution bit width of 0.25 µs and a repeat period of 4096 µs (for f(XIN) = 8 MHz). PWM0–PWM7 have the same circuit structure and an 8-bit resolution with minimum resolution bit width of 4 µs and repeat period of 1024 µs (for f(XIN) = 8 MHz). Figure 8.7.1 shows the PWM block diagram. The PWM timing gen- erating circuit applies individual control signals to DA and PWM0– PWM7 using f(X IN) divided by 2 as a reference signal.

8.7.1 Data Setting

When outputting DA, first set the high-order 8 bits to the DA-H regis- ter (address 00CE 16), then the low-order 6 bits to the DA-L register (address 00CF16). When outputting PWM0–PWM7, set 8-bit output data to the PWMi register (i means 0 to 7; addresses 00D016 to 00D4 16, 00F616 to 00F816).

8.7.2 Transferring Data from Registers to PWM

Data transfer from the 8-bit PWM register to the 8-bit PWM circuit is executed at writing data to the register. The signal output from the 8-bit PWM output pin corresponds to the contents of this register. Also, data transfer from the DA register (addresses 00CE 16 and 00CF 16) to the 14-bit PWM circuit is executed at writing data to the DA-L register (address 00CF16). Reading from the DA-H register (address 00CE16) means reading this transferred data. Accordingly, it is possible to confirm the data being output from the DA output pin by reading the DA register.

8.7.3 Operating of 8-bit PWM

The following explains PWM operation. First, set the bit 0 of PWM output control register 1 (address 00D516) to “0” (at reset, bit 0 is already set to “0” automatically), so that the PWM count source is supplied. PWM0–PWM3 are also used as pins P60–P63, PWM4–PWM7 are also used as ports P00–P0 3, respectively. For PWM0–PWM3, set the corresponding bits of the ports P6 direction register to “1” (output mode). For PWM4–PWM7, set those of the port P0 direction regis- ter to “1.” And select each output polarity by bit 3 of PWM output control register 2 (address 00D6 16). Then, for PWM0–PWM5, set bits 2 to 7 of PWM output control register 1 to “1” (PWM output). For PWM6 and PWM7, set bits 0 and 1 of PWM output control register 2 to “1.” The PWM waveform is output from the PWM output pins by setting these registers. Figure 8.7.2 shows the 8-bit PWM timing. One cycle (T) is com- posed of 256 (2 8) segments. The 8 kinds of pulses, relative to the weight of each bit (bits 0 to 7), are output inside the circuit during 1 cycle. Refer to Figure 8.7.2 (a). The 8-bit PWM outputs waveform which is the logical sum (OR) of pulses corresponding to the con- tents of bits 0 to 7 of the 8-bit PWM register. Several examples are shown in Figure 8.7.2 (b). 256 kinds of output (HIGH area: 0/256 to 255/256) are selected by changing the contents of the PWM regis- ter. A length of entirely HIGH output cannot be output, i.e. 256/256.

8.7.4 Operating of 14-bit PWM

As with 8-bit PWM, set the bit 0 of PWM output control register 1 (address 00D5 16) to “0” (at reset, bit 0 is already set to “0” automati- cally), so that the PWM count source is supplied. Next, select the output polarity by bit 2 of PWM output control register 2 (address 00D6 16). Then, the 14-bit PWM outputs from the DA output pin by setting bit 1 of PWM output control register 1 to “0” (at reset, this bit already set to “0” automatically) to select the DA output. The output example of the 14-bit PWM is shown in Figure 8.7.3. The 14-bit PWM divides the data of the DA latch into the low-order 6 bits and the high-order 8 bits. The fundamental waveform is determined with the high-order 8-bit data “D H .” A HIGH area with a length t 5 DH (HIGH area of funda- mental waveform) is output every short area of “t” = 256τ = 64 µs (τ is the minimum resolution bit width of 250 ns). The HIGH level area increase interval (tm ) is determined with the low-order 6-bit data “DL.” The HIGH are of smaller intervals “tm ” shown in Table 5 is longer by t than that of other smaller intervals in PWM repeat period “T” = 64t. Thus, a rectangular waveform with the different HIGH width is output from the DA pins. Accordingly, the PWM output changes by τ unit pulse width by changing the contents of the DA-H and DA-L registers. A length of entirely HIGH cannot be output, i. e. 256/256.

8.7.5 Output after Reset

At reset, the output of ports P60–P63 and P00–P03 are in the high- impedance state, and the contents of the PWM register and the PWM circuit are undefined. Note that after reset, the PWM output is undefined until setting the PWM register. LSB Table 8.7.1 Relation Between the Low-order 6-bit Data and High- level Area Increase Interval Area Longer by τ than That of Other tm (m = 0 to 63) Nothing m = 32 m = 16, 48 m = 8, 24, 40, 56 m = 4, 12, 20, 28, 36, 44, 52, 60 m = 2, 6, 10, 14, 18, 22, 26, 30, 34, 38, 42, 46, 50, 54, 58, 62 Low-order 6 bits of Data 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0

SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER for VOLTAGE SYNTHESIZER with ON-SCREEN DISPLAY CONTROLLER M37212M4/M8–XXXSP, M37212M6–XXXSP/FP M37212EFSP/FP MITSUBISHI MICROCOMPUTERS Rev. 1.0 Fig. 8.7.1 PWM Block Diagram PWM1 register (Address : 00D116) 1/2XIN PWM timing generating circuit PWM register (Address : 00D016) b7 b0 8-bit PWM circuit PN3 P60 PW2 D6 0 PWM0 P61 PW3 D6 1 PWM1 P62 PW4 D6 2 PWM2 P63 PW5 D6 3 PWM3 P00 PW6 D0 0 PWM4 P02 PW7 D0 2 PWM5 PWM2 register (Address : 00D216) PWM3 register (Address : 00D316) PWM4 register (Address : 00D416) PWM5 register (Address : 00F616) PW0 is as same contents PWM6 register (Address : 00D716) PWM7 register (Address : 00F816) P03 PN1 D0 3 PWM7 P02 PN0 D0 2 PWM6 Inside of with the others. Data bus Selection gate : PW FPWM output control register 1 PN FPWM output control register 2 Connected to black colored side when reset. Pass gate D0 FPort P0 direction register 14-bit PWM circuit PN2 PN4 PW1 DA MSB DA-H register (Address : 00CE16) DA latch (14 bits) DA-L register (See note) (Address : 00CF16) LSB 6 14 DA b7 b0 Note: The DA-L register also functions as the low-order 6 bits of the DA latch. D6 FPort P6 direction register

SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER for VOLTAGE SYNTHESIZER with ON-SCREEN DISPLAY CONTROLLER M37212M4/M8–XXXSP, M37212M6–XXXSP/FP M37212EFSP/FP MITSUBISHI MICROCOMPUTERS Rev. 1.0 Fig. 8.7.2 PWM Timing ( a ) P u l s e s s h o w i n g t h e w e i g h t o f e a c h b i t 1 3 5 7 9 2 0 3 0 4 0 5 0 6 0 7 0 8 0 9 0 1 0 0 1 1 0 1 2 0 1 3 0 1 4 0 1 5 0 1 6 0 1 7 0 1 8 0 1 9 0 2 0 0 2 1 0 2 2 0 2 3 0 2 4 0 2 5 0 2 5 5 4 1 2 2 0 2 8 3 6 4 4 5 2 6 0 6 8 7 6 8 4 9 2 1 0 0 1 0 8 1 1 6 1 2 4 1 3 2 1 4 0 1 4 8 1 5 6 1 6 4 1 7 2 1 8 0 1 8 8 1 9 6 2 0 4 2 1 2 2 2 0 2 2 8 2 3 6 2 4 4 2 5 2 1 6 4 8 8 0 1 1 2 1 4 4 1 7 6 2 0 8 2 4 0 2 4 4 0 5 6 7 2 8 8 1 0 4 1 2 0 1 3 6 1 5 2 1 6 8 1 8 4 2 0 0 2 1 6 2 3 2 2 4 8 3 2 9 6 1 6 0 2 2 4 6 4 1 9 2 B i t 7 2 6 1 0 1 4 1 8 2 2 2 6 3 0 3 4 3 8 4 2 4 6 5 0 5 4 5 8 6 2 6 6 7 0 7 4 7 8 8 2 8 6 9 0 9 4 9 8 1 0 2 1 0 6 1 1 0 1 1 4 1 1 8 1 2 2 1 2 6 1 3 0 1 3 4 1 3 8 1 4 2 1 4 6 1 5 0 1 5 4 1 5 8 1 6 2 1 6 6 1 7 0 1 7 4 1 7 8 1 8 2 1 8 6 1 9 0 1 9 4 1 9 8 2 0 2 2 0 6 2 1 0 2 1 4 2 1 8 2 2 2 2 2 6 2 3 0 2 3 4 2 3 8 2 4 2 2 4 6 2 5 0 2 5 4 B i t 6 B i t 5 B i t 4 B i t 3 B i t 2 B i t 1 1 2 8 B i t 0 P W M o u t p u t t = 4 ms T = 1 0 2 4 ms f XI N ) M H z ( b ) E x a m p l e o f 8 - b i t P W M t 0 01 6 ( 0 ) 0 11 6 ( 1 ) 1 81 6 ( 2 4 ) F F1 6 ( 2 5 5 ) T = 2 5 6 t

SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER for VOLTAGE SYNTHESIZER with ON-SCREEN DISPLAY CONTROLLER M37212M4/M8–XXXSP, M37212M6–XXXSP/FP M37212EFSP/FP MITSUBISHI MICROCOMPUTERS Rev. 1.0 Fig. 8.7.3 14-bit PWM Timing (f(XIN) = 8 MHz) 0 . 2 5 ms b 7b 0b 6b 5b 4b 3b 2b 1 0 0010110 b 1 3b 6 00 010110 b 0b 5 101000 S e t “ 2 C 1 6” t o D A - H r e g i s t e r . [ D A - H r e g i s t e r D H A t w r i t i n g o f D A - L b 0b 6b 5b 4b 3b 2b 1 010100 S e t “ 2 81 6” t o D A - L r e g i s t e r . [ D A - L r e g i s t e r ] D L A t w r i t i n g o f D A - L T h e s e b i t s d e c i d e H I G H l e v e l a r e a o f f u n d a m e n t a l w a v e f o r m T h e s e b i t s d e c i d e s m a l l e r i n t e r v a l “ t m ” i n w h i c h H I G H l e v a l a r e a i s H I G H l e v e l a r e a o f f u n d a m e n t a l w a v e f o r m t M i n i m u m r e s o l u t i o n b i t w i d t h ms H i g h - o r d e r 8 - b i t v a l u e o f D A l a t c h5H I G H l e v e l a r e a o f f u n d a m e n t a l w a v e f o r m F F0 0D 3F EF D … D 6D 40 20 1D 5 1 4 - b i t P W M o u t p u t 8 - b i t c o u n t e r 0 . 2 5 ms5 4 4 F F0 0D 3F EF DD 6D 40 20 1D 5 1 4 - b i t P W M o u t p u t 8 - b i t c o u n t e r 0 . 2 5 ms5 4 5 F u n d a m e n t a l w a v e f o r m W a v e f o r m o f s m a l l e r i n t e r v a l “ t m ” s p e c i f i e d b y l o w - o r d e r 6 b i t s F u n d a m e n t a l w a v e f o r m o f s m a l l e r i n t e r v a l t m w h i c h i s n o t s p e c i f i e d b y l o w o r d e r b i t s i s n o t c h a n g e d 1 4 - b i t P W M o u t p u t L o w - o r d e r 6 - b i t o u t p u t o f D A l a t c h 0 . 2 5 ms5 4 4 t = 0 . 2 5 ms T = 4 ms @ R e p e a t p e r i o d t0 t1 t2 t3 t4 t5 t5 9 t6 0 t6 1 t6 2 t6 [ D A l a t c h ] …… … b 7

2 C 2 B 2 A 0 3 0 2 0 10 02 C 2 B 2 A 0 3 0 2 0 10 0……

SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER for VOLTAGE SYNTHESIZER with ON-SCREEN DISPLAY CONTROLLER M37212M4/M8–XXXSP, M37212M6–XXXSP/FP M37212EFSP/FP MITSUBISHI MICROCOMPUTERS Rev. 1.0 Fig. 8.7.4 PWM Output Control Register 1 Fig. 8.7.5 PWM Output Control Register 2 b 7b 6 b 5b 4b 3 b 2b 1b 0 P W M o u t p u t c o n t r o l r e g i s t e r 1 ( P W ) [ A d d r e s s 0 0 D 5 B A f t e r r e s e t RW P W M O u t p u t C o n t r o l R e g i s t e r 1 N a m eF u n c t i o n s D A , P W M c o u n t s o u r c e s e l e c t i o n b i t P W 0 : C o u n t s o u r c e s u p p l y C o u n t s o u r c e s t o p P 60/ P W M 0 o u t p u t s e l e c t i o n b i t P W 0 : P 60 o u t p u t P W M o u t p u t P 61/ P W M 1 o u t p u t s e l e c t i o n b i t P W 0 : P 61 o u t p u t P W M o u t p u t P 62/ P W M 2 o u t p u t s e l e c t i o n b i t P W 0 : P 62 o u t p u t P W M o u t p u t

5 P 63/ P W M 3 o u t p u t

s e l e c t i o n b i t P W 0 : P 63 o u t p u t P W M o u t p u t

6 P 00/ P W M 4 o u t p u t

s e l e c t i o n b i t P W 0 : P 00 o u t p u t P W M o u t p u t D A / P N 4 s e l e c t i o n b i t P W 0 : D A o u t p u t P N 4 o u t p u t

7 P 01/ P W M 5 o u t p u t

s e l e c t i o n b i t P W 0 : P 01 o u t p u t P W M o u t p u t RW RW RW RW RW RW RW RW b7b6 b5b4b3 b2b1b0 PWM output control register 2 (PN) [Address 00D616] B After resetRW PWM Output Control Register 2 Name Functions DA output polarity selection bit (PN2) 0 : Positive polarity 1 : Negative polarity PWM output polarity selection bit (PN3) DA general-purpose output bit (PN4) 0 : Output LOW 1 : Output HIGH to 0Nothing is assigned. These bits are write disable bits. When these bits are read out, the values are “0.” 0 : Positive polarity 1 : Negative polarity RW RW RW RW P02/PWM6 output selection bit (PN0) 0 : P02 1 : PWM6 output 1 0R WP03/PWM7 output selection bit (PN1) 0 : P03 1 : PWM7 output

SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER for VOLTAGE SYNTHESIZER with ON-SCREEN DISPLAY CONTROLLER M37212M4/M8–XXXSP, M37212M6–XXXSP/FP M37212EFSP/FP MITSUBISHI MICROCOMPUTERS Rev. 1.0

8.8 A-D COMPARATOR

A-D comparator consists of 6-bit D-A converter and comparator. A-D comparator block diagram is shown in Figure 8.8.1. The reference voltage “V ref” for D-A conversion is set by bits 0 to 5 of the A-D control register (address 00EF16). The comparison result of the analog input voltage and the reference voltage “Vref” is stored in bit 4 of the A-D mode register (address 00EE 16). For A-D comparison, set “0” to corresponding bits of the direction register to use ports as analog input pins. Write the data for select of analog input pins to bits 0 to 2 of the A-D control register 1 and write the digital value corresponding to V ref to be compared to the bits 0 to 5 of the A-D control register. The voltage comparison starts by writing to the A-D control register 2, and it is completed after 16 ma- chine cycles (NOP instruction 5 8). Fig. 8.8.1 A-D Comparator Block Diagram A - D m o d e r e g i s t e r B i t s 0 t o 2 C o m p a r a t o r c o n t r o l D a t a b u s B i t 4 S w i t c h t r e e A - D c o n t r o l r e g i s t e r R e s i s t o r l a d d e r C o m p a - r a t o rA n a l o g s i g n a l s w i t c h B i t 5B i t 4B i t 3B i t 2B i t 1 B i t 0 A - D m o d e r e g i s t e rA - D 1 A - D 2 A - D 3 A - D 4 A - D 5 A - D 6 A - D 7 A - D 8

SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER for VOLTAGE SYNTHESIZER with ON-SCREEN DISPLAY CONTROLLER M37212M4/M8–XXXSP, M37212M6–XXXSP/FP M37212EFSP/FP MITSUBISHI MICROCOMPUTERS Rev. 1.0 Fig. 8.8.2 A-D Mode Register b 7b 6b 5b 4b 3b 2b 1b 0 A - D m o d e r e g i s t e r ( A D M ) [ A d d r e s s 0 0 E E1 B A f t e r r e s e t RW A - D M o d e R e g i s t e r t o 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 s A D M t o A D M N a m eF u n c t i o n s b 2 b 1 b 0 A D A D A D A D A D A D A D A D

4 S t o r a g e b i t o f c o m p a r i s o n

r e s u l t A D M 0 : I n p u t v o l t a g e < r e f e r e n c e v o l t a g e I n p u t v o l t a g e r e f e r e n c e v o l t a g e I n d e t e r m i n a t e 03T h i s b i t i s a w r i t e d i s a b l e b i t . W h e n t h i s b i t i s r e a d o u t t h e v a l u e i s RW R R — t o N o t h i n g i s a s s i g n e d . T h i s b i t s a r e w r i t e d i s a b l e b i t s . W h e n t h e s e b i t s a r e r e a d o u t t h e v a l u e s a r e R — Fig. 8.8.3 A-D Control Register b 7b 6b 5b 4b 3b 2b 1b 0 A - D c o n t r o l r e g i s t e r ( A D C ) [ A d d r e s s 0 0 E F1 B A f t e r r e s e t R W A D C o n t r o l R e g i s t e r t o 6 , 7 N a m eF u n c t i o n s D - A c o n v e r t e r s e t b i t s A D C t o A D C b 0b 1b 2 b 3 b 4 b 5 N o t h i n g i s a s s i g n e d . T h e s e b i t s a r e w r i t e d i s a b l e b i t s . W h e n t h e s e b i t s a r e r e e d o u t t h e v a l u e s a r e 000000 00000 0000 111 11111 111111 : 3 / 1 2 8 V c c : 5 / 1 2 8 V c c : 1 2 3 / 1 2 8 V c c : 1 2 5 / 1 2 8 V c c : 1 2 7 / 1 2 8 V c c : 1 / 1 2 8 V c c R W

SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER for VOLTAGE SYNTHESIZER with ON-SCREEN DISPLAY CONTROLLER M37212M4/M8–XXXSP, M37212M6–XXXSP/FP M37212EFSP/FP MITSUBISHI MICROCOMPUTERS Rev. 1.0 Fig. 8.9.2 ROM Correction Enable Register Fig. 8.9.1 ROM Correction Address Registers

8.9 ROM CORRECTION FUNCTION

This can correct program data in ROM. Up to 2 addresses can be corrected, a program for correction is stored in the ROM correction memory in RAM as the top address. The ROM correction vectors are 2 vectors. Vector 1 : address 02C0 Vector 2 : address 02E016 Set the address of the ROM data to be corrected into the ROM cor- rection address register. When the value of the counter matches the ROM data address in the ROM correction vector as the top address, the main program branches to the correction program stored in the ROM memory for correction. To return from the correction program to the main program, the op code and operand of the JMP instruction (total of 3 bytes) are necessary at the end of the correction program. The ROM correction function is controlled by the ROM correction enable register. Notes 1:Specify the first address (op code address) of each instruction as the ROM correction address. 2:Use the JMP instruction (total of 3 bytes) to return from the correction program to the main program. 3:Do not set the same ROM correction address to vectors 1 and 2. 4:Only M37212M8-XXXSP and M37212EFSP/FP have ROM correc- tion function. 0 2 1 71 6R O M c o r r e c t i o n a d d r e s s 1 ( h i g h - o r d e r ) 0 2 1 81 6R O M c o r r e c t i o n a d d r e s s 1 ( l o w - o r d e r ) 0 2 1 91 6R O M c o r r e c t i o n a d d r e s s 2 ( h i g h - o r d e r ) 0 2 1 A1 6R O M c o r r e c t i o n a d d r e s s 2 ( l o w - o r d e r ) b 7b 6b 5b 4b 3b 2b 1b 0 R O M c o r r e c t i o n e n a b l e r e g i s t e r ( R C R ) [ A d d r e s s 0 2 1 B1 BA f t e r r e s e t R O M C o r r e c t i o n E n a b l e R e g i s t e r

0 V e c t o r 1 e n a b l e b i t ( R C 0 )

0 : D i s a b l e d E n a b l e d

1 V e c t o r 2 e n a b l e b i t ( R C 1 ) 0

: D i s a b l e d E n a b l e d t o N o t h i n g i s a s s i g n e d . T h e s e b i t s a r e w r i t e d i s a b l e b i t s . W h e n t h e s e b i t s a r e r e a d o u t t h e v a l u e s a r e 2 , 3 F i x t h e s e b i t s t o “ 0 . ” 0 RW RW RW RW

SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER for VOLTAGE SYNTHESIZER with ON-SCREEN DISPLAY CONTROLLER M37212M4/M8–XXXSP, M37212M6–XXXSP/FP M37212EFSP/FP MITSUBISHI MICROCOMPUTERS Rev. 1.0

8.10 OSD FUNCTIONS

Table 8.10.1 outlines the OSD functions. This microcomputer incor- porates an OSD control circuit of 24 characters 5 2 lines. OSD is controlled by the CRT control register. Up to 256 kinds of characters can be displayed. The colors can be specified for each character and up to 4 kinds of colors can be displayed on one screen. A combina- tion of up to 8 colors can be obtained by using each output signal (R, G, and B). Characters are displayed in a 12 5 16 dots configuration to obtain smooth character patterns (refer to Figure 8.10.1). The following shows the procedure how to display characters on the CRT screen. À Write the display character code in OSD RAM. \` Specify the display color by using the color register. ´ Write the color register in which the display color is set in OSD RAM. fl Specify the vertical position by using the vertical position register. ˜ Specify the character size by using the character size register. – Specify the horizontal position by using the horizontal position register. † Write the display enable bit to the designated block display flag of the CRT control register. When this is done, the OSD starts ac- cording to the input of the V SYNC signal. Table 8.10.1 Features of Each Display Mode Number of display characters 24 characters 5 2 lines Dot structure 12 5 16 dots Kinds of characters 256 kinds Kinds of character sizes 3 kinds Attribute Border (black) Character font coloring 1 screen : 8 kinds (per character unit) Character background coloring 1 screen : 8 kinds (per character unit) OSD output R, G, B Display position Horizontal: 64 levels, Vertical: 128 levels Display expansion (multiline display) Possible Parameter Functions

SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER for VOLTAGE SYNTHESIZER with ON-SCREEN DISPLAY CONTROLLER M37212M4/M8–XXXSP, M37212M6–XXXSP/FP M37212EFSP/FP MITSUBISHI MICROCOMPUTERS Rev. 1.0 The OSD circuit has an extended display mode. This mode allows multiple lines (3 lines or more) to be displayed on the screen by inter- rupting the display each time one line is displayed and rewriting data in the block for which display is terminated by software. shows the block diagram of the OSD circuit. Figure 8.10.3 shows the CRT control register. Fig. 8.10.1 Configuration of OSD Character Display Area 12 dots 16 dots

SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER for VOLTAGE SYNTHESIZER with ON-SCREEN DISPLAY CONTROLLER M37212M4/M8–XXXSP, M37212M6–XXXSP/FP M37212EFSP/FP MITSUBISHI MICROCOMPUTERS Rev. 1.0 Fig. 8.10.2 Block Diagram of OSD Circuit D i s p l a y o s c i l l a t i o n c i r c u i t O S C 1 O S C 2 HS Y N C VS Y N C O S D R A M b i ts c h a r a c t e r s ~2 l i n e s D a t a b u s O S D R O M d o t s ~1 d o t s ~2 c h a r a c t e r s S h i f t r e g i s t e r b i t C l o c k f o r O S D O u t p u t c i r c u i t R G B O S D C o n t r o l c i r c u i t O U T 1 O U T C o n t r o l r e g i s t e r s f o r O S D a d d r e s s E a d d r e s s e s E E a d d r e s s e s E a d d r e s s e s E t o E a d d r e s s E a d d r e s s E C 1 H o r i z o n t a l p o s i t i o n r e g i s t e r V e r t i c a l p o s i t i o n r e g i s t e r C h a r a c t e r s i z e r e g i s t e r C o l o r r e g i s t e r C R T c o n t r o l r e g i s t e r C R T p o r t c o n t r o l r e g i s t e r S h i f t r e g i s t e r b i t

SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER for VOLTAGE SYNTHESIZER with ON-SCREEN DISPLAY CONTROLLER M37212M4/M8–XXXSP, M37212M6–XXXSP/FP M37212EFSP/FP MITSUBISHI MICROCOMPUTERS Rev. 1.0 Fig. 8.10.3 CRT Control Register b7 b6 b5 b4 b3 b2 b1 b0 CRT control register (CC) [Address 00EA16] B Name Functions After reset R W CRT Control Register

0 All-blocks display control

bit (CC0) (See note) 0 : All-blocks display off 1 : All-blocks display on

1 Block 1 display control bit

(CC1) 0 : Block 1 display off 1 : Block 1 display on 2 0 : Block 2 display off 1 : Block 2 display on to Note: Display is controlled by logical product (AND) between the all-blocks display control bit and each block control bit. Nothing is assigned. These bits are write disable bits. When these bits are read out, the values are “0.” Block 2 display control bit (CC2) RW RW RW 7 0 : P10 1 : OUT2 0P10/OUT2 pin switch bit (CC7) RW

SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER for VOLTAGE SYNTHESIZER with ON-SCREEN DISPLAY CONTROLLER M37212M4/M8–XXXSP, M37212M6–XXXSP/FP M37212EFSP/FP MITSUBISHI MICROCOMPUTERS Rev. 1.0

8.10.1 Display Position

The display positions of characters are specified in units called a “block.” There are 2 blocks, blocks 1 and 2. Up to 24 characters can be displayed in each block (refer to “8.10.3 Memory for OSD”). The display position of each block can be set in both horizontal and vertical directions by software. The display start position in the horizontal direction can be selected for all blocks in common from 64-step display positions in units of C (TC = OSD oscillation cycle). The display start position in the vertical direction for each block can be selected from 128-step display positions in units of 4 scanning lines. Blocks are displayed in conformance with the following rules:

  • Block 2 is displayed after the display of block 1 is completed (Figure 8.10.4 (a)).
  • When the display position of block 1 is overlapped with that of block 2 (Figure 8.10.4 (b)), the block 1 is displayed on the front.
  • When another block display position appears while one block is displayed (Figure 8.10.4 (c)),only block 1 is displayed. Similarly, when multiline display, block 1 is displayed after the display of block 2 is completed. Fig. 8.10.4 Display Position H R C B l o c k 1 B l o c k 2 ( a ) E x a m p l e w h e n e a c h b l o c k i s s e p a r a t e d B l o c k 1 ( b ) E x a m p l e w h e n b l o c k 2 o v e r l a p s w i t h b l o c k 1 B l o c k i s n o t d i s p l a y e d H R C V1 C V2 ( c ) E x a m p l e w h e n b l o c k 2 o v e r l a p s i n p r o c e s s o f b l o c k 1 B l o c k 2 N o t e s 1 : C V 1 o r C V 2 i n d i c a t e s t h e v e r t i c a l d i s p l a y s t a r t p o s i t i o n o f d i s p l a y b l o c k 1 o r 2 . H R i n d i c a t e s t h e h o r i z o n t a l d i s p l a y s t a r t p o s i t i o n o f d i s p l a y b l o c k o r C V1 H R C V 1 = C V 2 C V1 B l o c k 1 ( s e c o n d ) ‹ N o t d i s p l a y e d ‹ N o t d i s p l a y e d B l o c k 1

SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER for VOLTAGE SYNTHESIZER with ON-SCREEN DISPLAY CONTROLLER M37212M4/M8–XXXSP, M37212M6–XXXSP/FP M37212EFSP/FP MITSUBISHI MICROCOMPUTERS Rev. 1.0 The vertical display start position is determined by counting the hori- zontal sync signal (HSYNC ). At this time, when VSYNC and HSYNC are positive polarity (negative polarity), it starts to count the rising edge (falling edge) of H SYNC signal from after fixed cycle of rising edge (falling edge) of VSYNC signal. So interval from rising edge (falling edge) of VSYNC signal to rising edge (falling edge) of HSYNC signal needs enough time (2 machine cycles or more) for avoiding jitter. The polarity of HSYNC and VSYNC signals can select with the CRT port control register (address 00EC16). Fig. 8.10.5 Supplement Explanation for Display Position W h e n b i t s 0 a n d 1 o f t h e C R T p o r t c o n t r o l r e g i s t e r a d d r e s s E C 1 a r e s e t t o n e g a t i v e p o l a r i t y VS Y N C s i g n a l i n p u t VS Y N C c o n t r o l s i g n a l i n m i c r o c o m p u t e r t o [ms a t f XI N ) M H z P e r i o d o f c o u n t i n g H S Y N C s i g n a l ( S e e n o t e 2 ) H S Y N C s i g n a l i n p u t N o t c o u n t 12345 N o t e s 1 : T h e v e r t i c a l p o s i t i o n i s d e t e r m i n e d b y c o u n t i n g f a l l i n g e d g e o f H S Y N C s i g n a l a f t e r r i s i n g e d g e o f VS Y N C c o n t r o l s i g n a l i n t h e m i c r o c o m p u t e r : D o n o t g e n e r a t e f a l l i n g e d g e o f H S Y N C s i g n a l n e a r r i s i n g e d g e o f VS Y N C c o n t r o l s i g n a l i n m i c r o c o m p u t e r t o a v o i d j i t t e r : T h e p u l s e w i d t h o f VS Y N C a n d H S Y N C n e e d s m a c h i n e c y c l e s o r m o r e 8 m a c h i n e c y c l e s o r m o r e 8 m a c h i n e c y c l e s o r m o r e

SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER for VOLTAGE SYNTHESIZER with ON-SCREEN DISPLAY CONTROLLER M37212M4/M8–XXXSP, M37212M6–XXXSP/FP M37212EFSP/FP MITSUBISHI MICROCOMPUTERS Rev. 1.0 Fig. 8.10.6 Vertical Position Register i The vertical display start position for each block can be set in 512 steps (where each step is 1TH (TH : HSYNC cycle)) as values “0016” to “7F16” in vertical position register i (i = 1 and 2) (addresses 00E116 and 00E216) The vertical position register i is shown in Figure 8.10.6. b7 b6 b5 b4 b3 b2 b1 b0 Vertical position register i (CVi) (i = 1 and 2) [Addresses 00E116, 00E216] B Name Functions After reset R W Vertical Position Register i to Vertical display start positions 128 steps (0016 to 7F16) Indeterminate (CVi : CVi0 to CVi6) Nothing is assigned. This bit is a write disable bit. When this bit is read out, the value is “0.” RW

SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER for VOLTAGE SYNTHESIZER with ON-SCREEN DISPLAY CONTROLLER M37212M4/M8–XXXSP, M37212M6–XXXSP/FP M37212EFSP/FP MITSUBISHI MICROCOMPUTERS Rev. 1.0 The horizontal display start position is common to all blocks, and can be set in 64 steps (where 1 step is 4TC , TC being the OSD oscillation cycle) as values “0016” to “3F16” in bits 0 to 5 of the horizontal posi- tion register (address 00D116). The horizontal position register is shown in Figure 8.10.7. Fig. 8.10.7 Horizontal Position Register b7 b6 b5 b4 b3 b2 b1 b0 Horizontal position register (HR) [Address 00E016] B Name Functions After reset RW Horizontal Position Register 0to 6, 7 Horizontal display start positions (HR0 to HR5) 64 steps (0016 to 3F16) 0 0Nothing is assigned. These bits are write disable bits. When thses bits are read out, the values are “0.” RW

SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER for VOLTAGE SYNTHESIZER with ON-SCREEN DISPLAY CONTROLLER M37212M4/M8–XXXSP, M37212M6–XXXSP/FP M37212EFSP/FP MITSUBISHI MICROCOMPUTERS Rev. 1.0 Fig. 8.10.8 Character Size Register

8.10.2 Character Size

The size of characters to be displayed can be from 3 sizes for each block. Use the character size register (address 00E416) to set a char- acter size. The character size of block 1 can be specified by using bits 0 and 1 of the character size register; the character size of block 2 can be specified by using bits 2 and 3. Figure 8.10.8 shows the character size register. The character size can be selected from 3 sizes: minimum size, me- dium size and large size. Each character size is determined by the number of scanning lines in the height (vertical) direction and the oscillating cycle for display (T C ) in the width (horizontal) direction. The minimum size consists of [1 scanning line] 5 [1TC ]; the medium size consists of [2 scanning lines] 5 [2TC ]; and the large size con- sists of [3 scanning lines] 5 [3TC ]. Table 8.10.2 shows the relation between the set values in the character size register and the charac- ter sizes. b7 b6 b5 b4 b3 b2 b1 b0 Character size register (CS) [Address 00E416] B Name Functions After reset R W Character Size Register 0, 1 Character size of block 1 selection bits (CS10, CS11) 00 : Minimum size 01 : Medium size 10 : Large size 11 : Do not set. Indeterminate 2,3 to7 Character size of block 2 selection bits (CS20,CS21) 00 : Minimum size 01 : Medium size 10 : Large size 11 : Do not set. Nothing is assigned. These bits are write disable bits. When these bits are read out, the values are “0.” Indeterminate RW RW

SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER for VOLTAGE SYNTHESIZER with ON-SCREEN DISPLAY CONTROLLER M37212M4/M8–XXXSP, M37212M6–XXXSP/FP M37212EFSP/FP MITSUBISHI MICROCOMPUTERS Rev. 1.0 Mini- mum Medium Large Horizontal display start position Fig. 8.10.9 Display Start Position of Each Character Size (Horizontal Direction) Note: The display start position in the horizontal direction is not affected by the character size. In other words, the horizontal display start position is common to all blocks even when the character size varies with each block (refer to Figure 8.10.9). Set values of character size register Width (horizontal) direction TC : oscillating cycle for display 1 TC 2 TC 3 TC Height (vertical) direction scanning lines Character size Minimum Medium Large This is not available CSn1 CSn0 Table. 8.10.2 Relation between Set Values in Character Size Register and Character Sizes

SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER for VOLTAGE SYNTHESIZER with ON-SCREEN DISPLAY CONTROLLER M37212M4/M8–XXXSP, M37212M6–XXXSP/FP M37212EFSP/FP MITSUBISHI MICROCOMPUTERS Rev. 1.0

8.10.3 Clock for OSD

As a clock for display to be used for OSD, it is possible to select one of the following 4 types.

  • Main clock supplied from XIN pin
  • Main clock supplied from XIN pin divided by I.5
  • Clock from the ceramic resonator or the LC or oscillator from the pins OSC1 and OSC2
  • Clock from the ceramic resonator or the quartz-crystal oscillator supplied from the pins OSC1 and OSC2. This OSD clock for each block can be selected by the CRT clock selection register (address 00ED 16). When selecting the main clock, set the oscillation frequency to 8 MHz. Fig. 8.10.10 Block Diagram of OSD Selection Circuit b 7b 6b 5b 4b 3b 2b 1b 0 C R T c l o c k s e l e c t i o n r e g i s t e r ( C K ) [ A d d r e s s 0 0 E D 1 BN a m eF u n c t i o n sA f t e r r e s e t R W C R T C l o c k S e l e c t i o n R e g i s t e r 0 , 1 C R T c l o c k s e l e c t i o n b i t s C K C K S i n c e t h e m a i n c l o c k i s u s e d a s t h e c l o c k f o r d i s p l a y t h e o s c i l l a t i o n f r e q u e n c y i s l i m i t e d B e c a u s e o f t h i s t h e c h a r a c t e r s i z e i n w i d t h h o r i z o n t a l d i r e c t i o n i s a l s o l i m i t e d I n t h i s c a s e p i n s O S C a n d O S C a r e a l s o u s e d a s i n p u t p o r t s P a n d P r e s p e c t i v e l y T h e c l o c k f o r O S D i s s u p p l i e d b y c o n n e c t i n g t h e f o l l o w i n g a c r o s s t h e p i n s O S C a n d O S C a c e r a m i c r e s o n a t o r o n l y f o r O S D a n d a f e e d b a c k r e s i s t o r a q u a r t z c r y s t a l o s c i l l a t o r o n l y f o r O S D a n d a f e e d b a c k r e s i s t o r S e e n o t 2 t o 7 0 000000 b 1 T h e c l o c k f o r d i s p l a y i s s u p p l i e d b y c o n n e c t i n g R C o r L C a c r o s s t h e p i n s O S C a n d O S C F u n c t i o n s b 0 O S D o s c i l l a t i o n f r e q u e n c y f XI N ) O S D o s c i l l a t i o n f r e q u e n c y f XI N ) N o t e : I t i s n e c e s s a r y t o c o n n e c t o t h e r c e r a m i c r e s o n a t o r o r q u a r t z - c r y s t a l o s c i l l a t o r a c r o s s t h e p i n s X F i x t h e s e b i t s t o “ 0 . ” I N a n d XO U R W R W

SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER for VOLTAGE SYNTHESIZER with ON-SCREEN DISPLAY CONTROLLER M37212M4/M8–XXXSP, M37212M6–XXXSP/FP M37212EFSP/FP MITSUBISHI MICROCOMPUTERS Rev. 1.0

8.10.4 Memory for OSD

There are 2 types of memory for OSD : OSD ROM (addresses 1000016 to 11FFF16) used to store character dot data and OSD RAM (addresses 060016 to 06B716) used to specify the characters and colors to be displayed. Fig. 8.10.11 Character Font Data Storing Address (1) OSD ROM (addresses 1000016 to 11FFF16) The dot pattern data for OSD characters is stored in OSD ROM. To specify the kinds of the character font, it is necessary to write the character code (Table 8.10.3) into the OSD RAM. The OSD ROM has a capacity of 8K bytes. Since 32 bytes are re- quired for 1 character data, the ROM can stores up to 256 kinds of characters. The OSD ROM space is broadly divided into 2 areas. The [vertical 16 dots] 5 [horizontal (left side) 8 dots] data of display characters are stored in addresses 10000 16 to 107FF16 and 1100016 to 117FF16 ; the [vertical 16 dots] 5 [horizontal (right side) 4 dots] data of display characters are stored in addresses 1080016 to 10FFF16 and 1180016 to 11FFF16 (refer to Figure 8.10.11). Note however that the high- order 4 bits in the data to be written to addresses 1080016 to 10FFF16 and 1180016 to 11FFF16 must be set to “1” (by writing data “FX16”). Data of the character font is specified shown in Figure 8.10.11. 10XX0 16 +80016 or 11XX0 16 +80016 00 000000 00 000000 00 000010 00 000101 01 001000 01 001000 01 001000 00 010000 1111001 00 100000 00 100000 00 100000 00 000000 00 000101 00 000010 01111 000 0000 0000 0000 0000 0000 0000 0100 0100 0100 0010 0010 0010 0000 0000 0000 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 b7 b0 b7 b0 b3 00000 10XXF 16 +80016 or 11XXF 16 +80016 10XX0 16 or 11XX0 16 10XXF 16 or 11XXF 16

SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER for VOLTAGE SYNTHESIZER with ON-SCREEN DISPLAY CONTROLLER M37212M4/M8–XXXSP, M37212M6–XXXSP/FP M37212EFSP/FP MITSUBISHI MICROCOMPUTERS Rev. 1.0 Block Block 1 Block 2 Display Position (from left) 1st character 2nd character 3rd character 22nd character 23rd character 24th character Not used 1st character 2nd character 3rd character 22nd character 23rd character 24th character Character Code Specification 060016 060116 060216 061516 061616 061716 061816 061F16 062016 062116 062216 063516 063616 063716 Color Specification 068016 068116 068216 069516 069616 069716 069816 069F16 06A016 06A116 06A216 06B516 06B616 06B716 Table 8.10.3 Character Code List (Partially Abbreviated) (2) OSD RAM (addresses 060016 to 06B716) The OSD RAM is allocated at addresses 060016 to 06B716, and is divided into a display character code specification part, and color code specification part for each block. Table 8.10.4 shows the con- tents of the OSD RAM. For example, to display 1 character position (the left edge) in block 1, write the character code in address 0600 16, write the color code at 068016. The structure of the OSD RAM is shown in Figure 8.10.12. Table 8.10.4 Contents of OSD RAM Character code 0016 Character data storage address Left 8 dots lines Right 4 dots lines 1000016 1000F16 1080016 1080F16 0116 1001016 1001F16 1081016 1081F16 0216 1002016 1002F16 1082016 1082F16 0316 1003016 1003F16 1083016 1083F16 ::: 7E16 107E016 107EF 16 10FE0 16 10FEF 16 7F16 107F016 107FF16 10FF016 10FFF 16 8016 1100016 1100F16 1180016 1180F16 8116 1101016 1101F16 1181016 1181F16 ::: FD 16 117D0 16 117DF 16 11FD0 16 11FDF 16 FE 16 117E016 117EF 16 11FE0 16 11FEF 16 FF16 117F016 117FF16 to 11FF016 11FFF 16 to to to to to to to to to to to to to to to to to to to to to

SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER for VOLTAGE SYNTHESIZER with ON-SCREEN DISPLAY CONTROLLER M37212M4/M8–XXXSP, M37212M6–XXXSP/FP M37212EFSP/FP MITSUBISHI MICROCOMPUTERS Rev. 1.0 Fig. 8.10.12 Bit structure of OSD RAM [Color specification] 0 0 : Specifying color register 0 0 1 : Specifying color register 1 1 0 : Specifying color register 2 1 1 : Specifying color register 3 Color register specification Block 1 [Character specification] Specify 256 characters (“0016” to “FF16”) Character code Block 2 [Character specification] 1st character : 062016 24th character : 063716 1st character : 068016 24th character : 069716 1st character : 060016 24th character : 061716 [Color specification] 1st character : 06A016 24th character : 06B716 to to to to Specify 256 characters (“0016” to “FF16”) Character code 0 0 : Specifying color register 0 0 1 : Specifying color register 1 1 0 : Specifying color register 2 1 1 : Specifying color register 3 Color register specification

SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER for VOLTAGE SYNTHESIZER with ON-SCREEN DISPLAY CONTROLLER M37212M4/M8–XXXSP, M37212M6–XXXSP/FP M37212EFSP/FP MITSUBISHI MICROCOMPUTERS Rev. 1.0

8.10.5 Color Register

The color of a displayed character can be specified by setting the color to one of the 4 registers (CO0 to CO3: addresses 00E616 to 00E916) and then specifying that color register with the OSD RAM. There are 3 color outputs; R, G and B. By using a combination of these outputs, it is possible to set 8 colors. However, since only 4 color registers are available, up to 4 colors can be disabled at one time. R, G and B outputs are set by using bits 1 to 3 in the color register. Bit 5 is used to specify whether a character output or blank output. Bits 4, 6 and 7 are used to specify character background color. Figure 8.10.12 shows the color register. Fig. 8.10.13 Color Register i b 7b 6b 5b 4b 3b 2b 1b 0 C o l o r r e g i s t e r i ( C O i ) ( i = 0 t o 3 ) [ A d d r e s s e s 0 0 E 61 6 t o 0 0 E 91 BN a m eF u n c t i o n sA f t e r r e s e t R W C o l o r R e g i s t e r i 0 0 R — G s i g n a l o u t p u t s e l e c t i o n b i t C O i 0 : N o c h a r a c t e r i s o u t p u t C h a r a c t e r i s o u t p u t I n d e t e r m i n a t e R W R s i g n a l o u t p u t s e l e c t i o n b i t C O i 0 : N o c h a r a c t e r i s o u t p u t C h a r a c t e r i s o u t p u t R W B s i g n a l o u t p u t ( b a c k g r o u n d ) s e l e c t i o n b i t C O i S e e n o t e 0 : N o b a c k g r o u n d c o l o r i s o u t p u t B a c k g r o u n d c o l o r i s o u t p u t R W O U T 1 s i g n a l o u t p u t c o n t r o l b i t C O i S e e n o t e s 0 : C h a r a c t e r i s o u t p u t B l a n k i s o u t p u t R W G s i g n a l o u t p u t ( b a c k g r o u n d ) s e l e c t i o n b i t C O i S e e n o t e 0 : N o b a c k g r o u n d c o l o r i s o u t p u t B a c k g r o u n d c o l o r i s o u t p u t R W R s i g n a l o u t p u t ( b a c k g r o u n d ) s e l e c t i o n b i t C O i S e e n o t e 0 : N o b a c k g r o u n d c o l o r i s o u t p u t B a c k g r o u n d c o l o r i s o u t p u t R W

7 R W

B s i g n a l o u t p u t s e l e c t i o n b i t C O i 0 : N o c h a r a c t e r i s o u t p u t C h a r a c t e r i s o u t p u t N o t h i n g i s a s s i g n e d . T h i s b i t i s a w r i t e d i s a b l e b i t . W h e n t h i s b i t i s r e a d o u t t h e v a l u e i s N o t e s 1 : W h e n b i t 5 = “ 0 ” a n d b i t 4 = “ 1 , ” t h e r e i s o u t p u t s a m e a s a c h a r a c t e r o r b o r d e r o u t p u t f r o m p i n O U T D o n o t s e t b i t a n d b i t W h e n o n l y b i t a n d b i t t h e r e i s o u t p u t f r o m p i n O U T I n d e t e r m i n a t e I n d e t e r m i n a t e I n d e t e r m i n a t e I n d e t e r m i n a t e I n d e t e r m i n a t e I n d e t e r m i n a t e

SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER for VOLTAGE SYNTHESIZER with ON-SCREEN DISPLAY CONTROLLER M37212M4/M8–XXXSP, M37212M6–XXXSP/FP M37212EFSP/FP MITSUBISHI MICROCOMPUTERS Rev. 1.0 Table 8.10.5 Display Example of Character Background Coloring (When Green Is Set for a Character and Blue Is Set for Background Color) Border selection register Color register i COi7 COi6 COi5 COi4 COi3 COi2 COi1MD 0 G output B output OUT1 output Character output OUT2 output 0 5 0 0 1 0 No output Same output as character A Green Video signal and character color (green) are not mixed. No output (See note 2)0 0 5 0 0 1 0 No output Same output as character A Video signal and character color (green) are not mixed. Blank output Green No output TV image of character background is not displayed.Blank output Green No output (See note 2) 1 5 0 1 0 1 0 No output Border output (Black) Video signal and character color (green) are not mixed. Green No output (See note 2) 01 0 0 1 000 TV image of character background is not displayed.Blank output Green 01 0 1 000 No output (See note 2) Background color Blue TV image of character background is not displayed. Green 1 010 Blank output

00 No output

(See note 2) BlackNo output Green No output (See note 2)1 010 TV image of character background is not displayed. Blank output Border output (Black) Background color – border Blue Notes 1 :When COi5 = “0” and COi4 = “1,” there is output same as a character or border output from the OUT1 pin. Do not set COi5 = “0” and COi4 = “0.” 2 : When only COi7 = “1” and COi5 = “0,” there is output from pin OUT2. 3 :The portion “A” in which character dots are displayed is not mixed with any TV video signal. 4 :The wavy-lined arrows in the Table denote video signals. 5 :n : 0 to 3, 5 : 0 or 1 Border output (Black) (Note 1)

SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER for VOLTAGE SYNTHESIZER with ON-SCREEN DISPLAY CONTROLLER M37212M4/M8–XXXSP, M37212M6–XXXSP/FP M37212EFSP/FP MITSUBISHI MICROCOMPUTERS Rev. 1.0

8.10.6 Border

An border of 1 clock (1 dot) equivalent size can be added to a char- acter to be displayed in both horizontal and vertical directions. The border is output from the OUT pin. In this case, set bit 5 of a color register to “0” (character is output). Border can be specified in units of block by using the border selec- tion register (address 00E5 16). Figure 8.10.14 shows the border se- lection register. Table 8.10.6 shows the relationship between the val- ues set in the border selection register and the character border func- tion. Fig. 8.10.14 Border Selection Register Table 8.10.6 Relationship between Set Value in Border Selection Register and Character Border Function b7 b6 b5 b4 b3 b2 b1 b0 Border selection register (MD) [Address 00E516] B Name Functions After reset R W Border Selection Register

0 Block 1 OUT1 output

border selection bit (MD10) 0 : Same output as R, G, B is output 1 : Border output Indeterminate

2 Block 2 OUT1 output

border selection bit (MD20) 0 : Same output as R, G, B is output 1 : Border output Indeterminate RW RW 03to Nothing is assigned. These bits are write disable bits. When these bits are read out, the values are “0.” 01 Nothing is assigned. This bit is a write disable bit. When this bit is read out, the value is “0.” R, G, B output OUT1 output R, G, B output OUT1 output Functions Ordinary Border including character Example of output MDn0 Border selection register Fig. 8.10.15 Example of Border

SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER for VOLTAGE SYNTHESIZER with ON-SCREEN DISPLAY CONTROLLER M37212M4/M8–XXXSP, M37212M6–XXXSP/FP M37212EFSP/FP MITSUBISHI MICROCOMPUTERS Rev. 1.0

8.10.7 Multiline Display

This microcomputer can ordinarily display 2 lines on the CRT screen by displaying 2 blocks at different vertical positions. In addition, it can display up to 16 lines by using OSD interrupts. An OSD interrupt request occurs at the point at which display of each block has been completed. In other words, when a scanning line reaches the point of the display position (specified by the vertical position registers) of a certain block, the character display of that block starts, and an interrupt occurs at the point at which the scan- ning line exceeds the block. Note: An OSD interrupt does not occur at the end of display when the block is not displayed. In other words, if a block is set to off display by the display control bit of the CRT control register (address 00EA 16), an OSD inter- rupt request does not occur (refer to Figure 8.10.16). Fig. 8.10.16 Note on Occurence of OSD Interrupt B l o c k 1 ( o n d i s p l a y ) B l o c k 2 ( o n d i s p l a y ) B l o c k 1 ’ ( o n d i s p l a y ) B l o c k 2 ’ ( o n d i s p l a y ) B l o c k 1 ( o n d i s p l a y ) B l o c k 2 ( o n d i s p l a y ) B l o c k 1 ’ ( o f f d i s p l a y ) B l o c k 2 ’ ( o f f d i s p l a y ) “ O S D i n t e r r u p t r e q u e s t ” “ O S D i n t e r r u p t r e q u e s t ” “ O S D i n t e r r u p t r e q u e s t ” “ O S D i n t e r r u p t r e q u e s t ” “ O S D i n t e r r u p t r e q u e s t ” “ O S D i n t e r r u p t r e q u e s t ” N o O S D i n t e r r u p t r e q u e s t O n d i s p l a y ( O S D i n t e r r u p t r e q u e s t o c c u r s a t t h e e n d o f b l o c k d i s p l a y O f f d i s p l a y ( O S D i n t e r r u p t r e q u e s t d o e s n o t o c c u r a t t h e e n d o f b l o c k d i s p l a y N o O S D i n t e r r u p t r e q u e s t

SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER for VOLTAGE SYNTHESIZER with ON-SCREEN DISPLAY CONTROLLER M37212M4/M8–XXXSP, M37212M6–XXXSP/FP M37212EFSP/FP MITSUBISHI MICROCOMPUTERS Rev. 1.0

8.10.8 OSD Output Pin Control

The OSD output pins R, G, B and OUT1 can also function as ports P52–P55. Set corresponding bit of the port P5 direction register (ad- dress 00CB16) to “0” to specify these pins as OSD output pins, or set it to “1” to specify it as a general-purpose port P5. The OUT2 can also function as port P10. Set bit 0 of the CRT port control register (address 00EC16) to “1” (output mode). After that, set bit 7 of the CRT port control register to “1” to specify the pin as OSD output pin, or set it to “0” to specify as port P1 The input polarity of the HSYNC , VSYNC and output polarity of signals R, G, B, OUT1 and OUT2 can be specified with the CRT port control register (address 00EC) . Set a bit to “0” to specify positive polarity; set it to “1” to specify negative polarity (refer to Figure 8.11.13). The CRT port control register is shown in Figure 8.10.17. Fig. 8.10.17 CRT Port Control Register b 7b 6b 5b 4b 3b 2b 1b 0 C R T p o r t c o n t r o l r e g i s t e r ( C R T P ) [ A d d r e s s 0 0 E C 1 B N a m eF u n c t i o n sA f t e r r e s e t R W C R T P o r t C o n t r o l R e g i s t e r

0 H S

Y N C i n p u t p o l a r i t y s w i t c h b i t H S Y C 0 : P o s i t i v e p o l a r i t y i n p u t N e g a t i v e p o l a r i t y i n p u t 10 : P o s i t i v e p o l a r i t y i n p u t N e g a t i v e p o l a r i t y i n p u t 2R / G / B o u t p u t p o l a r i t y s w i t c h b i t R G B 0 : P o s i t i v e p o l a r i t y o u t p u t N e g a t i v e p o l a r i t y o u t p u t

4 O U T 1 o u t p u t p o l a r i t y

s w i t c h b i t O U T 0 : P o s i t i v e p o l a r i t y o u t p u t N e g a t i v e p o l a r i t y o u t p u t 5R s i g n a l o u t p u t s w i t c h b i t O P 0 : R s i g n a l o u t p u t M U T E s i g n a l o u t p u t

6 G s i g n a l o u t p u t s w i t c h

b i t O P 0 : G s i g n a l o u t p u t M U T E s i g n a l o u t p u t 7B s i g n a l o u t p u t s w i t c h b i t O P 0 : B s i g n a l o u t p u t M U T E s i g n a l o u t p u t VS Y N C i n p u t p o l a r i t y s w i t c h b i t V S Y C R W R W R W R W R W R W R W R W O U T 2 o u t p u t p o l a r i t y s w i t c h b i t O U T 0 : P o s i t i v e p o l a r i t y o u t p u t N e g a t i v e p o l a r i t y o u t p u t

SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER for VOLTAGE SYNTHESIZER with ON-SCREEN DISPLAY CONTROLLER M37212M4/M8–XXXSP, M37212M6–XXXSP/FP M37212EFSP/FP MITSUBISHI MICROCOMPUTERS Rev. 1.0

8.10.9 Raster Coloring Function

An entire screen (raster) can be colored by setting the CRT port con- trol register. Since each of the R, G, B, OUT1, and OUT2 pins can be switched to raster coloring output, 8 raster colors can be obtained. When the character color/the character background color overlaps with the raster color, the color (R, G, B, OUT1, OUT2), specified for the character color/the character background color, takes priority of the raster color. This ensures that character color/character back- ground color is not mixed with the raster color. The example of raster coloring is shown in Figure 8.10.18. Fig. 8.10.18 Example of Raster Coloring H S Y N C A 'A O U T 1 R G B : C h a r a c t e r c o l o r “ R E D ” ( R + O U T 1 + O U T 2 ) : B o r d e r c o l o r “ B L A C K ” ( O U T 1 + O U T 2 ) : B a c k g r o u n d c o l o r “ M A G E N T A ” ( R + B + O U T 1 + O U T 2 ) : R a s t e r c o l o r “ B L U E ” ( B + O U T 1 + O U T 2 ) S i g n a l s a c r o s s A A O U T 2

SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER for VOLTAGE SYNTHESIZER with ON-SCREEN DISPLAY CONTROLLER M37212M4/M8–XXXSP, M37212M6–XXXSP/FP M37212EFSP/FP MITSUBISHI MICROCOMPUTERS Rev. 1.0 Fig. 8.11.1 Sequence at Detecting Software Runaway Detection

8.11 SOFTWARE RUNAWAY DETECT FUNCTION

This microcomputer has a function to decode undefined instructions to detect a software runaway. When an undefined op-code is input to the CPU as an instruction code during operation, the following processing is done. À The CPU generates an undefined instruction decoding signal. \` The device is internally reset because of occurrence of the unde- fined instruction decoding signal. ´ As a result of internal reset, the same reset processing as in the case of ordinary reset operation is done, and the program restarts from the reset vector. Note, however, that the software runaway detecting function cannot be invalid. A D H , A D L0 1 , S – 20 1 , S – 1 P C H P C L P SA D HA D L P C ? : U n d e f i n e d i n s t r u c t i o n d e c o d e U n d e f i n e d i n s t r u c t i o n d e c o d i n g s i g n a l o c c u r s I n t e r n a l r e s e t s i g n a l o c c u r s f S Y N C A d d r e s s D a t a R e s e t s e q u e n c e 0 1 , SF F F E1

6 F F F F1

: I n v a l i d : P r o g r a m c o u n t e r S : S t a c k p o i n t e r P C A D L, A D H : J u m p d e s t i n a t i o n a d d r e s s o f r e s e t

SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER for VOLTAGE SYNTHESIZER with ON-SCREEN DISPLAY CONTROLLER M37212M4/M8–XXXSP, M37212M6–XXXSP/FP M37212EFSP/FP MITSUBISHI MICROCOMPUTERS Rev. 1.0 8.12. RESET CIRCUIT When the oscillation of a quartz-crystal oscillator or a ceramic reso- nator is stable and the power source voltage is 5 V ± 10 %, hold the RESET pin at LOW for 2 µs or more, then return is to HIGH. Then, as shown in Figure 8.12.2, reset is released and the program starts form the address formed by using the content of address FFFF 16 as the high-order address and the content of the address FFFE16 as the low-order address. The internal state of microcomputer at reset are An example of the reset circuit is shown in Figure 8.12.1. The reset input voltage must be kept 0.6 V or less until the power source voltage surpasses 4.5 V. Fig. 8.12.2 Reset Sequence Fig. 8.12.1 Example of Reset Circuit P o w e r s o u r c e v o l t a g e 0 V R e s e t i n p u t v o l t a g e 0 V . 5 V 0 . 6 V P o w e r o n V c c R E S E T V s s M i c r o c o m p u t e r 3 0 mF M 5 1 9 5 3 A L XI N f R E S E T I n t e r n a l R E S E T S Y N C A d d r e s s D a t a 3 2 7 6 8 c o u n t o f XI N c l o c k c y c l e S e e n o t e R e s e t a d d r e s s f r o m t h e v e c t o r t a b l e ? ? 0 1 , S 0 S 1 0 S

2 F F F E F F F F

A D H , A D L N o t e s 1 : f ( XI N ) a n d f (f) a r e i n t h e r e l a t i o n : f ( XI N ) = 2 · f (f) . A q u e s t i o n m a r k i n d i c a t e s a n u n d e f i n e d s t a t e t h a t d e p e n d s o n t h e p r e v i o u s s t a t e I m m e d i a t e l y a f t e r a r e s e t t i m e r a n d t i m e r a r e c o n n e c t e d b y h a r d w a r e A t t h i s t i m e F i s s e t i n t i m e r a n d i s s e t t o t i m e r T i m e r c o u n t s d o w n w i t h f XI N ) a n d r e s e t s t a t e i s r e l e a s e d b y t h e t i m e r o v e r f l o w s i g n a l

SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER for VOLTAGE SYNTHESIZER with ON-SCREEN DISPLAY CONTROLLER M37212M4/M8–XXXSP, M37212M6–XXXSP/FP M37212EFSP/FP MITSUBISHI MICROCOMPUTERS Rev. 1.0

8.13 CLOCK GENERATING CIRCUIT

The built-in clock generating circuit is shown in Figure 8.13.3. When the STP instruction is executed, the internal clock φ stops at HIGH. At the same time, timers 3 and 4 are connected by hardware and “FF 16” is set in timer 3 and “0716” is set in the timer 4. Select f(XIN)/16 as the timer 3 count source (set bit 0 of the timer mode register 2 to “0” before the execution of the STP instruction). Moreover, set the timer 3 and timer 4 interrupt enable bits to disabled (“0”) before ex- ecution of the STP instruction). The oscillator restarts when external interrupt is accepted. However, the internal clock φ keeps its HIGH until timer 4 overflows, allowing time for oscillation stabilization when a ceramic resonator or a quartz-crystal oscillator is used. When the WIT instruction is executed, the internal clock φ stops in the HIGH but the oscillator continues running. This wait state is re- leased when an interrupt is accepted (See note). Since the oscillator does not stop, the next instruction can be executed at once. When returning from the stop or the wait state, to accept an interrupt, set the corresponding interrupt enable bit to “1” before executing the STP or the WIT instructions. Note: In the wait mode, the following interrupts are invalid.

  • VSYNC interrupt
  • OSD interrupt
  • All timers interrupts using TIM2 and TIM3 pins input as count source
  • All timers interrupts using f(X IN)/2 as count source
  • All timers interrupts using f(XIN)/4092 as count source
  • f(XIN)/4096 interrupt
  • Multi-master I2C-BUS interface interrupt A circuit example using a ceramic resonator (or a quartz-crystal os- cillator) is shown in Figure 8.13.1. Use the circuit constants in accor- dance with the resonator manufacture’s recommended values. A cir- cuit example with external clock input is shown in Figure 8.13.2. In- put the clock to the X IN pin, and open the XOUT pin. Fig. 8.13.1 Ceramic Resonator Circuit Example Fig. 8.13.2 External Clock Input Circuit Example X IN XOUT C IN Microcomputer C OUT X IN Microcomputer Vcc Vss External oscillation circuit Fig. 8.13.3 Clock Generating Circuit Block Diagram I n t e r r u p t r e q u e s t I n t e r r u p t d i s a b l e f l a g I R e s e t S Q RS T P i n s t r u c t i o n S Q RW I T i n s t r u c t i o n SQ R S T P i n s t r u c t i o n R e s e t I n t e r n a l c l o c k f 1 / 2 1 / 8 T i m e r 3 T i m e r 4 XO U TXI N T 3 4 M 0 T 3 4 M 2 S e l e c t i o n g a t e : C o n n e c t e d t o b l a c k s i d e a t r e s e t T 3 4 M : T i m e r m o d e r e g i s t e r

SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER for VOLTAGE SYNTHESIZER with ON-SCREEN DISPLAY CONTROLLER M37212M4/M8–XXXSP, M37212M6–XXXSP/FP M37212EFSP/FP MITSUBISHI MICROCOMPUTERS Rev. 1.0 RESET Vss Vcc Circuit example 1 RESET Vss Vcc Circuit example 2 Note :Make the level change from “L” to “H” at the point at which the power source voltage exceeds the specified voltage.

8.14 DISPLAY OSCILLATION CIRCUIT

The OSD oscillation circuit has a built-in clock oscillation circuits, so that a clock for OSD can be obtained simply by connecting an LC, an RC, a ceramic resonator, or a quartz-crystal oscillator across the pins OSC1 and OSC2. Which of the sub-clock or the OSD oscillation cir- cuit is selected by setting bits 0 and 1 of the CRT clock selection register (address 00ED 16).

8.16 ADDRESSING MODE

The memory access is reinforced with 17 kinds of addressing modes. Refer to SERIES 740 <Software> User’s Manual for details.

8.17 MACHINE INSTRUCTIONS

There are 71 machine instructions. Refer to SERIES 740 <Soft- ware> User’s Manual for details. 9. PROGRAMMING NOTES

  • The divide ratio of the timer is 1/(n+1).
  • Even though the BBC and BBS instructions are executed imme- diately after the interrupt request bits are modified (by the pro- gram), those instructions are only valid for the contents before the modification. At least one instruction cycle is needed (such as an NOP) between the modification of the interrupt request bits and the execution of the BBC and BBS instructions.
  • After the ADC and SBC instructions are executed (in the decimal mode), one instruction cycle (such as an NOP) is needed before the SEC, CLC, or CLD instruction is executed.
  • An NOP instruction is needed immediately after the execution of a PLP instruction.
  • In order to avoid noise and latch-up, connect a bypass capacitor (≈ 0.1µF) directly between the V CC pin–VSS pin and the VCC pin– CNV SS pin, using a thick wire. Fig. 8.14.1 Display Oscillation Circuit

8.15 AUTO-CLEAR CIRCUIT

When a power source is supplied, the auto-clear function will oper- ate by connecting the following circuit to the RESET pin. Fig. 8.15.1 Auto-clear Circuit Example OSC2OSC1 L C1 C2

SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER for VOLTAGE SYNTHESIZER with ON-SCREEN DISPLAY CONTROLLER M37212M4/M8–XXXSP, M37212M6–XXXSP/FP M37212EFSP/FP MITSUBISHI MICROCOMPUTERS Rev. 1.0 Power source voltage VCC Input voltage CNV SS Input voltage P0 0–P07, P10–P17, P20–P27, H SYNC , VSYNC , RESET Output voltage P1 0–P14, P20–P17, P30, P31, P40, P41, R, G, B, OUT1, DA XOUT , OSC2 Output voltage P0 0–P07, P60–P63 Circuit current R, G, B, OUT1, P10–P14, P20–P27, P30, P31, DA Circuit current R, G, B, OUT1, P06, P07, P10, P20–P23, P30, P31, P40, P41, DA Circuit current P1 1–P14 Circuit current P0 0–P07, P60–P63 Circuit current P2 4–P27 Power dissipation Operating temperature Storage temperature Symbol V CC , AVCC VI VI VO VO IOH IOL1 IOL2 IOL3 IOL4 Pd Topr Tstg 10. ABSOLUTE MAXIMUM RATINGS Conditions All voltages are based on VSS . Output transistors are cut off. Parametear T a = 25 °C Unit V V V V V mA mA mA mA mA mW Ratings –0.3 to 6 –0.3 to 6 –0.3 to V CC + 0.3 –0.3 to VCC + 0.3 –0.3 to 13 0 to 1 (See note 1) 0 to 2 (See note 2) 0 to 6 (See note 2) 0 to 1 (See note 2) 0 to 10 (See note 3) 550 –10 to 70 –40 to 125 Power source voltage (See note 4), During CPU, OSD operation Power source voltage HIGH input voltage P0 SIN, SCLK , HSYNC , VSYNC , RESET, XIN, OSC1, TIM2, TIM3, INT1–INT3 HIGH input voltage SCL1, SCL2, SDA1, SDA2 (When using I2C-BUS) LOW input voltage P00–P07, P10–P17, P20–P27, P30–P37, P40–P42 LOW input voltage SCL1, SCL2, SDA1, SDA2 (When using I2C-BUS) LOW input voltage (See note 6) H SYNC , VSYNC , RESET, TIM2, TIM3, INT1–INT3, XIN, OSC1, SIN, SCLK HIGH average output current (See note 1) R, G, B, OUT1, DA, P10–P14, P20–P27, P30, P31 LOW average output current (See note 2) R, G, B, OUT1, DA, P10, P20–P23, P30, P31, P40, P41 LOW average output current (See note 2) P11–P14 LOW average output current (See note 2) P00–P07, P60–P63 LOW average output current (See note 3) P24–P27 Oscillation frequency (for CPU operation) (See note 5) XIN Oscillation frequency (for OSD) OSC1 Input frequency TIM2, TIM3 Input frequency S CLK Input frequency SCL1, SCL2 Limits Min. 4.5 0.8VCC 0.7VCC 7.9 5.0 Typ. 5.0 8.0 Max. 5.5 V CC VCC

0.4 VCC

0.3 VCC

0.2 VCC

8.1 8.0 100 400 V V V V V V V mA mA mA mA mA MHz MHz kHz MHz kHz 11. RECOMMENDED OPERATING CONDITIONS (Ta = –10 °C to 70 °C, VCC = 5 V ± 10 %, unless otherwise noted) VCC VSS VIH1 VIH2 VIL1 VIL2 VIL3 IOH IOL1 IOL2 IOL3 IOL4 f(XIN) fosc f hs1 fhs2 fhs3 Symbol Parameter Unit

SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER for VOLTAGE SYNTHESIZER with ON-SCREEN DISPLAY CONTROLLER M37212M4/M8–XXXSP, M37212M6–XXXSP/FP M37212EFSP/FP MITSUBISHI MICROCOMPUTERS Rev. 1.0 Power source current HIGH output voltageR, G, B, OUT1, DA, P10–P14, P20–P27, P30, P31 LOW output voltage R, G, B, OUT1, DA, P10, P20–P23, P30, P31, P40, P41 LOW output voltage P24–P27 LOW output voltage P11–P14 LOW output voltage P00–P07, P60–P63 Hysteresis RESET Hysteresis (See note 6)H SYNC , VSYNC , TIM2, TIM3, INT1–INT3, SCL1, SCL2, SDA1, SDA2, S IN, SCLK HIGH input leak current RESET, P10–P17, P20–P27, P30–P37, P40–P42, HSYNC , VSYNC LOW input leak current RESET, P00–P07, P10–P17, P20–P27, P30–P37, P40–P42, P60–P63, HSYNC , VSYNC HIGH input leak currentP00–P07, P60–P63 I2C-BUS·BUS switch connection resistor (between SCL1 and SCL2, SDA1 and SDA2) Max. 300 0.4 3.0 0.4 0.6 0.4 0.7 1.3 130 Limits Min. 2.4 12. ELECTRIC CHARACTERISTICS (VCC = 5 V ± 10 %, VSS = 0 V, f(XIN) = 8 MHz, Ta = –10 °C to 70 °C, unless otherwise noted) ICC VOH VOL VT+ – VT– IIZH IIZL IOZH R BS Typ. 0.5 0.5 Symbol Parameter Test conditions Unit System operation Stop mode VCC = 5.5 V, f(XIN) = 0 VCC = 4.5 V IOH = –0.5 mA VCC = 4.5 V IOL = 0.5 mA VCC = 4.5 V IOL = 10.0 mA VCC = 4.5 V VCC = 4.5 V IOL = 0.5 mA VCC = 5.0 V VCC = 5.0 V VCC = 5.5 V VI = 5.5 V VCC = 5.5 V VI = 0 V VCC = 5.5 V VI = 12 V VCC = 4.5 V OSD OFF OSD ON OSD OFF OSD ON Test circuit VCC = 5.5 V, f(XIN) = 4 MHz VCC = 5.5 V, f(XIN) = 8 MHz mA µA V V V µA µA µA Ω Notes 1:The total current that flows out of the IC must be 20 mA or less. 2:The total input current to IC (IOL1 + IOL2 + IOL3 ) must be 30 mA or less. 3:The total average input current for ports P24–P27 to IC must be 20 mA or less. 4:Connect 0.1 µF or more capacitor externally between the power source pins VCC –VSS so as to reduce power source noise. Also connect 0.1 µF or more capacitor externally between the pins VCC –CNV SS . 5:Use a quartz-crystal oscillator or a ceramic resonator for the CPU oscillation circuit. When using the data slicer, use 8 MHz. 6:P15, P32–P35 have the hysteresis when these pins are used as interrupt input pins or timer input pins. P11–P14 have the hysteresis when these pins are used as multi-master I2C-BUS interface ports. P40–P42 have the hysteresis when these pins are used as serial I/O pins. 7:Pin names in each parameter is described as below. (1) Dedicated pins: dedicated pin names. (2) Duble-/triple-function ports

  • When the same limits: I/O port name.
  • When the limits of functins except ports are different from I/O port limits: function pin name. IOL = 3 mA IOL = 6 mA

SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER for VOLTAGE SYNTHESIZER with ON-SCREEN DISPLAY CONTROLLER M37212M4/M8–XXXSP, M37212M6–XXXSP/FP M37212EFSP/FP MITSUBISHI MICROCOMPUTERS Rev. 1.0 Fig.12.1 Measure Circuits V s s V c c V VO H o r VO L IO H o r IO L 4 . 5 V E a c h o u t p u t p i n A f t e r s e t t i n g e a c h o u t p u t p i n t o H I G H l e v e l w h e n m e a s u r i n g VO H a n d t o L O W l e v e l w h e n m e a s u r i n g VO e a c h p i n i s m e a s u r e d V s s V c c 5 . 0 V E a c h i n p u t p i n V s s V c c VB S 4 . 5 V S C L 1 o r S D A 1 IB S A R B S = VB IB S S C L 2 o r S D A 2 R B S V s s V c c 5 . 5 V E a c h i n p u t p i n A II Z H o r II Z L V s s V c c 5 . 5 V AE a c h o u t p u t p i n A f t e r s e t t i n g e a c h o u t p u t p i n O F F s t a t e , e a c h p i n i s m e a s u r e d IOZ H 1 2 V A V s s V c cXI N XO U T O S C 1 O S C 2 I c c 8 . 0 0 M H z P o w e r s o u r c e v o l t a g e P i n VC C i s m a d e t h e o p e r a t i o n s t a t e a n d i s m e a s u r e d t h e c u r r e n t w i t h a c e r a m i c r e s o n a t o r

SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER for VOLTAGE SYNTHESIZER with ON-SCREEN DISPLAY CONTROLLER M37212M4/M8–XXXSP, M37212M6–XXXSP/FP M37212EFSP/FP MITSUBISHI MICROCOMPUTERS Rev. 1.0 13. A-D COMPARISON CHARACTERISTICS (VCC = 5 V ± 10 %, VSS = 0 V, f(XIN) = 8 MHz, Ta = 25 °C, unless otherwise noted) Resolution Absolute accuracy Max. bits LSB Min. Limits UnitTest conditionsParameterSymbol Typ. 14. MULTI-MASTER I2C-BUS BUS LINE CHARACTERISTICS Bus free time Hold time for START condition LOW period of SCL clock Rising time of both SCL and SDA signals Data hold time HIGH period of SCL clock Falling time of both SCL and SDA signals Data set-up time Set-up time for repeated START condition Set-up time for STOP condition tBUF tHD; STA tLOW tR tHD; DAT tHIGH tF tSU; DAT tSU; STA tSU; STO Max. 1000 300 Min. 1.3 0.6 1.3 20+0.1C b 0.6 20+0.1Cb 100 0.6 0.6 Max. 300 0.9 300 µs µs µs ns µs µs ns ns µs µs UnitStandard clock mode High-speed clock modeParameterSymbol Note: Cb = total capacitance of 1 bus line Fig.14.1 Definition Diagram of Timing on Multi-master I2C-BUS Min. 4.7 4.0 4.7 4.0 250 4.7 4.0 SDA SCL P tBUF S tHD ;STA tLOW tR tHD ;DAT tHIGH tF tSU ;DAT tSU ;STA Sr P tSU ;STOtHD ;STA S Sr P : Start condition : Restart condition : Stop condition

SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER for VOLTAGE SYNTHESIZER with ON-SCREEN DISPLAY CONTROLLER M37212M4/M8–XXXSP, M37212M6–XXXSP/FP M37212EFSP/FP MITSUBISHI MICROCOMPUTERS Rev. 1.0 15. PROM PROGRAMMING METHOD The built-in PROM of the One Time PROM version (blank) and the built-in EPROM version can be read or programmed with a general- purpose PROM programmer using a special programming adapter. Product M37212EFSP M37212EFFP Name of Programming Adapter PCA7406 PCA7420 The PROM of the One Time PROM version (blank) is not tested or screened in the assembly process nor any following processes. To ensure proper operation after programming, the procedure shown in Figure 15.1 is recommended to verify programming. Fig. 15.1 Programming and Testing of One Time PROM Version Programming with PROM programmer Screening (Caution) (150°C for 40 hours) Verification with PROM programmer Functional check in target device Caution : The screening temperature is far higher than the storage temperature. Never expose to 150°C exceeding 100 hours.

SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER for VOLTAGE SYNTHESIZER with ON-SCREEN DISPLAY CONTROLLER M37212M4/M8–XXXSP, M37212M6–XXXSP/FP M37212EFSP/FP MITSUBISHI MICROCOMPUTERS Rev. 1.0 16. DATA REQUIRED FOR MASK ORDERS The following are necessary when ordering a mask ROM produc- tion:

  • Mask ROM Order Confirmation Form
  • Mark Specification Form
  • Data to be written to ROM, in EPROM form (32-pin DIP Type 27C101, three identical copies) or FDK

SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER for VOLTAGE SYNTHESIZER with ON-SCREEN DISPLAY CONTROLLER M37212M4/M8–XXXSP, M37212M6–XXXSP/FP M37212EFSP/FP MITSUBISHI MICROCOMPUTERS Rev. 1.0 17. MASK CONFIRMATION FORM (1/3) GZZ–SH55–23B < 91A0 >

740 FAMILY MASK ROM CONFIRMATION FORM

SINGLE-CHIP MICROCOMPUTER M37212M4-XXXSP MITSUBISHI ELECTRIC ] Customer Company name Date issued ]1. Confirmation Three EPROMs are required for each pattern if this order is performed by EPROMs. One floppy disk is required for each pattern if this order is performed by a floppy disk. Ordering by EPROMs If at least two of the three sets of EPROMs submitted contain identical data, we will produce masks based on this data. We shall assume the responsibility for errors only if the mask ROM data on the products we produce differs from this data. Thus, extreme care must be taken to verify the data in the submitted EPROMs. (1) Set “FF16” in the shaded area. Mask ROM number Receipt Date: Section headsignature Supervisorsignature TEL ( ) Date : Issuance signature Note : Please fill in all items marked ]. Submitted by Supervisor Checksum code for entire EPROM (hexadecimal notation) EPROM type (indicate the type used) EPROM address Product nameASCII code: 'M37212M4-' 2 7 C 1 0 1 000016 000F16 1234567890123456 1 23456789012345 6 1 23456789012345 6 1234567890123456 Data ROM(16K) Character ROM2-b 1080016 10FFF16 FFFF16 C00016 1000016 1234567890123456 1 23456789012345 6 1 23456789012345 6 1 23456789012345 6 1234567890123456 107FF16 Character ROM1-b Character ROM2-a Character ROM1-a 1100016 117FF16 1180016 11FFF16 1200016 1FFFF16

SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER for VOLTAGE SYNTHESIZER with ON-SCREEN DISPLAY CONTROLLER M37212M4/M8–XXXSP, M37212M6–XXXSP/FP M37212EFSP/FP MITSUBISHI MICROCOMPUTERS Rev. 1.0 (2/3) GZZ–SH55–23B < 91A0 > SINGLE-CHIP MICROCOMPUTER M37212M4-XXXSP MITSUBISHI ELECTRIC Addresses 000016 to 000F16 store the product name. ASCII codes ‘M37212M4-’ are listed on the right. The addresses and data are in hexadecimal notation. Note: If the name of the product contained in the EPROMs does not match the name on the mask ROM confirmation form, the ROM processing is disabled. Please make sure the data is written correctly. Address 000016 ‘M’ = 4D 16 000116 ‘3’ = 3316 000216 ‘7’ = 3716 000316 ‘2’ = 3216 000416 ‘1’ = 3116 000516 ‘2’ = 3216 000616 ‘M’ = 4D 16 000716 ‘4’ = 3416 Address 000816 ‘–’ = 2D16

000916 FF16

We will produce masks based on the mask files generated by the mask file generating utility. We shall assume the responsibility for errors only if the mask ROM data on the products we produce differs from this mask file. Thus, extreme care must be taken to verify the mask file in the submitted floppy disk. The submitted floppy disk must be 3.5-inch 2HD type and DOS/V format. And the number of the mask files must be 1 in one floppy disk. File code (hexadecimal notation) Mask file name .MSK (equal or less than eight characters) ]2. Mark specification Mark specification must be submitted using the correct form for the type of package being ordered. Fill the appropriate mark specification form (52P4B for M37212M4-XXXSP) and attach to the mask ROM confirmation form. ]3. Comments (2) Write the ASCII codes that indicate the product name of “M37212M4–” to addresses 000016 to 000F16.

SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER for VOLTAGE SYNTHESIZER with ON-SCREEN DISPLAY CONTROLLER M37212M4/M8–XXXSP, M37212M6–XXXSP/FP M37212EFSP/FP MITSUBISHI MICROCOMPUTERS Rev. 1.0 (3/3) GZZ–SH55–23B < 91A0 > SINGLE-CHIP MICROCOMPUTER M37212M4-XXXSP MITSUBISHI ELECTRIC Inputting the character ROM Input the character ROM data by dividing it into character ROM1 and character ROM2. The structure of character ROM ( divided into 12 516 dots font) Example Character code Ò1A16Ó 101A016 101AF16 b7 b6 b5 b4 b3 b2 b1 b0 b7 b6 b5 b4 b3 b2 b1 b0 A B C D E F A B C D E F F016 F016 F016 F016 F016 F016 F016 F016 F816 F816 F816 F416 F416 F416 F016 F016 109A016 109AF16 Character ROM1 Character ROM2 F16 016 416 A16 116 0416 A16 116 116 016 016 F16 016 016 016 016 016 (Note) Write the character code "00 16" to "7F16" to Addresses 1000016 to 10FFF16. Write the character code "80 16" to "FF16" to Addresses 1100016 to 11FFF16. Example Example to to

SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER for VOLTAGE SYNTHESIZER with ON-SCREEN DISPLAY CONTROLLER M37212M4/M8–XXXSP, M37212M6–XXXSP/FP M37212EFSP/FP MITSUBISHI MICROCOMPUTERS Rev. 1.0 (1/3) GZZ–SH55–24B < 91A0 > SINGLE-CHIP MICROCOMPUTER M37212M6-XXXSP/FP MITSUBISHI ELECTRIC Mask ROM number Receipt Date: Section headsignature Supervisorsignature ] Customer Company name TEL ( ) Date :Date issued Issuance signature Note : Please fill in all items marked ]. Submitted by Supervisor ]1. Confirmation Specify the name of the product being ordered. Three EPROMs are required for each pattern if this order is performed by EPROMs. One floppy disk is required for each pattern if this order is performed by a floppy disk. Ordering by EPROMs If at least two of the three sets of EPROMs submitted contain identical data, we will produce masks based on this data. We shall assume the responsibility for errors only if the mask ROM data on the products we produce differs from this data. Thus, extreme care must be taken to verify the data in the submitted EPROMs. Checksum code for entire EPROM (hexadecimal notation) EPROM type (indicate the type used) (1) Set “FF16” in the shaded area. Microcomputer name : M37212M6-XXXSP M37212M6-XXXFP EPROM address Product nameASCII code: 'M37212M6-' 2 7 C 1 0 1 000016 000F16 12345678901234567 1 234567890123456 7 1 234567890123456 7 12345678901234567 Data ROM(24K) Character ROM2-b 1080016 10FFF16 FFFF16 A00016 1000016 12345678901234567 1 234567890123456 7 1 234567890123456 7 1 234567890123456 7 12345678901234567 107FF16 Character ROM1-b Character ROM2-a Character ROM1-a 1100016 117FF16 1180016 11FFF16 1200016 1FFFF16

SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER for VOLTAGE SYNTHESIZER with ON-SCREEN DISPLAY CONTROLLER M37212M4/M8–XXXSP, M37212M6–XXXSP/FP M37212EFSP/FP MITSUBISHI MICROCOMPUTERS Rev. 1.0 (2/3) GZZ–SH55–24B < 91A0 > SINGLE-CHIP MICROCOMPUTER M37212M6-XXXSP/FP MITSUBISHI ELECTRIC Addresses 000016 to 000F16 store the product name. ASCII codes ‘M37212M6-’ are listed on the right. The addresses and data are in hexadecimal notation. Note: If the name of the product contained in the EPROMs does not match the name on the mask ROM confirmation form, the ROM processing is disabled. Please make sure the data is written correctly. Address 000016 ‘M’ = 4D 16 000116 ‘3’ = 3316 000216 ‘7’ = 3716 000316 ‘2’ = 3216 000416 ‘1’ = 3116 000516 ‘2’ = 3216 000616 ‘M’ = 4D 16 000716 ‘6’ = 3616 Address 000816 ‘–’ = 2D16 We will produce masks based on the mask files generated by the mask file generating utility. We shall assume the responsibility for errors only if the mask ROM data on the products we produce differs from this mask file. Thus, extreme care must be taken to verify the mask file in the submitted floppy disk. The submitted floppy disk must be 3.5-inch 2HD type and DOS/V format. And the number of the mask files must be 1 in one floppy disk. File code (hexadecimal notation) Mask file name .MSK (equal or less than eight characters) ]2. Mark specification Mark specification must be submitted using the correct form for the type of package being ordered. Fill the appropriate mark specification form (52P4B for M37212M6-XXXSP , 80P6N for M37212M6-XXXFP) and attach to the mask ROM confirmation form. ]3. Comments (2) Write the ASCII codes that indicate the product name of “M37212M6–” to addresses 000016 to 000F16.

SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER for VOLTAGE SYNTHESIZER with ON-SCREEN DISPLAY CONTROLLER M37212M4/M8–XXXSP, M37212M6–XXXSP/FP M37212EFSP/FP MITSUBISHI MICROCOMPUTERS Rev. 1.0 (3/3) GZZ–SH55–24B < 91A0 > SINGLE-CHIP MICROCOMPUTER M37212M6-XXXSP/FP MITSUBISHI ELECTRIC Inputting the character ROM Input the character ROM data by dividing it into character ROM1 and character ROM2. The structure of character ROM(divided into 12 516 dots font) Example Character code Ò1A16Ó 101A016 101AF16 b7 b6 b5 b4 b3 b2 b1 b0 b7 b6 b5 b4 b3 b2 b1 b0 A B C D E F A B C D E F F016 F016 F016 F016 F016 F016 F016 F016 F816 F816 F816 F416 F416 F416 F016 F016 109A016 109AF16 Character ROM1 Character ROM2 F16 016 416 A16 116 0416 A16 116 116 016 016 F16 016 016 016 016 016 (Note) Write the character code "00 16 " to "7F16" to Addresses 1000016 to 10FFF16. Write the character code "80 16 " to "FF16" to Addresses 1100016 to 11FFF16. Example Example to to

SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER for VOLTAGE SYNTHESIZER with ON-SCREEN DISPLAY CONTROLLER M37212M4/M8–XXXSP, M37212M6–XXXSP/FP M37212EFSP/FP MITSUBISHI MICROCOMPUTERS Rev. 1.0 GZZ–SH55–42B < 91A0 > SINGLE-CHIP MICROCOMPUTER M37212M8-XXXSP MITSUBISHI ELECTRIC Mask ROM number Receipt Date: Section headsignature Supervisorsignature ] Customer Company name TEL ( ) Date :Date issued Issuance signature Note : Please fill in all items marked ]. Submitted by Supervisor ]1. Confirmation Three EPROMs are required for each pattern if this order is performed by EPROMs. One floppy disk is required for each pattern if this order is performed by a floppy disk. Ordering by EPROMs If at least two of the three sets of EPROMs submitted contain identical data, we will produce masks based on this data. We shall assume the responsibility for errors only if the mask ROM data on the products we produce differs from this data. Thus, extreme care must be taken to verify the data in the submitted EPROMs. Checksum code for entire EPROM (hexadecimal notation) EPROM type (indicate the type used) (1) Set “FF16” in the shaded area. EPROM address Product nameASCII code: 'M37212M8-' 2 7 C 1 0 1 Character ROM2-b Character ROM1-b Character ROM2-a Character ROM1-a 000016 000F16 12345678901234567 1 234567890123456 7 1 234567890123456 7 12345678901234567 Data ROM(32K) 1080016 10FFF16 FFFF16 800016 1000016 12345678901234567 1 234567890123456 7 1 234567890123456 7 1 234567890123456 7 12345678901234567 107FF16 1100016 117FF16 1180016 11FFF16 1200016 1FFFF16 (1/3)

SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER for VOLTAGE SYNTHESIZER with ON-SCREEN DISPLAY CONTROLLER M37212M4/M8–XXXSP, M37212M6–XXXSP/FP M37212EFSP/FP MITSUBISHI MICROCOMPUTERS Rev. 1.0 (2/3) GZZ–SH55–42B < 91A0 > SINGLE-CHIP MICROCOMPUTER M37212M8-XXXSP Addresses 000016 to 000F16 store the product name. ASCII codes ‘M37212M8-’ are listed on the right. The addresses and data are in hexadecimal notation. Note: If the name of the product contained in the EPROMs does not match the name on the mask ROM confirmation form, the ROM processing is disabled. Please make sure the data is written correctly. Address 000016 ‘M’ = 4D 16 000116 ‘3’ = 3316 000216 ‘7’ = 3716 000316 ‘2’ = 3216 000416 ‘1’ = 3116 000516 ‘2’ = 3216 000616 ‘M’ = 4D 16 000716 ‘8’ = 3816 Address 000816 ‘–’ = 2D16 We will produce masks based on the mask files generated by the mask file generating utility. We shall assume the responsibility for errors only if the mask ROM data on the products we produce differs from this mask file. Thus, extreme care must be taken to verify the mask file in the submitted floppy disk. The submitted floppy disk must be 3.5-inch 2HD type and DOS/V format. And the number of the mask files must be 1 in one floppy disk. File code (hexadecimal notation) Mask file name .MSK (equal or less than eight characters) ]2. Mark specification Mark specification must be submitted using the correct form for the type of package being ordered. Fill the appropriate mark specification form (52P4B for M37212M8-XXXSP) and attach to the mask ROM confirmation form. ]3. Comments (2) Write the ASCII codes that indicate the product name of “M37212M8–” to addresses 000016 to 000F16.

SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER for VOLTAGE SYNTHESIZER with ON-SCREEN DISPLAY CONTROLLER M37212M4/M8–XXXSP, M37212M6–XXXSP/FP M37212EFSP/FP MITSUBISHI MICROCOMPUTERS Rev. 1.0 (3/3) GZZ–SH55–42B < 91A0 > SINGLE-CHIP MICROCOMPUTER M37212M8-XXXSP MITSUBISHI ELECTRIC Inputting the character ROM Input the character ROM data by dividing it into character ROM1 and character ROM2. The structure of character ROM (divided into 12 516 dots font) Example Character code Ò1A16Ó 101A016 101AF16 b7 b6 b5 b4 b3 b2 b1 b0 b7 b6 b5 b4 b3 b2 b1 b0 A B C D E F A B C D E F F016 F016 F016 F016 F016 F016 F016 F016 F816 F816 F816 F416 F416 F416 F016 F016 109A016 109AF16 Character ROM1 Character ROM2 F16 016 416 A16 116 0416 A16 116 116 016 016 F16 016 016 016 016 016 (Note) Write the character code "0016" to "7F16" to addresses 1000016 to 10FFF16. Write the character code "8016" to "FF16" to addresses 1100016 to 11FFF16. Example Example to to

SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER for VOLTAGE SYNTHESIZER with ON-SCREEN DISPLAY CONTROLLER M37212M4/M8–XXXSP, M37212M6–XXXSP/FP M37212EFSP/FP MITSUBISHI MICROCOMPUTERS Rev. 1.0 18. MARK SPECIFICATION FORM

SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER for VOLTAGE SYNTHESIZER with ON-SCREEN DISPLAY CONTROLLER M37212M4/M8–XXXSP, M37212M6–XXXSP/FP M37212EFSP/FP MITSUBISHI MICROCOMPUTERS Rev. 1.0 65 40 64 41 Mitsubishi product number (6-digit, or 7-digit) 65 40 64 41 Customer’s Parts Number Note : The fonts and size of characters are standard Mitsubishi type. Mitsubishi IC catalog name Notes 1 : The mark field should be written right aligned. 2 : The fonts and size of characters are standard Mitsubishi type. 3 : Customer’s parts number can be up to 14 alphanumeric char- acters for capital letters, hyphens, commas, periods and so on. 4 : If the Mitsubishi logo is not required, check the box below. Mitsubishi logo is not required 80P6N (80-PIN QFP) MARK SPECIFICATION FORM Mitsubishi IC catalog name Please choose one of the marking types below (A, B, C), and enter the Mitsubishi IC catalog name and the special mark (if needed). A. Standard Mitsubishi Mark C. Special Mark Required B. Customer’s Parts Number + Mitsubishi IC Catalog Name Mitsubishi IC catalog name Notes1 :If special mark is to be printed, indicate the desired lay- out of the mark in the left figure. The layout will be duplicated technically as close as possible. Mitsubishi product number (6-digit, or 7-digit) and Mask ROM number (3-digit) are always marked for sorting the products. 2 : If special character fonts (e,g., customer’s trade mark logo) must be used in Special Mark, check the box be- low. For the new special character fonts, a clean font original (ideally logo drawing) must be submitted. Special character fonts required 65 40 64 41

SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER for VOLTAGE SYNTHESIZER with ON-SCREEN DISPLAY CONTROLLER M37212M4/M8–XXXSP, M37212M6–XXXSP/FP M37212EFSP/FP MITSUBISHI MICROCOMPUTERS Rev. 1.0 19. ONE TIME PROM VERSION M37212EFSP/FP MARKING M37212EFSP XXXXXXX XXXXXXX is mitsubishi lot number M37212EFFP XXXXXXX XXXXXXX is mitsubishi lot number

SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER for VOLTAGE SYNTHESIZER with ON-SCREEN DISPLAY CONTROLLER M37212M4/M8–XXXSP, M37212M6–XXXSP/FP M37212EFSP/FP MITSUBISHI MICROCOMPUTERS Rev. 1.0 20. APPENDIX Pin Configuration (TOP VIEW) Outline 52P4B P 41/ SC L K/ A - D 6 XO U T H S Y N C VS Y N C P 60/ P W M 0 P 61/ P W M 1 P 62/ P W M 2 P 63/ P W M 3 P 00/ P W M 4 P 01/ P W M 5 P 40/ SO U T I N )/ A - D 7 D A P 35/ I N T 2 / A - D 4 P 34/ I N T 1 P 33/ T I M 3 P 32/ T I M 2 P 24 P 25 C N VS S XI N VS S P 52/ R P 53/ G P 54/ B P 55/ O U T 1 P 20 P 21 P 22 P 10/ O U T 2 / A - D 8 P 11/ S C L 1 P 12/ S C L 2 P 13/ S D A 1 P 14/ S D A 2 P 15/ I N T 3 / A - D 1 P 16/ A - D 2 P 30 P 31 R E S E T O S C 1 / P 36 O S C 2 / P 37 VC C P 17/ A - D 3 P 02/ P W M 6 P 03/ P W M 7 P 42/ SI N / A - D 5 P 26 P 27 P 23 P 04 P 05 P 06 P 07 M M M M X X X S P M E F S P

SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER for VOLTAGE SYNTHESIZER with ON-SCREEN DISPLAY CONTROLLER M37212M4/M8–XXXSP, M37212M6–XXXSP/FP M37212EFSP/FP MITSUBISHI MICROCOMPUTERS Rev. 1.0 Outline 80P6N-A P 075 P 10/ O U T 2 / A - D 8 P 11/ S C L 1 P 12/ S C L 2 P 13/ S D A 1 P 14/ S D A 2 P 15/ I N T 3 / A - D 1 P 16/ A - D 2 P 30 P 31 R E S E T O S C 1 / P 36 O S C 2 / P 37 VC C P 17/ A - D 3 H S Y N C VS Y N C P 60/ P W M 0 P 61/ P W M 1 P 62/ P W M 2 P 63/ P W M 3 P 00/ P W M 4 P 01/ P W M 5 P 02/ P W M 6 P 03/ P W M 7 XO U T VS S P 41/ SC L K/ A - D 6 P 40/ SO U T I N )/ A - D 7 D A P 35/ I N T 2 / A - D 4 P 34/ I N T 1 P 33/ T I M 3 P 32/ T I M 2 P P 25 P 42/ SI N / A - D 5 C N VS S XI N P 26 P 27 P 52/ R P 53/ G P 54/ B P 55/ O U T 1 P 20 P 21 P 22 P 23 P 04 P 05 P 06 N C N C N C N C N C N C N C N C N C N C N C N C N C N C N C N C N C N C N C N C N C N C N C N C N C N C N C 9 2 M M X X X F P M E F F P N C

SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER for VOLTAGE SYNTHESIZER with ON-SCREEN DISPLAY CONTROLLER M37212M4/M8–XXXSP, M37212M6–XXXSP/FP M37212EFSP/FP MITSUBISHI MICROCOMPUTERS Rev. 1.0 Memory Map 0 0 0 01 0 0 C 01 0 0 F F1 0 6 B 71 F F F F1 F F D E1 F F 0 01 0 6 0 01 1 1 F F F1 b y t e s S e e n o t e 0 1 7 F1 0 1 B F1 1 0 0 0 01 O S D R O M K b y t e s S F R a r e a I n t e r r u p t v e c t o r a r e a S p e c i a l p a g e Z e r o p a g e N o t e : R e f e r t o T a b l e 8 . 1 0 . 3 O S D R A M . 0 1 0 01 0 0 B F1 N o t u s e d A 0 0 01 N o t u s e d C 0 0 01 N o t u s e d M 3 7 2 1 2 M 6 - X X X S P F P R A M b y t e s M 3 7 2 1 2 M 4 - X X X S P R A M b y t e s M 3 7 2 1 2 M 6 - X X X S P F P R O M K b y t e s M 3 7 2 1 2 M 4 - X X X S P R O M K b y t e s n M M M X X X S P M M X X X S P F P

SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER for VOLTAGE SYNTHESIZER with ON-SCREEN DISPLAY CONTROLLER M37212M4/M8–XXXSP, M37212M6–XXXSP/FP M37212EFSP/FP MITSUBISHI MICROCOMPUTERS Rev. 1.0 0 0 0 01 0 0 C 01 0 0 F F1 0 6 B 71 F F F F1 F F D E1 F F 0 01 0 6 0 01 1 1 F F F1 b y t e s S e e n o t e M 3 7 2 1 2 E F S P R A M b y t e s 0 8 0 01 1 0 0 0 01 O S D R O M K b y t e s 0 2 C 01 S F R a r e a I n t e r r u p t v e c t o r a r e a S p e c i a l p a g e Z e r o p a g e N o t u s e d N o t e : R e f e r t o T a b l e 8 . 1 0 . 3 O S D R A M 0 2 1 71 0 2 1 B1 R O M c o r r e c t i o n f u n c t i o n V e c t o r a d d r e s s C V e c t o r a d d r e s s E 0 1 0 01 0 0 B F1 0 5 F F1 N o t u s e d 0 2 E 01 M 3 7 2 1 2 M 8 - X X X S P R A M b y t e s 0 1 F F1 N o t u s e d N o t u s e d 0 3 3 F1 2 p a g e r e g i s t e r M 3 7 2 1 2 E F S P R O M K b y t e s M 3 7 2 1 2 M 8 - X X X S P R O M K b y t e s 8 0 0 01 n M M X X X S P M E F S P F P

SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER for VOLTAGE SYNTHESIZER with ON-SCREEN DISPLAY CONTROLLER M37212M4/M8–XXXSP, M37212M6–XXXSP/FP M37212EFSP/FP MITSUBISHI MICROCOMPUTERS Rev. 1.0 Memory Map of Special Function Register (SFR) n S F R a r e a a d d r e s s e s C t o D D 01 D 11 D 21 D 31 D 41 D 51 D 61 D 71 D 81 D 91 D A1 D B1 D C 1 D D 1 D E1 D F1 C 01 C 11 C 21 C 31 C 41 C 51 C 61 C 71 C 81 C 91 C B1 C C 1 C D 1 C E1 C F1 C A1 A d d r e s s P o r t P 5 ( P 5 ) P o r t P 5 d i r e c t i o n r e g i s t e r ( D 5 ) D A - H r e g i s t e r ( D A - H ) D A - L r e g i s t e r ( D A - L ) P W M 0 r e g i s t e r ( P W M 0 ) P o r t P 1 ( P 1 ) P o r t P 1 d i r e c t i o n r e g i s t e r ( D 1 ) P o r t P 3 ( P 3 ) P o r t P 3 d i r e c t i o n r e g i s t e r ( D 3 ) P o r t P 2 ( P 2 ) P o r t P 2 d i r e c t i o n r e g i s t e r ( D 2 ) R e g i s t e r P o r t P 0 ( P 0 ) P o r t P 0 d i r e c t i o n r e g i s t e r ( D 0 ) P W M 1 r e g i s t e r ( P W M 1 ) P W M 2 r e g i s t e r ( P W M 2 ) P W M 3 r e g i s t e r ( P W M 3 ) P W M 4 r e g i s t e r ( P W M 4 ) P W M o u t p u t c o n t r o l r e g i s t e r 1 ( P W ) b 7 b 0 B i t a l l o c a t i o n S t a t e i m m e d i a t e l y a f t e r r e s e t 0 01 b 7 b 0 0 01 0 01 0? ???0 0 S e r i a l I / O m o d e r e g i s t e r ( S M ) S e r i a l I / O r e g i s t e r ( S I O ) 0 01 P o r t P 6 ( P 6 ) P W M o u t p u t c o n t r o l r e g i s t e r 2 ( P N ) I2C d a t a s h i f t r e g i s t e r S I2C c o n t r o l r e g i s t e r S D I2C c l o c k c o n t r o l r e g i s t e r S I2C s t a t u s r e g i s t e r S I2C a d d r e s s r e g i s t e r S D P 5 2 S E L 00P 5 3 S E L P 5 4 S E L P 5 5 S E L P 5 2P 5 3P 5 4P 5 5 P 3 1 DP 3 0 D 0 ?000 ??0 P W 0P W 1P W 2P W 3P W 4P W 5P W 6P W 7 P N 2P N 3P N 4 0 01 0 01 0 F1 S A D 0S A D 1S A D 2S A D 3S A D 4S A D 5S A D 6 R B W L R BA D 0A A SA LP I NB BT R XM S T B C 0B C 1B C 2E S OA L SB S E L 0B S E L 1 1 0 B I T S A D D 1D 2D 3D 4D 5D 6D 7D 0 0 01 0 01 S M 0S M 1S M 2S M 3S M 5S M 6 0 C C R 0C C R 1C C R 2C C R 3C C R 4A C K F A S T M O D E A C K B I T 0 01 0 01 00 ?00010 : F i x t o t h i s b i t t o “ 0 ” d o n o t w r i t e t o B i t a l l o c a t i o n S t a t e i m m e d i a t e l y a f t e r r e s e t F u n c t i o n b i t : N o f u n c t i o n b i t : F i x t o t h i s b i t t o “ 1 ” d o n o t w r i t e t o N a m e : : “ 0 ” i m m e d i a t e l y a f t e r r e s e t : I n d e t e r m i n a t e i m m e d i a t e l y a f t e r r e s e t : “ 1 ” i m m e d i a t e l y a f t e r r e s e t P o r t P 4 ( P 4 ) P o r t P 4 d i r e c t i o n r e g i s t e r ( D 4 ) P N 0P N 1 P 4 1 DP 4 0 D P 4 1P 4 0 P 6 1P 6 0P 6 2 0 ?000 ??0 0 01 0 F1 P 6 3 1111

SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER for VOLTAGE SYNTHESIZER with ON-SCREEN DISPLAY CONTROLLER M37212M4/M8–XXXSP, M37212M6–XXXSP/FP M37212EFSP/FP MITSUBISHI MICROCOMPUTERS Rev. 1.0 F 01 F 11 F 21 F 31 F 41 F 51 F 61 F 71 F 81 F 91 F A1 F B1 F C 1 F D 1 F E1 F F1 E 01 E 11 E 21 E 31 E 41 E 51 E 61 E 71 E 81 E 91 E B1 E C 1 E D 1 E E1 E F1 E A1 C R T p o r t c o n t r o l r e g i s t e r ( C R T P ) A - D m o d e r e g i s t e r ( A D M ) A - D c o n t r o l r e g i s t e r ( A D C ) T i m e r 1 ( T 1 ) V e r t i c a l p o s i t i o n r e g i s t e r 2 ( C V 2 ) C o l o r r e g i s t e r 0 ( C O 0 ) C o l o r r e g i s t e r 1 ( C O 1 ) C h a r a c t e r s i z e r e g i s t e r ( C S ) B o r d e r s e l e c t i o n r e g i s t e r ( M D ) H o r i z o n t a l p o s i t i o n r e g i s t e r ( H R ) V e r t i c a l p o s i t i o n r e g i s t e r 1 ( C V 1 ) T i m e r 2 ( T 2 ) T i m e r 3 ( T 3 ) T i m e r 4 ( T 4 ) T i m e r 1 2 m o d e r e g i s t e r ( T 1 2 M ) T i m e r 3 4 m o d e r e g i s t e r ( T 3 4 M ) P W M 5 r e g i s t e r ( P W M 5 ) I n t e r r u p t i n p u t p o l a r i t y r e g i s t e r ( R E ) I n t e r r u p t r e q u e s t r e g i s t e r 1 ( I R E Q 1 ) I n t e r r u p t r e q u e s t r e g i s t e r 2 ( I R E Q 2 ) I n t e r r u p t c o n t r o l r e g i s t e r 1 ( I C O N 1 ) I n t e r r u p t c o n t r o l r e g i s t e r 2 ( I C O N 2 ) C o l o r r e g i s t e r 2 ( C O 2 ) C o l o r r e g i s t e r 3 ( C O 3 ) C R T c l o c k s e l e c t i o n r e g i s t e r ( C K ) C P U m o d e r e g i s t e r ( C M ) b 7 b 0 C C C C T 3 4 M 0 C M 2 T M 1 RT M 2 RT M 3 RT M 4 RO S D RV S C RI T 3 R C K 0M S R I T 1 RI T 2 RS 1 R T M 1 ET M 2 ET M 3 ET M 4 EO S D EV S C EI T 3 E I T 1 EI T 2 ES 1 EM S E b 7 b 0 F F1 0 71 F F1 0 71 001 11 11 0 01 0 01 0 01 0 01 FC 1 0 01 0 01 0 01 P W M 6 r e g i s t e r ( P W M 6 ) P W M 7 r e g i s t e r ( P W M 7 ) I I C R R E3R E4 H R 0H R 1H R 2H R 3H R 4H R 5 C V 1 0 C S 1 0C S 1 1C S 2 0C S 2 1 M D 1 0M D 2 0 C C V S Y CR / G / BO U T 2O P 5 O U T 1O P 6H S Y C A D M0 A D C0 0 01 000 0?0?0 000 ????0 0 01 0 01 n S F R a r e a a d d r e s s e s E t o F A d d r e s s R e g i s t e r B i t a l l o c a t i o nS t a t e i m m e d i a t e l y a f t e r r e s e t : F i x t o t h i s b i t t o “ 0 ” d o n o t w r i t e t o B i t a l l o c a t i o n S t a t e i m m e d i a t e l y a f t e r r e s e t F u n c t i o n b i t : N o f u n c t i o n b i t : F i x t o t h i s b i t t o “ 1 ” d o n o t w r i t e t o N a m e : : “ 0 ” i m m e d i a t e l y a f t e r r e s e t : I n d e t e r m i n a t e i m m e d i a t e l y a f t e r r e s e t : “ 1 ” i m m e d i a t e l y a f t e r r e s e t I I C E T 3 4 M 1T 3 4 M 2T 3 4 M 3T 3 4 M 4T 3 4 M 5 T 1 2 M 0T 1 2 M 1T 1 2 M 2T 1 2 M 3T 1 2 M 40 A D C1A D C2A D C3A D C4A D C5 A D M1A D M2A D M4 00 C K0C O P 7 C O 3 1C O 3 2C O 3 3C O 3 5C O 3 4C O 3 6C O 3 7 C O 2 1C O 2 2C O 2 3C O 2 5C O 2 4C O 2 6C O 2 7 C O 1 1C O 1 2C O 1 3C O 1 5C O 1 4C O 1 6C O 1 7 C O 0 1C O 0 2C O 0 3C O 0 5C O 0 4C O 0 6C O 0 7 C V 1 1C V 1 2C V 1 3C V 1 4C V 1 5C V 1 6 C V 2 0C V 2 1C V 2 2C V 2 3C V 2 4C V 2 5C V 2 6 0 01 0 01 0 01 0 01 0 01 ?00 00000 0 01 0 01 0000 ?00 0 000 0

SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER for VOLTAGE SYNTHESIZER with ON-SCREEN DISPLAY CONTROLLER M37212M4/M8–XXXSP, M37212M6–XXXSP/FP M37212EFSP/FP MITSUBISHI MICROCOMPUTERS Rev. 1.0 b 7b 0b 7b 0 2 1 71 2 1 81 2 1 91 2 1 B1 2 1 A1 R O M c o r r e c t i o n e n a b l e r e g i s t e r ( R C R ) R O M c o r r e c t i o n a d d r e s s 1 ( h i g h - o r d e r ) R O M c o r r e c t i o n a d d r e s s 1 ( l o w - o r d e r ) R O M c o r r e c t i o n a d d r e s s 2 ( h i g h - o r d e r ) R O M c o r r e c t i o n a d d r e s s 2 ( l o w - o r d e r ) R C R 1R C R 0 0 01 0 01 0 01 0 01 00 0 01 n p a g e r e g i s t e r a r e a a d d r e s s e s t o A d d r e s s R e g i s t e r B i t a l l o c a t i o nS t a t e i m m e d i a t e l y a f t e r r e s e t : F i x t o t h i s b i t t o “ 0 ” d o n o t w r i t e t o B i t a l l o c a t i o nS t a t e i m m e d i a t e l y a f t e r r e s e t F u n c t i o n b i t : N o f u n c t i o n b i t : F i x t o t h i s b i t t o “ 1 ” d o n o t w r i t e t o N a m e : : “ 0 ” i m m e d i a t e l y a f t e r r e s e t : I n d e t e r m i n a t e i m m e d i a t e l y a f t e r r e s e t : “ 1 ” i m m e d i a t e l y a f t e r r e s e t N o t e : O n l y M 3 7 2 1 2 M 8 - X X X S P a n d M 3 7 2 1 2 E F S P / F P h a v e 2 p a g e r e g i s t e r .

SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER for VOLTAGE SYNTHESIZER with ON-SCREEN DISPLAY CONTROLLER M37212M4/M8–XXXSP, M37212M6–XXXSP/FP M37212EFSP/FP MITSUBISHI MICROCOMPUTERS Rev. 1.0 Internal State of Processor Status Register and Program Counter at Reset b 7 b 0 b 7 b 0 R e g i s t e r P r o c e s s o r s t a t u s r e g i s t e r ( P S ) B i t a l l o c a t i o nS t a t e i m m e d i a t e l y a f t e r r e s e t P r o g r a m c o u n t e r ( P C H ) P r o g r a m c o u n t e r ( P C L) C o n t e n t s o f a d d r e s s F F F F1 C o n t e n t s o f a d d r e s s F F F E1 : F i x t o t h i s b i t t o “ 0 ” d o n o t w r i t e t o B i t a l l o c a t i o n S t a t e i m m e d i a t e l y a f t e r r e s e t F u n c t i o n b i t : N o f u n c t i o n b i t : F i x t o t h i s b i t t o “ 1 ” d o n o t w r i t e t o N a m e : : “ 0 ” i m m e d i a t e l y a f t e r r e s e t : I n d e t e r m i n a t e i m m e d i a t e l y a f t e r r e s e t : “ 1 ” i m m e d i a t e l y a f t e r r e s e t

SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER for VOLTAGE SYNTHESIZER with ON-SCREEN DISPLAY CONTROLLER M37212M4/M8–XXXSP, M37212M6–XXXSP/FP M37212EFSP/FP MITSUBISHI MICROCOMPUTERS Rev. 1.0 Structure of Register The figure of each register structure describes its functions, contents at reset, and attributes as follows: V a l u e s i m m e d i a t e l y a f t e r r e s e t r e l e a s e B i t a t t r i b u t e s ( N o t e 1 ) ( N o t e 2 )B i t p o s i t i o n 2 : B i t a t t r i b u t e s • • • • • • T h e a t t r i b u t e s o f c o n t r o l r e g i s t e r b i t s a r e c l a s s i f i e d i n t o 3 t y p e s : r e a d - o n l y , w r i t e - o n l y a n d r e a d a n d w r i t e I n t h e f i g u r e t h e s e a t t r i b u t e s a r e r e p r e s e n t e d a s f o l l o w s : B i t i n w h i c h n o t h i n g i s a s s i g n e d N o t e s 1 : V a l u e s i m m e d i a t e l y a f t e r r e s e t r e l e a s e a f t e r r e s e t r e l e a s e a f t e r r e s e t r e l e a s e I n d e t e r m i n a t e I n d e t e r m i n a t e a f t e r r e s e t r e l e a s e

  • • • • • • R e a d e n a b l e d R e a d d i s a b l e d R
  • • • • • • W r i t e e n a b l e d W r i t e d i s a b l e d c a n b e s e t b y s o f t w a r e b u t c a n n o t b e s e t W b 7b 6 b 5b 4b 3 b 2b 1b 0 B A f t e r r e RW C P U M o d e R e g i s t e r 0 , 1 3 , 4 N a m eF u n c t i o n s P r o c e s s o r m o d e b i t s C M C M ) 0 0 : S i n g l e - c h i p m o d e N o t a v a i l a b l e F i x t h e s e b i t s t o “ 1 . ” 1S t a c k p a g e s e l e c t i o n b i t S e e n o t e C M b 1 b 0 0 : 0 p a g e p a g e 1 00 5 1N o t h i n g i s a s s i g n e d . T h i s b i t i s w r i t e d i s a b l e b i t . W h e n t h i s b i t i s r e a d o u t t h e v a l u e i s 6 , 7 0C l o c k s w i t c h b i t s C M C M ) 0 0 : f ( XI N ) = 8 M H z f XI N ) M H z f XI N ) M H z D o n o t s e t b 7 b 6 C P U m o d e r e g i s t e r ( C P U M ) ( C M ) [ A d d r e s s 0 0 F B1 R W RW RW R W RW < E x a m p l e >

SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER for VOLTAGE SYNTHESIZER with ON-SCREEN DISPLAY CONTROLLER M37212M4/M8–XXXSP, M37212M6–XXXSP/FP M37212EFSP/FP MITSUBISHI MICROCOMPUTERS Rev. 1.0 Addresses 00C116, 00C316, 00C516 Address 00C716 b7 b6 b5 b4 b3 b2 b1 b0 Port Pi direction register (Di) (i=0,1,2) [Addresses 00C116, 00C3 16, 00C516] B Name Functions After reset R W Port Pi Direction Register 0 0 : Port Pi 0 input mode 1 : Port Pi0 output mode 1 0 : Port Pi1 input mode 1 : Port Pi1 output mode 2 0 : Port Pi2 input mode 1 : Port Pi2 output mode 3 0 : Port Pi 3 input mode 1 : Port Pi3 output mode 4 0 : Port Pi 4 input mode 1 : Port Pi4 output mode 5 0 : Port Pi 5 input mode 1 : Port Pi5 output mode 6 0 : Port Pi 6 input mode 1 : Port Pi6 output mode 7 0 : Port Pi7 input mode 1 : Port Pi7 output mode Port Pi direction register RW RW RW RW RW RW RW RW b 7b 6b 5b 4b 3b 2b 1b 0 P o r t P i d i r e c t i o n r e g i s t e r ( D i ) ( i = 3 , 4 ) [ A d d r e s s 0 0 C 71 6, 00 C 91 B N a m e F u n c t i o n s A f t e r r e s e t R W P o r t P i D i r e c t i o n R e g i s t e r 00 : P o r t P i0 i n p u t m o d e P o r t P o u t p u t m o d e 1 0 : P o r t P i1 i n p u t m o d e P o r t P o u t p u t m o d e P o r t P i d i r e c t i o n r e g i s t e r RW RW i n d e t e r m i n a t eN o t h i n g i s a s s i g n e d . T h e s e b i t s a r e w r i t e d i s a b l e b i t s . W h e n t h e s e b i t s a r e r e a d o u t t h e v a l u e s a r e i n d e t e r m i n a t e . R—2 t o 7

SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER for VOLTAGE SYNTHESIZER with ON-SCREEN DISPLAY CONTROLLER M37212M4/M8–XXXSP, M37212M6–XXXSP/FP M37212EFSP/FP MITSUBISHI MICROCOMPUTERS Rev. 1.0 Address 00CB 16 b 7b 6b 5b 4b 3b 2b 1b 0 Po r t P 5 d i r e c t i o n r e g i s t e r ( D 5 ) [ A d d r e s s 0 0 C B1 bN a m eF u n c t i o n sA f t e r r e s e tR W P o r t P 5 D i r e c t i o n R e g i s t e r 0 , 10 R —N o t h i n g i s a s s i g n e d . T h e s e b i t s a r e w r i t e d i s a b l e b i t s . W h e n t h e s e b i t s a r e r e a d o u t t h e v a l u e s a r e 2 0 : R s i g n a l o u t p u t P o r t P o u t p u t s e l e c t i o n b i t P S E L 0 : G s i g n a l o u t p u t P o r t P o u t p u t s e l e c t i o n b i t P S E L 0 : B s i g n a l o u t p u t P o r t P o u t p u t s e l e c t i o n b i t P S E L 0 : O U T 1 s i g n a l o u t p u t P o r t P o u t p u t 6 , 7 P o r t P 52 o u t p u t s i g n a l s e l e c t i o n b i t P S E L I n d e t e r m i n a t e R —N o t h i n g i s a s s i g n e d . T h e s e b i t s a r e w r i t e d i s a b l e b i t s . W h e n t h e s e b i t s a r e r e a d o u t t h e v a l u e s a r e Address 00D516 b 7b 6 b 5b 4b 3 b 2b 1b 0 P W M o u t p u t c o n t r o l r e g i s t e r 1 ( P W ) [ A d d r e s s 0 0 D 5 B A f t e r r e s e t RW P W M O u t p u t C o n t r o l R e g i s t e r 1 N a m eF u n c t i o n s D A , P W M c o u n t s o u r c e s e l e c t i o n b i t P W 0 : C o u n t s o u r c e s u p p l y C o u n t s o u r c e s t o p P 60/ P W M 0 o u t p u t s e l e c t i o n b i t P W 0 : P 60 o u t p u t P W M o u t p u t P 61/ P W M 1 o u t p u t s e l e c t i o n b i t P W 0 : P 61 o u t p u t P W M o u t p u t P 62/ P W M 2 o u t p u t s e l e c t i o n b i t P W 0 : P 62 o u t p u t P W M o u t p u t s e l e c t i o n b i t P W 0 : P 63 o u t p u t P W M o u t p u t s e l e c t i o n b i t P W 0 : P 00 o u t p u t P W M o u t p u t D A / P N 4 s e l e c t i o n b i t P W 0 : D A o u t p u t P N 4 o u t p u t s e l e c t i o n b i t P W 0 : P 01 o u t p u t P W M o u t p u t RW RW RW RW RW RW RW RW

SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER for VOLTAGE SYNTHESIZER with ON-SCREEN DISPLAY CONTROLLER M37212M4/M8–XXXSP, M37212M6–XXXSP/FP M37212EFSP/FP MITSUBISHI MICROCOMPUTERS Rev. 1.0 Address 00D616 Address 00D716 Address 00D816 b7b6 b5b4b3 b2b1b0 PWM output control register 2 (PN) [Address 00D616] B After resetRW PWM Output Control Register 2 Name Functions DA output polarity selection bit (PN2) 0 : Positive polarity 1 : Negative polarity PWM output polarity selection bit (PN3) DA general-purpose output bit (PN4) 0 : Output LOW 1 : Output HIGH to 0Nothing is assigned. These bits are write disable bits. When these bits are read out, the values are “0.” 0 : Positive polarity 1 : Negative polarity RW RW RW RW P02/PWM6 output selection bit (PN0) 0 : P02 1 : PWM6 output 1 0R WP03/PWM7 output selection bit (PN1) 0 : P03 1 : PWM7 output b 7b 6b 5b 4b 3b 2b 1b 0 R B W t o S l a v e a d d r e s s S A D t o S A D < O n l y i n 1 0 - b i t a d d r e s s i n g ( i n s l a v e ) m o d e > T h e l a s t s i g n i f i c a n t b i t o f a d d r e s s d a t a i s c o m p a r e d W a i t t h e f i r s t b y t e o f s l a v e a d d r e s s a f t e r S T A R T c o n d i t i o n r e a d s t a t e W a i t t h e f i r s t b y t e o f s l a v e a d d r e s s a f t e r R E S T A R T c o n d i t i o n w r i t e s t a t e < I n b o t h m o d e s > T h e a d d r e s s d a t a i s c o m p a r e d I2C A d d r e s s R e g i s t e r I2C a d d r e s s r e g i s t e r S D A d d r e s s D B N a m e F u n c t i o n s A f t e r r e s e tR W R W b 7b 6b 5b 4b 3b 2b 1b 0 I2C d a t a s h i f t r e g i s t e r S A d d r e s s D B F u n c t i o n sA f t e r r e s e tR W I C D a t a S h i f t R e g i s t e r t o T h i s i s a n 8 - b i t s h i f t r e g i s t e r t o s t o r e r e c e i v e d a t a a n d w r i t e t r a n s m i t d a t a I n d e t e r m i n a t e N o t e : 2T o w r i t e d a t a i n t o t h e I C d a t a s h i f t r e g i s t e r a f t e r s e t t i n g t h e M S T b i t t o s l a v e m o d e k e e p a n i n t e r v a l o f m a c h i n e c y c l e s o r m o r e N a m e D 0 t o D 7 RW

SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER for VOLTAGE SYNTHESIZER with ON-SCREEN DISPLAY CONTROLLER M37212M4/M8–XXXSP, M37212M6–XXXSP/FP M37212EFSP/FP MITSUBISHI MICROCOMPUTERS Rev. 1.0 Address 00D916 Address 00DA 16 b 7b 6b 5b 4b 3b 2b 1b 0 I2C s t a t u s r e g i s t e r S A d d r e s s D I2C S t a t u s R e g i s t e r 6 , 7 b 7 b 6 S l a v e r e c i e v e m o d e S l a v e t r a n s m i t m o d e M a s t e r r e c i e v e m o d e M a s t e r t r a n s m i t m o d e B N a m e F u n c t i o n s A f t e r r e s e tR W C o m m u n i c a t i o n m o d e s p e c i f i c a t i o n b i t s T R X M S T 0 : B u s f r e e B u s b u s y B u s b u s y f l a g ( B B ) : I n t e r r u p t r e q u e s t i s s u e d N o i n t e r r u p t r e q u e s t i s s u e d I B U S i n t e r f a c e i n t e r r u p t r e q u e s t b i t P I N 0 : N o t d e t e c t e d D e t e c t e d A r b i t r a t i o n l o s t d e t e c t i n g f l a g A L S e e n o t e 0 : A d d r e s s m i s m a t c h A d d r e s s m a t c h S l a v e a d d r e s s c o m p a r i s o n f l a g A A S S e e n o t e 0 : N o g e n e r a l c a l l d e t e c t e d G e n e r a l c a l l d e t e c t e d G e n e r a l c a l l d e t e c t i n g f l a g A D S e e n o t e 0 : L a s t b i t = “ 0 ” L a s t b i t L a s t r e c e i v e b i t ( L R B ) S e e n o t e N o t e : T h e s e b i t s a n d f l a g s c a n b e r e a d o u t , b u t c a n n n o t b e w r i t t e n . I n d e t e r m i n a t e R— RW R W ( S e e n o t e ) ( S e e n o t e ) ( S e e n o t e ) ( S e e n o t e ) b 7b 6b 5b 4b 3b 2b 1b 0 t o B i t c o u n t e r N u m b e r o f t r a n s m i t r e c i e v e b i t s B C t o B C b 2 b 1 b 0 B U S i n t e r f a c e u s e e n a b l e b i t E S O 0 : D i s a b l e d E n a b l e d 4D a t a f o r m a t s e l e c t i o n b i t A L S 0 : A d d r e s s i n g f o r m a t F r e e d a t a f o r m a t 5A d d r e s s i n g f o r m a t s e l e c t i o n b i t B I T S A D 0 : 7 - b i t a d d r e s s i n g f o r m a t b i t a d d r e s s i n g f o r m a t 6 , 7 C o n n e c t i o n c o n t r o l b i t s b e t w e e n I C B U S i n t e r f a c e a n d p o r t s B S E L B S E L b 7 b 6 C o n n e c t i o n p o r t ( S e e n o t e ) N o n e S C L S D A S C L S D A S C L S D A S C L S D A I2C c o n t r o l r e g i s t e r S D A d d r e s s D I2C C o n t r o l R e g i s t e r B N a m e F u n c t i o n s A f t e r r e s e t R W R W R W R W R W R W

SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER for VOLTAGE SYNTHESIZER with ON-SCREEN DISPLAY CONTROLLER M37212M4/M8–XXXSP, M37212M6–XXXSP/FP M37212EFSP/FP MITSUBISHI MICROCOMPUTERS Rev. 1.0 Address 00DB 16 Address 00DC 16 b 7b 6b 5b 4b 3b 2b 1b 0 I2C c l o c k c o n t r o l r e g i s t e r S A d d r e s s D I2C C l o c k C o n t r o l R e g i s t e r t o S C L f r e q u e n c y c o n t r o l b i t s C C R t o C C R S C L m o d e s p e c i f i c a t i o n b i t F A S T M O D E 0 : S t a n d a r d c l o c k m o d e H i g h s p e e d c l o c k m o d e 0S t a n d a r d c l o c k m o d e B N a m e F u n c t i o n s A f t e r r e s e t R W A C K b i t A C K B I T A C K c l o c k b i t A C K 0 : A C K i s r e t u r n e d . A C K i s n o t r e t u r n e d 0 : N o A C K c l o c k A C K c l o c k H i g h s p e e d c l o c k m o d e S e t u p d i s a b l e d S e t u p d i s a b l e d0 0 t o 0 2 S e t u p d i s a b l e d 3 3 30 3 S e t u p d i s a b l e d 2 5 00 4 1 0 0 4 0 0 ( S e e n o t e )0 5 8 3 . 31 6 60 6 C C R v a l u e 1 C C R v a l u e . . . 1 7 . 2 3 4 . 51 D 1 6 . 63 3 . 31 E 1 6 . 1 3 2 . 31 F ( a t f = 4 M H z , u n i t : k H z ) N o t e : A t 4 0 0 k H z i n t h e h i g h - s p e e d c l o c k m o d e , t h e d u t y i s a s b e l o w . p e r i o d p e r i o d I n t h e o t h e r c a s e s t h e d u t y i s a s b e l o w p e r i o d p e r i o d S e t u p v a l u e o f C C R C C R b 7b 6 b 5b 4b 3 b 2b 1b 0 S e r i a l I / O m o d e r e g i s t e r ( S M ) [ A d d r e s s 0 0 D C 1 BN a m eF u n c t i o n s S e r i a l I / O M o d e R e g i s t e r 0 , 1I n t e r n a l s y n c h r o n o u s c l o c k s e l e c t i o n b i t s S M S M b b f XI N ) f XI N ) f XI N ) f XI N ) s e l e c t i o n b i t S M s e l e c t i o n b i t S M s e l e c t i o n b i t S M 0 : P 40, P 41 SO U T I N SC L K 0 : E x t e r n a l c l o c k I n t e r n a l c l o c k 0 : L S B f i r s t M S B f i r s t 4 F i x t h i s b i t t o “ 0 . ” 7 N o t h i n g i s a s s i g n e d . T h i s b i t i s a w r i t e d i s a b l e b i t . W h e n t h i s b i t i s r e a d o u t t h e v a l u e i s A f t e r r e s e t RW 0R W RW RW R W RW RW 0R — S e r i a l i n p u t p i n s e l e c t i o n b i t S M 0 : I n p u t s i g n a l f r o m SI N p i n . I n p u t s i g n a l f r o m SO U T p i n

SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER for VOLTAGE SYNTHESIZER with ON-SCREEN DISPLAY CONTROLLER M37212M4/M8–XXXSP, M37212M6–XXXSP/FP M37212EFSP/FP MITSUBISHI MICROCOMPUTERS Rev. 1.0 Address 00E016 Addresses 00E116 and 00E216 Address 00E416 b7 b6 b5 b4 b3 b2 b1 b0 Horizontal position register (HR) [Address 00E016] B Name Functions After reset RW Horizontal Position Register 0to 6, 7 Horizontal display start positions (HR0 to HR5) 64 steps (0016 to 3F16) 0 0Nothing is assigned. These bits are write disable bits. When thses bits are read out, the values are “0.” RW b7 b6 b5 b4 b3 b2 b1 b0 Vertical position register i (CVi) (i = 1 and 2) [Addresses 00E116, 00E216] B Name Functions After reset R W Vertical Position Register i to Vertical display start positions 128 steps (0016 to 7F16) Indeterminate (CVi : CVi0 to CVi6) Nothing is assigned. This bit is a write disable bit. When this bit is read out, the value is “0.” RW b7 b6 b5 b4 b3 b2 b1 b0 Character size register (CS) [Address 00E416] B Name Functions After reset R W Character Size Register 0, 1 Character size of block 1 selection bits (CS10, CS11) 00 : Minimum size 01 : Medium size 10 : Large size 11 : Do not set. Indeterminate 2,3 to7 Character size of block 2 selection bits (CS20,CS21) 00 : Minimum size 01 : Medium size 10 : Large size 11 : Do not set. Nothing is assigned. These bits are write disable bits. When these bits are read out, the values are “0.” Indeterminate RW RW

SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER for VOLTAGE SYNTHESIZER with ON-SCREEN DISPLAY CONTROLLER M37212M4/M8–XXXSP, M37212M6–XXXSP/FP M37212EFSP/FP MITSUBISHI MICROCOMPUTERS Rev. 1.0 Address 00E516 Addresses 00E616 to 00E916 b7 b6 b5 b4 b3 b2 b1 b0 Border selection register (MD) [Address 00E516] B Name Functions After reset R W Border Selection Register border selection bit (MD10) 0 : Same output as R, G, B is output 1 : Border output Indeterminate border selection bit (MD20) 0 : Same output as R, G, B is output 1 : Border output Indeterminate RW RW 03to Nothing is assigned. These bits are write disable bits. When these bits are read out, the values are “0.” 01 Nothing is assigned. This bit is a write disable bit. When this bit is read out, the value is “0.” b 7b 6b 5b 4b 3b 2b 1b 0 C o l o r r e g i s t e r i ( C O i ) ( i = 0 t o 3 ) [ A d d r e s s e s 0 0 E 61 6 t o 0 0 E 91 BN a m eF u n c t i o n sA f t e r r e s e t R W C o l o r R e g i s t e r i 0 0 R — G s i g n a l o u t p u t s e l e c t i o n b i t C O i 0 : N o c h a r a c t e r i s o u t p u t C h a r a c t e r i s o u t p u t I n d e t e r m i n a t e R W R s i g n a l o u t p u t s e l e c t i o n b i t C O i 0 : N o c h a r a c t e r i s o u t p u t C h a r a c t e r i s o u t p u t R W B s i g n a l o u t p u t ( b a c k g r o u n d ) s e l e c t i o n b i t C O i S e e n o t e 0 : N o b a c k g r o u n d c o l o r i s o u t p u t B a c k g r o u n d c o l o r i s o u t p u t R W O U T 1 s i g n a l o u t p u t c o n t r o l b i t C O i S e e n o t e s 0 : C h a r a c t e r i s o u t p u t B l a n k i s o u t p u t R W G s i g n a l o u t p u t ( b a c k g r o u n d ) s e l e c t i o n b i t C O i S e e n o t e 0 : N o b a c k g r o u n d c o l o r i s o u t p u t B a c k g r o u n d c o l o r i s o u t p u t R W R s i g n a l o u t p u t ( b a c k g r o u n d ) s e l e c t i o n b i t C O i S e e n o t e 0 : N o b a c k g r o u n d c o l o r i s o u t p u t B a c k g r o u n d c o l o r i s o u t p u t R W B s i g n a l o u t p u t s e l e c t i o n b i t C O i 0 : N o c h a r a c t e r i s o u t p u t C h a r a c t e r i s o u t p u t N o t h i n g i s a s s i g n e d . T h i s b i t i s a w r i t e d i s a b l e b i t . W h e n t h i s b i t i s r e a d o u t t h e v a l u e i s N o t e s 1 : W h e n b i t 5 = “ 0 ” a n d b i t 4 = “ 1 , ” t h e r e i s o u t p u t s a m e a s a c h a r a c t e r o r b o r d e r o u t p u t f r o m p i n O U T D o n o t s e t b i t a n d b i t W h e n o n l y b i t a n d b i t t h e r e i s o u t p u t f r o m p i n O U T I n d e t e r m i n a t e I n d e t e r m i n a t e I n d e t e r m i n a t e I n d e t e r m i n a t e I n d e t e r m i n a t e I n d e t e r m i n a t e

SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER for VOLTAGE SYNTHESIZER with ON-SCREEN DISPLAY CONTROLLER M37212M4/M8–XXXSP, M37212M6–XXXSP/FP M37212EFSP/FP MITSUBISHI MICROCOMPUTERS Rev. 1.0 Address 00EA16 Addresses 00EC16 b7 b6 b5 b4 b3 b2 b1 b0 CRT control register (CC) [Address 00EA16] B Name Functions After reset R W CRT Control Register bit (CC0) (See note) 0 : All-blocks display off 1 : All-blocks display on (CC1) 0 : Block 1 display off 1 : Block 1 display on 2 0 : Block 2 display off 1 : Block 2 display on to Note: Display is controlled by logical product (AND) between the all-blocks display control bit and each block control bit. Nothing is assigned. These bits are write disable bits. When these bits are read out, the values are “0.” Block 2 display control bit (CC2) RW RW RW 7 0 : P10 1 : OUT2 0P10/OUT2 pin switch bit (CC7) RW b 7b 6b 5b 4b 3b 2b 1b 0 C R T p o r t c o n t r o l r e g i s t e r ( C R T P ) [ A d d r e s s 0 0 E C 1 B N a m eF u n c t i o n sA f t e r r e s e t R W C R T P o r t C o n t r o l R e g i s t e r Y N C i n p u t p o l a r i t y s w i t c h b i t H S Y C 0 : P o s i t i v e p o l a r i t y i n p u t N e g a t i v e p o l a r i t y i n p u t 10 : P o s i t i v e p o l a r i t y i n p u t N e g a t i v e p o l a r i t y i n p u t 2R / G / B o u t p u t p o l a r i t y s w i t c h b i t R G B 0 : P o s i t i v e p o l a r i t y o u t p u t N e g a t i v e p o l a r i t y o u t p u t s w i t c h b i t O U T 0 : P o s i t i v e p o l a r i t y o u t p u t N e g a t i v e p o l a r i t y o u t p u t 5R s i g n a l o u t p u t s w i t c h b i t O P 0 : R s i g n a l o u t p u t M U T E s i g n a l o u t p u t b i t O P 0 : G s i g n a l o u t p u t M U T E s i g n a l o u t p u t 7B s i g n a l o u t p u t s w i t c h b i t O P 0 : B s i g n a l o u t p u t M U T E s i g n a l o u t p u t VS Y N C i n p u t p o l a r i t y s w i t c h b i t V S Y C R W R W R W R W R W R W R W R W O U T 2 o u t p u t p o l a r i t y s w i t c h b i t O U T 0 : P o s i t i v e p o l a r i t y o u t p u t N e g a t i v e p o l a r i t y o u t p u t

SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER for VOLTAGE SYNTHESIZER with ON-SCREEN DISPLAY CONTROLLER M37212M4/M8–XXXSP, M37212M6–XXXSP/FP M37212EFSP/FP MITSUBISHI MICROCOMPUTERS Rev. 1.0 Address 00ED16 Addresses 00EE16 b 7b 6b 5b 4b 3b 2b 1b 0 C R T c l o c k s e l e c t i o n r e g i s t e r ( C K ) [ A d d r e s s 0 0 E D 1 BN a m eF u n c t i o n sA f t e r r e s e t R W C R T C l o c k S e l e c t i o n R e g i s t e r 0 , 1 C R T c l o c k s e l e c t i o n b i t s C K C K S i n c e t h e m a i n c l o c k i s u s e d a s t h e c l o c k f o r d i s p l a y t h e o s c i l l a t i o n f r e q u e n c y i s l i m i t e d B e c a u s e o f t h i s t h e c h a r a c t e r s i z e i n w i d t h h o r i z o n t a l d i r e c t i o n i s a l s o l i m i t e d I n t h i s c a s e p i n s O S C a n d O S C a r e a l s o u s e d a s i n p u t p o r t s P a n d P r e s p e c t i v e l y T h e c l o c k f o r O S D i s s u p p l i e d b y c o n n e c t i n g t h e f o l l o w i n g a c r o s s t h e p i n s O S C a n d O S C a c e r a m i c r e s o n a t o r o n l y f o r O S D a n d a f e e d b a c k r e s i s t o r a q u a r t z c r y s t a l o s c i l l a t o r o n l y f o r O S D a n d a f e e d b a c k r e s i s t o r S e e n o t 2 t o 7 0 000000 b 1 T h e c l o c k f o r d i s p l a y i s s u p p l i e d b y c o n n e c t i n g R C o r L C a c r o s s t h e p i n s O S C a n d O S C F u n c t i o n s b 0 O S D o s c i l l a t i o n f r e q u e n c y f XI N ) O S D o s c i l l a t i o n f r e q u e n c y f XI N ) N o t e : I t i s n e c e s s a r y t o c o n n e c t o t h e r c e r a m i c r e s o n a t o r o r q u a r t z - c r y s t a l o s c i l l a t o r a c r o s s t h e p i n s X F i x t h e s e b i t s t o “ 0 . ” I N a n d XO U R W R W b 7b 6b 5b 4b 3b 2b 1b 0 A - D m o d e r e g i s t e r ( A D M ) [ A d d r e s s 0 0 E E1 B A f t e r r e s e t RW A - D M o d e R e g i s t e r t o 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 s A D M t o A D M N a m eF u n c t i o n s b 2 b 1 b 0 A D A D A D A D A D A D A D A D r e s u l t A D M 0 : I n p u t v o l t a g e < r e f e r e n c e v o l t a g e I n p u t v o l t a g e r e f e r e n c e v o l t a g e I n d e t e r m i n a t e 03T h i s b i t i s a w r i t e d i s a b l e b i t . W h e n t h i s b i t i s r e a d o u t t h e v a l u e i s RW R R — t o N o t h i n g i s a s s i g n e d . T h i s b i t s a r e w r i t e d i s a b l e b i t s . W h e n t h e s e b i t s a r e r e a d o u t t h e v a l u e s a r e R —

SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER for VOLTAGE SYNTHESIZER with ON-SCREEN DISPLAY CONTROLLER M37212M4/M8–XXXSP, M37212M6–XXXSP/FP M37212EFSP/FP MITSUBISHI MICROCOMPUTERS Rev. 1.0 Address 00EF16 Addresses 00F416 b 7b 6b 5b 4b 3b 2b 1b 0 A - D c o n t r o l r e g i s t e r ( A D C ) [ A d d r e s s 0 0 E F1 B A f t e r r e s e t R W A D C o n t r o l R e g i s t e r t o 6 , 7 N a m eF u n c t i o n s D - A c o n v e r t e r s e t b i t s A D C t o A D C b 0b 1b 2 b 3 b 4 b 5 N o t h i n g i s a s s i g n e d . T h e s e b i t s a r e w r i t e d i s a b l e b i t s . W h e n t h e s e b i t s a r e r e e d o u t t h e v a l u e s a r e 000000 00000 0000 111 11111 111111 : 3 / 1 2 8 V c c : 5 / 1 2 8 V c c : 1 2 3 / 1 2 8 V c c : 1 2 5 / 1 2 8 V c c : 1 2 7 / 1 2 8 V c c : 1 / 1 2 8 V c c R W b 7b 6 b 5b 4b 3 b 2b 1b 0 T i m e r m o d e r e g i s t e r ( T 1 2 M ) [ A d d r e s s 0 0 F 41 B A f t e r r e s e t W T i m e r 1 2 M o d e R e g i s t e r N a m e F u n c t i o n s T i m e r 1 c o u n t s o u r c e s e l e c t i o n b i t T M 0 : f ( XI N ) / 1 6 f XI N ) T i m e r 2 c o u n t s o u r c e s e l e c t i o n b i t T M 0 : I n t e r r u p t c l o c k s o u r c e E x t e r n a l c l o c k f r o m T I M p i n T i m e r 1 c o u n t s t o p b i t T M 0 : C o u n t s t a r t C o u n t s t o p T i m e r 2 c o u n t s t o p b i t T M 0 : C o u n t s t a r t C o u n t s t o p T i m e r 2 i n t e r n a l c o u n t s o u r c e s e l e c t i o n b i t T M R WR WR WR WR WR0 : f ( XI N ) / 1 6 T i m e r o v e r f l o w 5 F i x t h i s b i t t o “ 0 . ” 0 WR 6 , 7N o t h i n g i s a s s i g n e d . T h e s e b i t s a r e w r i t e d i s a b l e b i t s . W h e n t h e s e b i t s a r e r e a d o u t t h e v a l u e s a r e 0— R

SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER for VOLTAGE SYNTHESIZER with ON-SCREEN DISPLAY CONTROLLER M37212M4/M8–XXXSP, M37212M6–XXXSP/FP M37212EFSP/FP MITSUBISHI MICROCOMPUTERS Rev. 1.0 Address 00F516 Addresses 00F916 b 7b 6 b 5b 4b 3 b 2b 1b 0 T i m e r 3 4 m o d e r e g i s t e r ( T 3 4 M ) [ A d d r e s s 0 0 F 51 B A f t e r r e s e t RW T i m e r M o d e R e g i s t e r N a m e F u n c t i o n s T i m e r 3 c o u n t s o u r c e s e l e c t i o n b i t T M 0 RW i n t e r r u p t c o u n t s o u r c e s e l e c t i o n b i t T M 0R W T i m e r 3 c o u n t s t o p b i t T M 0 : C o u n t s t a r t C o u n t s t o p T i m e r 4 c o u n t s t o p b i t T M 0 : C o u n t s t a r t C o u n t s t o p s e l e c t i o n b i t T M 0 : I n t e r n a l c l o c k s o u r c e f XI N ) s o u r c e s e l e c t i o n b i t T M 0 : T I M 3 p i n i n p u t H S Y N C p i n i n p u t RW RW RW RW 0 : f ( XI N ) / 1 6 E x t e r n a l c l o c k s o u r c e 0 : T i m e r 3 o v e r f l o w s i g n a l f XI N ) 6 , 7N o t h i n g i s a s s i g n e d . T h e s e b i t s a r e w r i t e d i s a b l e b i t s . W h e n t h e s e b i t s a r e r e a d o u t t h e v a l u e s a r e 0— R b 7b 6b 5b 4b 3b 2b 1b 0 I n t e r r u p t i n p u t p o l a r i t y r e g i s t e r ( R E ) [ A d d r e s s 0 0 F 91 BN a m eF u n c t i o n s A f t e r r e s e t R W I n t e r r u p t I n p u t P o l a r i t y R e g i s t e r 0 , 1 I N T 1 p o l a r i t y s w i t c h b i t R E 0 : P o s i t i v e p o l a r i t y N e g a t i v e p o l a r i t y 0 : P o s i t i v e p o l a r i t y N e g a t i v e p o l a r i t y 0 : P o s i t i v e p o l a r i t y N e g a t i v e p o l a r i t y I N T p o l a r i t y s w i t c h b i t R E I N T p o l a r i t y s w i t c h b i t R E N o t h i n g i s a s s i g n e d . T h e s e b i t s a r e w r i t e d i s a b l e b i t s . W h e n t h e s e b i t s a r e r e a d o u t t h e v a l u e s a r e F i x t h i s b i t t o “ 0 . ” F i x t h i s b i t t o “ 0 . ” N o t h i n g i s a s s i g n e d . T h i s b i t i s a w r i t e d i s a b l e b i t . W h e n t h i s b i t i s r e a d o u t t h e v a l u e i s R W R W R W R W R W

SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER for VOLTAGE SYNTHESIZER with ON-SCREEN DISPLAY CONTROLLER M37212M4/M8–XXXSP, M37212M6–XXXSP/FP M37212EFSP/FP MITSUBISHI MICROCOMPUTERS Rev. 1.0 Address 00FB16 Addresses 00FC16 b 7b 6b 5b 4b 3 b 2b 1b 0 B A f t e r r e s e t RW C P U M o d e R e g i s t e r 0 , 1 3 t o 7 I n d e t e r m i n a t e I n d e t e r m i n a t e N a m eF u n c t i o n s F i x t h e s e b i t s t o “ 1 . ” 1S t a c k p a g e s e l e c t i o n b i t C M ) ( S e e n o t e 0 : 0 p a g e p a g e 1 00 C P U m o d e r e g i s t e r ( C M ) [ A d d r e s s 0 0 F B1 R W RW R W N o t e : T h i s b i t i s s e t t o “ 1 ” a f t e r t h e r e s e t r e l e a s e . 111 F i x t h e s e b i t s t o “ 0 . ” b 7b 6 b 5b 4b 3 b 2b 1b 0 I n t e r r u p t r e q u e s t r e g i s t e r 1 ( I R E Q 1 ) [ A d d r e s s 0 0 F C BN a m e F u n c t i o n s A f t e r r e s e t RW I n t e r r u p t R e q u e s t R e g i s t e r 1 0 0 : N o i n t e r r u p t r e q u e s t i s s u e d I n t e r r u p t r e q u e s t i s s u e d T i m e r 1 i n t e r r u p t r e q u e s t b i t T M R r e q u e s t b i t T M R r e q u e s t b i t T M R 3T i m e r 4 i n t e r r u p t r e q u e s t b i t T M R b i t O S D R 5 VS Y N C i n t e r r u p t r e q u e s t b i t V S C R 6 M u l t i m a s t e r I2C B U S i n t e r f a c e i n t e r r u p t r e q u e s t b i t I I C R 0 : N o i n t e r r u p t r e q u e s t i s s u e d I n t e r r u p t r e q u e s t i s s u e d 0 : N o i n t e r r u p t r e q u e s t i s s u e d I n t e r r u p t r e q u e s t i s s u e d 0 : N o i n t e r r u p t r e q u e s t i s s u e d I n t e r r u p t r e q u e s t i s s u e d 0 : N o i n t e r r u p t r e q u e s t i s s u e d I n t e r r u p t r e q u e s t i s s u e d 0 : N o i n t e r r u p t r e q u e s t i s s u e d I n t e r r u p t r e q u e s t i s s u e d 0 : N o i n t e r r u p t r e q u e s t i s s u e d I n t e r r u p t r e q u e s t i s s u e d 0 ] 0 ] 0 ] 0 ] 0 ] 0 ] 0 ] c a n b e s e t b y s o f t w a r e b u t c a n n o t b e s e t R R R R R R R R I N T 3 e x t e r n a l i n t e r r u p t r e q u e s t b i t I T R 0 : N o i n t e r r u p t r e q u e s t i s s u e d I n t e r r u p t r e q u e s t i s s u e d

SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER for VOLTAGE SYNTHESIZER with ON-SCREEN DISPLAY CONTROLLER M37212M4/M8–XXXSP, M37212M6–XXXSP/FP M37212EFSP/FP MITSUBISHI MICROCOMPUTERS Rev. 1.0 Address 00FD16 Addresses 00FE16 b 7b 6b 5b 4b 3 b 2b 1b 0 I n t e r r u p t r e q u e s t r e g i s t e r 2 ( I R E Q 2 ) [ A d d r e s s 0 0 F D BN a m e F u n c t i o n s A f t e r r e s e t RW I n t e r r u p t R e q u e s t R e g i s t e r 2 r e q u e s t b i t I T R 0 : N o i n t e r r u p t r e q u e s t i s s u e d I n t e r r u p t r e q u e s t i s s u e d r e q u e s t b i t I T R r e q u e s t b i t S R 4 f ( XI N ) / 4 0 9 6 i n t e r r u p t r e q u e s t b i t M S R 5 , 6 7 F i x t h i s b i t t o “ 0 . ” 0 : N o i n t e r r u p t r e q u e s t i s s u e d I n t e r r u p t r e q u e s t i s s u e d 0 : N o i n t e r r u p t r e q u e s t i s s u e d I n t e r r u p t r e q u e s t i s s u e d c a n b e s e t b y s o f t w a r e b u t c a n n o t b e s e t 0 ] 0 ] 0 ] 0 ] 0 : N o i n t e r r u p t r e q u e s t i s s u e d I n t e r r u p t r e q u e s t i s s u e d R R R R R — R W0 N o t h i n g i s a s s i g n e d . T h e s e b i t s a r e w r i t e d i s a b l e b i t s . W h e n t h e s e b i t s a r e r e a d o u t t h e v a l u e s a r e 0R —N o t h i n g i s a s s i g n e d . T h i s b i t i s a w r i t e d i s a b l e b i t . W h e n t h i s b i t i s r e a d o u t t h e v a l u e i s b 7b 6 b 5b 4b 3 b 2b 1b 0 I n t e r r u p t c o n t r o l r e g i s t e r 1 ( I C O N 1 ) [ A d d r e s s 0 0 F E1 BN a m eF u n c t i o n s RW I n t e r r u p t C o n t r o l R e g i s t e r 1 e n a b l e b i t T M E 0 : I n t e r r u p t d i s a b l e d I n t e r r u p t e n a b l e d e n a b l e b i t T M E e n a b l e b i t T M E O S D E 0 : I n t e r r u p t d i s a b l e d I n t e r r u p t e n a b l e d 0 : I n t e r r u p t d i s a b l e d I n t e r r u p t e n a b l e d 0 : I n t e r r u p t d i s a b l e d I n t e r r u p t e n a b l e d RW RW RW RW RW R T i m e r 4 i n t e r r u p t e n a b l e b i t T M E 0 : I n t e r r u p t d i s a b l e d I n t e r r u p t e n a b l e d 5 VS Y N C i n t e r r u p t e n a b l e b i t V S C E 0 : I n t e r r u p t d i s a b l e d I n t e r r u p t e n a b l e d 0 RW 6 0 : I n t e r r u p t d i s a b l e d I n t e r r u p t e n a b l e d 0 RW A f t e r r e s e t I N T 3 e x t e r n a l i n t e r r u p t e n a b l e b i t I T E M u l t i m a s t e r I2C B U S i n t e r f a c e i n t e r r u p t e n a b l e b i t I I C E 0 : I n t e r r u p t d i s a b l e d I n t e r r u p t e n a b l e d W

SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER for VOLTAGE SYNTHESIZER with ON-SCREEN DISPLAY CONTROLLER M37212M4/M8–XXXSP, M37212M6–XXXSP/FP M37212EFSP/FP MITSUBISHI MICROCOMPUTERS Rev. 1.0 Address 00FF16 Addresses 021B16 b 7b 6 b 5b 4b 3 b 2b 1b 0 I n t e r r u p t c o n t r o l r e g i s t e r 2 ( I C O N 2 ) [ A d d r e s s 0 0 F F1 BN a m eF u n c t i o n s I n t e r r u p t C o n t r o l R e g i s t e r 2 e n a b l e b i t I T E 0 : I n t e r r u p t d i s a b l e d I n t e r r u p t e n a b l e d e n a b l e b i t I T E e n a b l e b i t S E 4 f ( XI N ) / 4 0 9 6 i n t e r r u p t e n a b l e b i t M S E 0 : I n t e r r u p t d i s a b l e d I n t e r r u p t e n a b l e d 0 : I n t e r r u p t d i s a b l e d I n t e r r u p t e n a b l e d 0 : I n t e r r u p t d i s a b l e d I n t e r r u p t e n a b l e d F i x t h i s b i t t o “ 0 . ” F i x t h e s e b i t s t o “ 0 . ” 000 N o t h i n g i s a s s i g n e d . T h e s e b i t s a r e w r i t e d i s a b l e b i t s . W h e n t h e s e b i t s a r e r e a d o u t t h e v a l u e s a r e i n d e t e r m i n a t e A f t e r r e s e t i n d e t e r m i n a t e RW RW RW RW RW R R W W R –7 5 , 6 b 7b 6b 5b 4b 3b 2b 1b 0 R O M c o r r e c t i o n e n a b l e r e g i s t e r ( R C R ) [ A d d r e s s 0 2 1 B1 BA f t e r r e s e t R O M C o r r e c t i o n E n a b l e R e g i s t e r 0 : D i s a b l e d E n a b l e d : D i s a b l e d E n a b l e d t o N o t h i n g i s a s s i g n e d . T h e s e b i t s a r e w r i t e d i s a b l e b i t s . W h e n t h e s e b i t s a r e r e a d o u t t h e v a l u e s a r e 2 , 3 F i x t h e s e b i t s t o “ 0 . ” 0 RW RW RW RW

SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER for VOLTAGE SYNTHESIZER with ON-SCREEN DISPLAY CONTROLLER M37212M4/M8–XXXSP, M37212M6–XXXSP/FP M37212EFSP/FP MITSUBISHI MICROCOMPUTERS Rev. 1.0 21. PACKAGE OUTLINE SDIP52-P-600-1.78 Weight(g) JEDEC Code 5.1 Alloy 42/Cu Alloy 52P4B Plastic 52pin 600mil SDIP Symbol Min Nom Max A b c E D L Dimension in Millimeters A1 0.51 – – –3 . 8– 0.4 0.5 0.6 0.9 1.0 1.3 0.65 0.75 1.05 0.22 0.27 0.34 45.65 45.85 46.05 12.85 13.0 13.15 – 1.778 – – 15.24 – 3.0 – – 0° –1 5 ° – – 5.5 e 52 27 261 E ce1 A2A1 bb1 b2e L A SEATING PLANE D QFP80-P-1420-0.80 1.58 Weight(g) JEDEC CodeEIAJ Package Code Lead Material Alloy 42 80P6N-A Plastic 80pin 145 20mm body QFP 0.1 0.2 Symbol Min Nom Max A b c D E H E L y Dimension in Millimeters H D 0.5 ––I2 1.3 ––M D 14.6 ––M E 20.6 10°0° 0.1 1.4 0.80.60.4 23.122.822.5 17.116.816.5 0.8 20.220.019.8 14.214.013.8 0.20.150.13 0.450.350.3 2.8 3.05 e e e E c H E 80 65 H D D M D M E A F b A1 A2 L y Recommended Mount Pad Detail F

SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER for VOLTAGE SYNTHESIZER with ON-SCREEN DISPLAY CONTROLLER M37212M4/M8–XXXSP, M37212M6–XXXSP/FP M37212EFSP/FP MITSUBISHI MICROCOMPUTERS © 1999 MITSUBISHI ELECTRIC CORP. New publication, effective Sep. 1999. Specifications subject to change without notice. Notes regarding these materials

  • 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.
  • 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, programs, algorithms, or circuit application examples contained in these materials.
  • All information contained in these materials, including product data, diagrams, charts, programs and algorithms represents 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. The information described here may contain technical inaccuracies or typographical errors. Mitsubishi Electric Corporation assumes no responsibility for any damage, liability, or other loss rising from these inaccuracies or errors. Please also pay attention to information published by Mitsubishi Electric Corporation by various means, including the Mitsubishi Semiconductor home page (http://www.mitsubishichips.com).
  • When using any or all of the information contained in these materials, including product data, diagrams, charts, programs, and algorithms, please be sure to evaluate all information as a total system before making a final decision on the applicability of the information and products. Mitsubishi Electric Corporation assumes no responsibility for any damage, liability or other loss resulting from the information contained herein.
  • 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.
  • The prior written approval of Mitsubishi Electric Corporation is necessary to reprint or reproduce in whole or in part these materials.
  • 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.
  • Please contact Mitsubishi Electric Corporation or an authorized Mitsubishi Semiconductor product distributor for further details on these materials or the products contained therein. Keep safety first in your circuit designs!
  • 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. HEAD OFFICE: 2-2-3, MARUNOUCHI, CHIYODA-KU, TOKYO 100-8310, JAPAN

SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER for VOLTAGE SYNTHESIZER with ON-SCREEN DISPLAY CONTROLLER M37212M4/M8–XXXSP, M37212M6–XXXSP/FP M37212EFSP/FP MITSUBISHI MICROCOMPUTERS Rev. 1.0 Rev. Rev. No. date

1.0 PDF First Edition 9909

(1/1) Revision Description REVISION HISTORY M37212M4/M8-XXXSP, M37212M6-XXXSP/FP, M37212EFSP/FP (Rev.1.0) DATA SHEET