M34501M2 MITSUBISHI | Alldatasheet
Document overview
- Manufacturer or author: Provided By ALLDATASHEET.COM(FREE DATASHEET DOWNLOAD SITE)
- PDF pages: 113
Technical content
DESCRIPTION
The 4501 Group is a 4-bit single-chip microcomputer designed with CMOS technology. Its CPU is that of the 4500 series using a simple, high-speed instruction set. The computer is equipped with two 8-bit timers (each timer has a reload register), interrupts, and 10-bit A-D converter. The various microcomputers in the 4501 Group include variations of the built-in memory size as shown in the table below.
FEATURES
(at 4.4 MHz oscillation frequency, in high-speed mode) (VRST: detection voltage of voltage drop detection circuit) Product M34501M2-XXXFP M34501M4-XXXFP M34501E4FP ( Note) ROM type Mask ROM Mask ROM One Time PROM Package 20P2N-A 20P2N-A 20P2N-A RAM size (✕ 4 bits) 128 words 256 words 256 words ROM (PROM) size (✕ 10 bits) 2048 words 4096 words 4096 words
4501 Group
SINGLE-CHIP 4-BIT CMOS MICROCOMPUTER MITSUBISHI MICROCOMPUTERS G Timers G Watchdog timer G Clock generating circuit (ceramic resonator/RC oscillation) G LED drive directly enabled (port D) G Power-on reset circuit (Ta = 25 °C) APPLICATION Electrical household appliance, consumer electronic products, of- fice automation equipment, etc. Note: Shipped in blank. PIN CONFIGURATION P12/CNTR P13/INT D 0 D 1 P03 P02 P01 P00 P11 P10 O u t l i n e P N A M M x X X X F P M E F P P 21/ AI N XI N XO U T C N VS S VS S VD D P 20/ AI N R E S E T D 3/ K D 2/ C Pin configuration (top view) (4501 Group)
SINGLE-CHIP 4-BIT CMOS MICROCOMPUTER MITSUBISHI MICROCOMPUTERS BLOCK DIAGRAM Block diagram (4501 Group) R A M R O M M e m o r y I / O p o r t I n t e r n a l p e r i p h e r a l f u n c t i o n s T i m e r T i m e r b i t s S y s t e m c l o c k g e n e r a t i n g c i r c u i t T i m e r b i t s w o r d s b i t s w o r d s b i t s S e r i e s C P U c o r e R e g i s t e r B b i t s R e g i s t e r A b i t s R e g i s t e r D b i t s R e g i s t e r E b i t s S t a c k r e g i s t e r S K l e v e l s I n t e r r u p t s t a c k r e g i s t e r S D P l e v e l A L U b i t s X I N X O U T W a t c h d o g t i m e r b i t s b i t s c h A D c o n v e r t e r P o r t P P o r t P P o r t P P o r t P o w e r o n r e s e t c i r c u i t V o l t a g e d r o p d e t e c t i o n c i r c u i t
SINGLE-CHIP 4-BIT CMOS MICROCOMPUTER MITSUBISHI MICROCOMPUTERS PERFORMANCE OVERVIEW Function 111 0.68 µs (at 4.4 MHz oscillation frequency, in high-speed mode) 2048 words ✕ 10 bits 4096 words ✕ 10 bits 128 words ✕ 4 bits 256 words ✕ 4 bits Four independent I/O ports. Input is examined by skip decision. Ports D 2 and D3 are equipped with a pull-up function and a key-on wakeup function. Both func- tions can be switched by software. Ports D 2 and D3 are also used as ports C and K, respectively. 4-bit I/O port; each pin is equipped with a pull-up function and a key-on wakeup function. Both functions can be switched by software. 4-bit I/O port; each pin is equipped with a pull-up function and a key-on wakeup function. Both functions can be switched by software. Ports P1 2 and P13 are also used as CNTR and INT, respectively. 2-bit I/O port; each pin is equipped with a pull-up function and a key-on wakeup function. Both functions can be switched by software. Ports P2 0 and P21 are also used as AIN0 and AIN1, respectively. 1-bit I/O; Port C is also used as port D2. 1-bit I/O; Port K is also used as port D3. 1-bit I/O; CNTR pin is also used as port P12. 1-bit input; INT pin is also used as port P13. Two independent I/O ports. AIN0–AIN1 is also used as ports P20, P21, respectively. 8-bit programmable timer with a reload register. 8-bit programmable timer with a reload register and has a event counter. 10-bit wide, This is equipped with an 8-bit comparator function. 2 channel (A IN0 pin, AIN1 pin) 4 (one for external, two for timer, one for A-D) 1 level 8 levels CMOS silicon gate 20-pin plastic molded SOP (20P2N-A) –20 °C to 85 °C VRST to 5.5 V (VRST: detected voltage of voltage drop detection circuit. Refer to the voltage drop detection circuit characteristics.) 1.7 mA (at V DD = 5.0 V, 4.0 MHz oscillation frequency, in high-speed mode, output transistors in the cut-off state) 0.1 µA (at room temperature, VDD = 5 V, output transistors in the cut-off state) Parameter Number of basic instructions Minimum instruction execution time Memory sizes Input/Output ports M34501M2 M34501M4/E4 M34501M2 M34501M4/E4 I/O I/O I/O I/O I/O I/O Timer I/O Interrupt input Analog input Timers A-D converter Interrupt Subroutine nesting Device structure Package Operating temperature range Supply voltage Power dissipation (typical value) ROM RAM D 0–D 3 P00–P03 P10–P13 P20, P21 C K CNTR INT A IN0, AIN1 Timer 1 Timer 2 Analog input Sources Nesting Active mode RAM back-up mode
SINGLE-CHIP 4-BIT CMOS MICROCOMPUTER MITSUBISHI MICROCOMPUTERS PIN DESCRIPTION Name Power supply Ground CNV SS Reset input/output System clock input I/O port D I/O I/O port P1 I/O port P2 I/O port C I/O port K Timer input/output Interrupt input Analog input Pin V DD VSS CNV SS RESET XIN D 0–D 3 P00–P03 P10–P13 P20, P21 Port C Port K CNTR INT A IN0–AIN1 Input/Output I/O Input I/O I/O I/O I/O I/O I/O I/O Input Input Function Connected to a plus power supply. Connected to a 0 V power supply. Connect CNV SS to VSS and apply “L” (0V) to CNVSS certainly. An N-channel open-drain I/O pin for a system reset. When the watchdog timer or the voltage drop detection circuit cause the system to be reset, the RESET pin outputs “L” level. I/O pins of the system clock generating circuit. When using a ceramic resonator, connect it between pins X IN and XOUT . A feedback resistor is built-in between them. When using the RC oscillation, connect a resistor and a capacitor to XIN, and leave XOUT pin open. Each pin of port D has an independent 1-bit wide I/O function. Each pin has an out- put latch. For input use, set the latch of the specified bit to “1.” Input is examined by skip decision. The output structure is N-channel open-drain. Ports D2 and D3 are equipped with a pull-up function and a key-on wakeup function. Both functions can be switched by software. Ports D 2 and D3 are also used as ports C and K, respectively. Port P0 serves as a 4-bit I/O port, and it can be used as inputs when the output latch is set to “1.” The output structure is N-channel open-drain. Port P0 has a key-on wakeup function and a pull-up function. Both functions can be switched by software. Port P1 serves as a 4-bit I/O port, and it can be used as inputs when the output latch is set to “1.” The output structure is N-channel open-drain. Port P1 has a key-on wakeup function and a pull-up function. Both functions can be switched by software. Ports P1 2 and P13 are also used as CNTR and INT, respectively. Port P2 serves as a 2-bit I/O port, and it can be used as inputs when the output latch is set to “1.” The output structure is N-channel open-drain. Port P2 has a key-on wakeup function and a pull-up function. Both functions can be switched by software. Ports P2 0 and P21 are also used as AIN0 and AIN1, respectively. 1-bit I/O port. Port C can be used as inputs when the output latch is set to “1.” The output structure is N-channel open-drain. Port C has a key-on wakeup function and a pull-up function. Both functions can be switched by software. Port C is also used as port D 1-bit I/O port. Port K can be used as inputs when the output latch is set to “1.” The output structure is N-channel open-drain. Port K has a key-on wakeup function and a pull-up function. Both functions can be switched by software. Port K is also used as port D CNTR pin has the function to input the clock for the timer 2 event counter, and to out- put the timer 1 or timer 2 underflow signal divided by 2. This pin is also used as port INT pin accepts external interrupts. It has the key-on wakeup function which can be switched by software. This pin is also used as port P13. A-D converter analog input pins. AIN0 and AIN1 are also used as ports P20 and P21, respectively. Notes 1: Pins except above have just single function. 2: The input/output of D2, D3, P12 and P13 can be used even when C, K, INT and CNTR (input) are selected. 3: The input of P12 can be used even when CNTR (output) is selected. 4: The input/output of P20, P21 can be used even when AIN0, AIN1 are selected. Pin D 2 D 3 P12 P13 Multifunction C K CNTR INT MULTIFUNCTION Pin C K CNTR INT Multifunction D D 3 P12 P13 Pin P20 P21 Multifunction AIN0 AIN1 Pin AIN0 AIN1 Multifunction P20 P21 XOUT System clock output Output
SINGLE-CHIP 4-BIT CMOS MICROCOMPUTER MITSUBISHI MICROCOMPUTERS DEFINITION OF CLOCK AND CYCLE G Operation source clock The operation source clock is the source clock to operate this product. In this product, the following clocks are used.
- External ceramic resonator
- External RC oscillation
- Clock (f(X IN)) by the external clock
- Clock (f(RING)) of the ring oscillator which is the internal oscil- lator. G System clock The system clock is the basic clock for controlling this product. The system clock is selected by the bits 2 and 3 of the clock con- trol register MR. Register MR System clock (Note 1) f(X IN) or f(RING) f(XIN)/2 or f(RING)/2 f(XIN)/4 or f(RING)/4 f(XIN)/8 or f(RING)/8 Table Selection of system clock PORT FUNCTION Port Port D Port P0 Port P1 Port P2 I/O unit Control instructions SD, RD SZD, CLD SCP, RCP SNZCP IAK, OKA OP0A IAP0 OP1A IAP1 OP2A IAP2 Control registers PU2, K2 PU0, K0 PU1, K1 W6, I1 PU2, K2 Output structure N-channel open-drain N-channel open-drain N-channel open-drain N-channel open-drain Input Output I/O (4) I/O (4) I/O (4) I/O (2) RemarkPin D 0, D1 D 2/C D 3/K P00–P03 P10, P11 P12/CNTR, P13/INT P20/AIN0 P21/AIN1 Notes 1: The ring oscillator clock is f(RING), the clock by the ce- ramic resonator, RC oscillation or external clock is f(XIN). 2: The default mode is selected after system is released from reset and is returned from RAM back-up. MR 2 MR Operation mode High-speed mode Middle-speed mode Low-speed mode Default mode G Instruction clock The instruction clock is a signal derived by dividing the system clock by 3. The one instruction clock cycle generates the one machine cycle. G Machine cycle The machine cycle is the standard cycle required to execute the instruction. Built-in programmable pull-up functions Key-on wakeup functions (programmable) Built-in programmable pull-up functions Key-on wakeup functions (programmable) Built-in programmable pull-up functions Key-on wakeup functions (programmable) Built-in programmable pull-up functions Key-on wakeup functions (programmable)
SINGLE-CHIP 4-BIT CMOS MICROCOMPUTER MITSUBISHI MICROCOMPUTERS Notes 1: When the ceramic resonator or the RC oscillation is not selected by program, system operates by the ring oscillator (internal oscillator). 2: When the pull-up function is left valid, the supply current is increased. Do not select the pull-up function. 3: When the key-on wakeup function is left valid, the system returns from the RAM back-up state immediately after going into the RAM back-up state. Do not select the key-on wakeup function. 4: When selecting the key-on wakeup function, select also the pull-up function. 5: Clear the bit 3 (I1 3) of register I1 to “0” to disable to input to INT pin (after reset: I13 = “0”) (Note when connecting to VSS and VDD ) G Connect the unused pins to VSS and VDD using the thickest wire at the shortest distance against noise. CONNECTIONS OF UNUSED PINS Connection Connect to VSS . Open. Open. (Output latch is set to “1.”) Open. (Output latch is set to “0.”) Connect to VSS . Open. (Output latch is set to “1.”) Open. (Output latch is set to “0.”) Connect to VSS . Open. (Output latch is set to “1.”) Open. (Output latch is set to “0.”) Connect to VSS . Open. (Output latch is set to “1.”) Open. (Output latch is set to “0.”) Connect to VSS . Open. (Output latch is set to “1.”) Open. (Output latch is set to “0.”) Connect to VSS . Open. (Output latch is set to “1.”) Open. (Output latch is set to “0.”) Connect to VSS . Pin XIN XOUT D 0, D1 D 2/C D 3/K P00–P03 P10, P11 P12/CNTR P13/INT P20/AIN0 P21/AIN1 Usage condition System operates by the ring oscillator. (Note 1) System operates by the external clock. (The ceramic resonator is selected with the CMCK instruction.) System operates by the RC oscillator. (The RC oscillation is selected with the CRCK instruction.) System operates by the ring oscillator. (Note 1) The key-on wakeup function is not selected. (Note 4) The pull-up function and the key-on wakeup function are not selected. (Notes 2, 3) The pull-up function and the key-on wakeup function are not selected. (Notes 2, 3) The key-on wakeup function is not selected. (Note 4) The pull-up function and the key-on wakeup function are not selected. (Notes 2, 3) The pull-up function and the key-on wakeup function are not selected. (Notes 2, 3) The key-on wakeup function is not selected. (Note 4) The pull-up function and the key-on wakeup function are not selected. (Notes 2, 3) The pull-up function and the key-on wakeup function are not selected. (Notes 2, 3) The key-on wakeup function is not selected. The input to INT pin is disabled. (Notes 4, 5) The pull-up function and the key-on wakeup function are not selected. (Notes 2, 3) The pull-up function and the key-on wakeup function are not selected. (Notes 2, 3) The key-on wakeup function is not selected. (Note 4) The pull-up function and the key-on wakeup function are not selected. (Notes 2, 3) The pull-up function and the key-on wakeup function are not selected. (Notes 2, 3)
SINGLE-CHIP 4-BIT CMOS MICROCOMPUTER MITSUBISHI MICROCOMPUTERS PORT BLOCK DIAGRAMS D 0, D 1 S RQ (Note 1) D 2/ CS RQ Skip decision (SZD instruction) (Note 1) PU2 2 S RQ K22 Pull-up transistor N o t e “L” level detection circuit D 3/KS RQ PU2 3 D TQ O K A i n s t r u c t i o n Register A IAK instruction K N o t e SD instruction D e c o d e r Skip decision (SZD instruction)R e g i s t e r Y R D i n s t r u c t i o n CLD instruction Skip decision (SNZCP instruction)SD instruction R D i n s t r u c t i o n C L D i n s t r u c t i o n D e c o d e rR e g i s t e r Y SCP instruction RCP instruction Key-on wakeup Skip decision (SZD instruction) (Note 1) Pull-up transistor “L” level detection circuit SD instruction R D i n s t r u c t i o n C L D i n s t r u c t i o n DecoderRegister Y K e y - o n w a k e u p This symbol represents a parasitic diode on the port. 2: Applied potential to ports D2/C and D3/K must be VDD or less. N o t e s Port block diagram (1)
SINGLE-CHIP 4-BIT CMOS MICROCOMPUTER MITSUBISHI MICROCOMPUTERS Port block diagram (2) I A P i n s t r u c t i o n K0i O P A i n s t r u c t i o n R e g i s t e r A Ai Ai D T Q N o t e PU0 i N o t e N o t e N o t e l e v e l d e t e c t i o n c i r c u i t P 02, P IAP0 instruction K0j O P A i n s t r u c t i o n R e g i s t e r A Aj Aj D T Q N o t e PU0 j P u l l u p t r a n s i s t o r N o t e N o t e (Note 4) K e y o n w a k e u p “L” level detection circuit T h i s s y m b o l r e p r e s e n t s a p a r a s i t i c d i o d e o n t h e p o r t i r e p r e s e n t s o r j r e p r e s e n t s o r A p p l i e d p o t e n t i a l t o p o r t P m u s t b e VD D o r l e s s Notes 1: K e y - o n w a k e u p i n p u t P u l l - u p t r a n s i s t o r P 00, P
SINGLE-CHIP 4-BIT CMOS MICROCOMPUTER MITSUBISHI MICROCOMPUTERS Port block diagram (3) P10, P11 (Note 3) Register A A i Ai D TQ N o t e K1i PU1 i (Note 2)( N o t e D T Q PU1 3 P13/INT (Note 3) K13 K P 12/ C N T R N o t e D TQ K12 PU1 2 W6 0 W W I A P i n s t r u c t i o n O P A i n s t r u c t i o n N o t e “L” level detection circuit T h i s s y m b o l r e p r e s e n t s a p a r a s i t i c d i o d e o n t h e p o r t i r e p r e s e n t s o r A p p l i e d p o t e n t i a l t o p o r t P m u s t b e VD D o r l e s s N o t e s K e y o n w a k e u p i n p u t Pull-up transistor R e g i s t e r A IAP1 instruction OP1A instruction (Note 1) L l e v e l d e t e c t i o n c i r c u i tK e y - o n w a k e u p i n p u t Pull-up transistor Clock input for timer 2 event counter T i m e r o r t i m e r u n d e r f l o w s i g n a l d i v i d e d b y L l e v e l d e t e c t i o n c i r c u i t Key-on wakeup input P u l l - u p t r a n s i s t o r R e g i s t e r A I A P i n s t r u c t i o n O P A i n s t r u c t i o n E x t e r n a l 0 i n t e r r u p tE x t e r n a l i n t e r r u p t c i r c u i t (Note 1)
SINGLE-CHIP 4-BIT CMOS MICROCOMPUTER MITSUBISHI MICROCOMPUTERS Port block diagram (4) D T Q PU2 1 P 21/ AI N K D T Q (Note 3) PU2 0 P 20/ AI N K A n a l o g i n p u t R e g i s t e r A I A P i n s t r u c t i o n O P A i n s t r u c t i o n N o t e L l e v e l d e t e c t i o n c i r c u i tK e y - o n w a k e u p i n p u t Pull-up transistor D e c o d e r R e g i s t e r A I A P i n s t r u c t i o n O P A i n s t r u c t i o n N o t e L l e v e l d e t e c t i o n c i r c u i tK e y o n w a k e u p i n p u t Pull-up transistor N o t e Analog input Decoder T h i s s y m b o l r e p r e s e n t s a p a r a s i t i c d i o d e o n t h e p o r t i r e p r e s e n t s o r A p p l i e d p o t e n t i a l t o p o r t s P a n d P m u s t b e VD D o r l e s s N o t e s Q 1
SINGLE-CHIP 4-BIT CMOS MICROCOMPUTER MITSUBISHI MICROCOMPUTERS External interrupt circuit structure I12 E X F 0 I 11 S N Z I 0 i n s t r u c t i o n P13/INT K 13 I 13 ( N o t e ) Wakeup Skip R i s i n g F a l l i n g O n e - s i d e d e d g e d e t e c t i o n c i r c u i t B o t h e d g e s d e t e c t i o n c i r c u i t E x t e r n a l 0 i n t e r r u p t This symbol represents a parasitic diode on the port.• Timer 1 count start synchronization circuit input
SINGLE-CHIP 4-BIT CMOS MICROCOMPUTER MITSUBISHI MICROCOMPUTERS FUNCTION BLOCK OPERATIONS CPU (1) Arithmetic logic unit (ALU) The arithmetic logic unit ALU performs 4-bit arithmetic such as 4- bit data addition, comparison, AND operation, OR operation, and bit manipulation. (2) Register A and carry flag Register A is a 4-bit register used for arithmetic, transfer, ex- change, and I/O operation. Carry flag CY is a 1-bit flag that is set to “1” when there is a carry with the AMC instruction (Figure 1). It is unchanged with both A n instruction and AM instruction. The value of A 0 is stored in carry flag CY with the RAR instruction (Fig- ure 2). Carry flag CY can be set to “1” with the SC instruction and cleared to “0” with the RC instruction. (3) Registers B and E Register B is a 4-bit register used for temporary storage of 4-bit data, and for 8-bit data transfer together with register A. Register E is an 8-bit register. It can be used for 8-bit data transfer with register B used as the high-order 4 bits and register A as the low-order 4 bits (Figure 3). Register E is undefined after system is released from reset and re- turned from the RAM back-up. Accordingly, set the initial value. (4) Register D Register D is a 3-bit register. It is used to store a 7-bit ROM address together with register A and is used as a pointer within the specified page when the TABP p, BLA p, or BMLA p instruction is executed (Figure 4). Register D is undefined after system is released from reset and re- turned from the RAM back-up. Accordingly, set the initial value. Fig. 1 AMC instruction execution example Fig. 2 RAR instruction execution example Fig. 3 Registers A, B and register E Fig. 4 TABP p instruction execution example ( C Y ) ( M ( D P ) ) (A) Addition ALU < C a r r y > < R e s u l t > A3 A2 A1 A0B3 B2 B1 B0 E7 E6 E5 E4 E3 E2 E1 E0 A3 A2 A1 A0B3 B2 B1 B0 TAB instruction T E A B i n s t r u c t i o n T A B E i n s t r u c t i o n TBA instruction R e g i s t e r BR e g i s t e r A Register B Register A Register E C YA 3 A2 A1 A0 A0 C YA 3 A2 A1 <Rotation> RAR instruction <Set> SC instruction < C l e a r > R C i n s t r u c t i o n S p e c i f y i n g a d d r e s s T A B P p i n s t r u c t i o n p6 p5 p4 p3 p2 p1 p0 PC H DR 2DR 1DR 0 A3 A2 A1 A0 PC L I m m e d i a t e f i e l d v a l u e p T h e c o n t e n t s o f r e g i s t e r D ROM 840 Middle-order 4 bits L o w - o r d e r 4 b i t s R e g i s t e r A ( 4 ) R e g i s t e r B ( 4 ) The contents of register A
SINGLE-CHIP 4-BIT CMOS MICROCOMPUTER MITSUBISHI MICROCOMPUTERS (5) Stack registers (SKS) and stack pointer (SP) Stack registers (SKs) are used to temporarily store the contents of program counter (PC) just before branching until returning to the original routine when;
- branching to an interrupt service routine (referred to as an inter- rupt service routine),
- performing a subroutine call, or
- executing the table reference instruction (TABP p). Stack registers (SKs) are eight identical registers, so that subrou- tines can be nested up to 8 levels. However, one of stack registers is used respectively when using an interrupt service routine and when executing a table reference instruction. Accordingly, be care- ful not to over the stack when performing these operations together. The contents of registers SKs are destroyed when 8 lev- els are exceeded. The register SK nesting level is pointed automatically by 3-bit stack pointer (SP). The contents of the stack pointer (SP) can be transferred to register A with the TASP instruction. Figure 5 shows the stack registers (SKs) structure. Figure 6 shows the example of operation at subroutine call. (6) Interrupt stack register (SDP) Interrupt stack register (SDP) is a 1-stage register. When an inter- rupt occurs, this register (SDP) is used to temporarily store the contents of data pointer, carry flag, skip flag, register A, and regis- ter B just before an interrupt until returning to the original routine. Unlike the stack registers (SKs), this register (SDP) is not used when executing the subroutine call instruction and the table refer- ence instruction. (7) Skip flag Skip flag controls skip decision for the conditional skip instructions and continuous described skip instructions. When an interrupt oc- curs, the contents of skip flag is stored automatically in the interrupt stack register (SDP) and the skip condition is retained. Fig. 5 Stack registers (SKs) structure Fig. 6 Example of operation at subroutine call S K0 S K1 S K2 S K3 S K4 S K5 S K6 SK 7 ( S P ) = 0 ( S P ) = 1 ( S P ) = 2 ( S P ) = 3 ( S P ) = 4 ( S P ) = 5 ( S P ) = 6 (SP) = 7 Program counter (PC) E x e c u t i n g R T i n s t r u c t i o n Executing BM instruction Stack pointer (SP) points “7” at reset or returning from RAM back-up mode. It points “0” by executing the first BM instruction, and the contents of program counter is stored in SK0. When the BM instruction is executed after eight stack registers are used ((SP) = 7), (SP) = 0 and the contents of SK0 is destroyed. Returning to the BM instruction execution address with the RT instruction, and the BM instruction becomes the NOP instruction. (SP) ← 0 (SK0) ← 000116 (PC) ← SUB1 Main program
000216 NOP
6 N O P
000116 BM SUB1
S U B 1 : NOP RT ( P C ) ← ( S K0) S P Note :
SINGLE-CHIP 4-BIT CMOS MICROCOMPUTER MITSUBISHI MICROCOMPUTERS (8) Program counter (PC) Program counter (PC) is used to specify a ROM address (page and address). It determines a sequence in which instructions stored in ROM are read. It is a binary counter that increments the number of instruction bytes each time an instruction is executed. However, the value changes to a specified address when branch instructions, subroutine call instructions, return instructions, or the table refer- ence instruction (TABP p) is executed. Program counter consists of PC H (most significant bit to bit 7) which specifies to a ROM page and PCL (bits 6 to 0) which speci- fies an address within a page. After it reaches the last address (address 127) of a page, it specifies address 0 of the next page (Figure 7). Make sure that the PC H does not specify after the last page of the built-in ROM. (9) Data pointer (DP) Data pointer (DP) is used to specify a RAM address and consists of registers Z, X, and Y . Register Z specifies a RAM file group, reg- ister X specifies a file, and register Y specifies a RAM digit (Figure 8). Register Y is also used to specify the port D bit position. When using port D, set the port D bit position to register Y certainly and execute the SD, RD, or SZD instruction (Figure 9).
- Note Register Z of data pointer is undefined after system is released from reset. Also, registers Z, X and Y are undefined in the RAM back-up. After system is returned from the RAM back-up, set these registers. Fig. 7 Program counter (PC) structure Fig. 8 Data pointer (DP) structure Fig. 9 SD instruction execution example p5 p4 p3 p2 p1 p0 a6 a5 a4 a3 a2 a1 a0 P r o g r a m c o u n t e r P C H S p e c i f y i n g p a g e P C L S p e c i f y i n g a d d r e s s Z1 Z0 X3 X2 X1 X0 Y3 Y2 Y1 Y0 D a t a p o i n t e r ( D P ) Register Z (2) R e g i s t e r X ( 4 ) Register Y (4)S p e c i f y i n g R A M d i g i t S p e c i f y i n g R A M f i l e Specifying RAM file group 0 01 1 Set Specifying bit position Port D output latchRegister Y (4) D 2D 3 D 1 D 0
SINGLE-CHIP 4-BIT CMOS MICROCOMPUTER MITSUBISHI MICROCOMPUTERS PROGRAM MEMOY (ROM) The program memory is a mask ROM. 1 word of ROM is composed of 10 bits. ROM is separated every 128 words by the unit of page (addresses 0 to 127). Table 1 shows the ROM size and pages. Fig- ure 10 shows the ROM map of M34501M4. Table 1 ROM size and pages Product M34501M2 M34501M4 M34501E4 ROM (PROM) size (✕ 10 bits) 2048 words 4096 words 4096 words Pages 16 (0 to 15) 32 (0 to 31) 32 (0 to 31) A part of page 1 (addresses 008016 to 00FF16) is reserved for in- terrupt addresses (Figure 11). When an interrupt occurs, the address (interrupt address) corresponding to each interrupt is set in the program counter, and the instruction at the interrupt address is executed. When using an interrupt service routine, write the in- struction generating the branch to that routine at an interrupt address. Page 2 (addresses 0100 16 to 017F16) is the special page for sub- routine calls. Subroutines written in this page can be called from any page with the 1-word instruction (BM). Subroutines extending from page 2 to another page can also be called with the BM in- struction when it starts on page 2. ROM pattern (bits 7 to 0) of all addresses can be used as data ar- eas with the TABP p instruction. Fig. 10 ROM map of M34501M4/M34501E4 Fig. 11 Page 1 (addresses 008016 to 00FF16) structure 087654321 0 0 0 01 0 0 8 01 0 1 7F1 S u b r o u t i n e s p e c i a l p a g e 0 0 7F1 0 0F 0 1 0 01 0 1 8 01 P a g e 1 P a g e 2 P a g e 0 P a g e 3 P a g e 3 10F F Interrupt address page 90 87654321 External 0 interrupt address008016 008216 Timer 1 interrupt address008416 Timer 2 interrupt address0 0 8 61 008816 0 0 8 A1 00FF16 A-D interrupt address008C 16 008E16
SINGLE-CHIP 4-BIT CMOS MICROCOMPUTER MITSUBISHI MICROCOMPUTERS DATA MEMORY (RAM) 1 word of RAM is composed of 4 bits, but 1-bit manipulation (with the SB j, RB j, and SZB j instructions) is enabled for the entire memory area. A RAM address is specified by a data pointer. The data pointer consists of registers Z, X, and Y. Set a value to the data pointer certainly when executing an instruction to access RAM. Table 2 shows the RAM size. Figure 12 shows the RAM map.
- Note Register Z of data pointer is undefined after system is released from reset. Also, registers Z, X and Y are undefined in the RAM back-up. After system is returned from the RAM back-up, set these registers. Fig. 12 RAM map Table 2 RAM size Product M34501M2 M34501M4 M34501E4 RAM size 128 words ✕ 4 bits (512 bits) 256 words ✕ 4 bits (1024 bits) 256 words ✕ 4 bits (1024 bits) Z = 0 , X = 0 t o 1 5 1 0 1 1 1 2 1 5 0 1 7 Z = 0 , X = 0 t o 7 R e g i s t e r Y R e g i s t e r Z R e g i s t e r X R A M w o r d s b i t s b i t s 2 5 6 w o r d s ( 1 0 2 4 b i t s ) M 3 4 5 0 1 M 4 / E 4 1 2 8 w o r d s ( 5 1 2 b i t s ) M 3 4 5 0 1 M 2
SINGLE-CHIP 4-BIT CMOS MICROCOMPUTER MITSUBISHI MICROCOMPUTERS INTERRUPT FUNCTION The interrupt type is a vectored interrupt branching to an individual address (interrupt address) according to each interrupt source. An interrupt occurs when the following 3 conditions are satisfied.
- An interrupt activated condition is satisfied (request flag = “1”)
- Interrupt enable bit is enabled (“1”)
- Interrupt enable flag is enabled (INTE = “1”) Table 3 shows interrupt sources. (Refer to each interrupt request flag for details of activated conditions.) (1) Interrupt enable flag (INTE) The interrupt enable flag (INTE) controls whether the every inter- rupt enable/disable. Interrupts are enabled when INTE flag is set to “1” with the EI instruction and disabled when INTE flag is cleared to “0” with the DI instruction. When any interrupt occurs, the INTE flag is automatically cleared to “0,” so that other interrupts are disabled until the EI instruction is executed. (2) Interrupt enable bit Use an interrupt enable bit of interrupt control registers V1 and V2 to select the corresponding interrupt or skip instruction. Table 4 shows the interrupt request flag, interrupt enable bit and skip instruction. Table 5 shows the interrupt enable bit function. (3) Interrupt request flag When the activated condition for each interrupt is satisfied, the cor- responding interrupt request flag is set to “1.” Each interrupt request flag is cleared to “0” when either;
- an interrupt occurs, or
- the next instruction is skipped with a skip instruction. Each interrupt request flag is set when the activated condition is satisfied even if the interrupt is disabled by the INTE flag or its in- terrupt enable bit. Once set, the interrupt request flag retains set until a clear condition is satisfied. Accordingly, an interrupt occurs when the interrupt disable state is released while the interrupt request flag is set. If more than one interrupt request flag is set when the interrupt dis- able state is released, the interrupt priority level is as follows shown in Table 3. Table 3 Interrupt sources Activated condition Level change of INT pin Timer 1 underflow Timer 2 underflow Completion of A-D conversion Priority level Interrupt name External 0 interrupt Timer 1 interrupt Timer 2 interrupt A-D interrupt Request flag EXF0 T1F T2F ADF Interrupt name External 0 interrupt Timer 1 interrupt Timer 2 interrupt A-D interrupt Table 5 Interrupt enable bit function Occurrence of interrupt Enabled Disabled Skip instruction Invalid Valid Interrupt enable bit Interrupt address Address 0 in page 1 Address 4 in page 1 Address 6 in page 1 Address C in page 1 Table 4 Interrupt request flag, interrupt enable bit and skip in- struction Skip instruction SNZ0 SNZT1 SNZT2 SNZAD Enable bit V10 V12 V13 V22
SINGLE-CHIP 4-BIT CMOS MICROCOMPUTER MITSUBISHI MICROCOMPUTERS (4) Internal state during an interrupt The internal state of the microcomputer during an interrupt is as fol- lows (Figure 14).
- Program counter (PC) An interrupt address is set in program counter. The address to be executed when returning to the main routine is automatically stored in the stack register (SK).
- Interrupt enable flag (INTE) INTE flag is cleared to “0” so that interrupts are disabled.
- Interrupt request flag Only the request flag for the current interrupt source is cleared to “0.”
- Data pointer, carry flag, skip flag, registers A and B The contents of these registers and flags are stored automatically in the interrupt stack register (SDP). (5) Interrupt processing When an interrupt occurs, a program at an interrupt address is ex- ecuted after branching a data store sequence to stack register. Write the branch instruction to an interrupt service routine at an in- terrupt address. Use the RTI instruction to return from an interrupt service routine. Interrupt enabled by executing the EI instruction is performed after executing 1 instruction (just after the next instruction is executed). Accordingly, when the EI instruction is executed just before the RTI instruction, interrupts are enabled after returning the main routine. (Refer to Figure 13) Fig. 13 Program example of interrupt processing
- Program counter (PC)
- Stack register (SK)
- Interrupt enable flag (INTE)
- Interrupt request flag (only the flag for the current interrupt
- Data pointer, carry flag, registers A and B, skip flag The address of main routine to be executed when returning Fig. 15 Interrupt system diagram Fig. 14 Internal state when interrupt occurs T1F V1 2 EXF0 V10 A d d r e s s 4 i n p a g e A d d r e s s 0 i n p a g e T2F V1 3 Address 6 in page 1 ADF V 22 Timer 1 underflow Timer 2 underflow Completion of A-D conversion Address C in page 1 R e q u e s t f l a g s t a t e r e t a i n e d E n a b l e b i t E n a b l e f l a g INTE Activated condition INT pin ( L→ H o r H → L i n p u t E I R T I I n t e r r u p t s e r v i c e r o u t i n e Interrupt occurs Interrupt is enabled M a i n r o u t i n e : I n t e r r u p t e n a b l e d s t a t e : I n t e r r u p t d i s a b l e d s t a t e
SINGLE-CHIP 4-BIT CMOS MICROCOMPUTER MITSUBISHI MICROCOMPUTERS (6) Interrupt control registers
- Interrupt control register V1 Interrupt enable bits of external 0, timer 1 and timer 2 are as- signed to register V1. Set the contents of this register through register A with the TV1A instruction. The TAV1 instruction can be used to transfer the contents of register V1 to register A.
- Interrupt control register V2 The A-D interrupt enable bit is assigned to register V2. Set the contents of this register through register A with the TV2A instruc- tion. The TAV2 instruction can be used to transfer the contents of register V2 to register A. Table 6 Interrupt control registers V12 V11 V10 V23 V22 V21 V20 Not used A-D interrupt enable bit Not used Not used Interrupt control register V1 Timer 2 interrupt enable bit Timer 1 interrupt enable bit Not used External 0 interrupt enable bit Notes 1: “R ” represents read enabled, and “W ” represents write enabled. 2: These instructions are equivalent to the NOP instrucion. Interrupt disabled (SNZT2 instruction is valid) Interrupt enabled (SNZT2 instruction is invalid) (Note 2) Interrupt disabled (SNZT1 instruction is valid) Interrupt enabled (SNZT1 instruction is invalid) (Note 2) This bit has no function, but read/write is enabled. Interrupt disabled (SNZ0 instruction is valid) Interrupt enabled (SNZ0 instruction is invalid) (Note 2) This bit has no function, but read/write is enabled. Interrupt disabled (SNZAD instruction is valid) Interrupt enabled (SNZAD instruction is invalid) (Note 2) This bit has no function, but read/write is enabled. This bit has no function, but read/write is enabled. R/Wat RAM back-up : 0000 2at reset : 00002 R/Wat RAM back-up : 00002at reset : 00002 Interrupt control register V2 R/Wat RAM back-up : 00002at reset : 00002 (7) Interrupt sequence Interrupts only occur when the respective INTE flag, interrupt en- able bits (V10, V12, V13, V22), and interrupt request flag are “1.” The interrupt actually occurs 2 to 3 machine cycles after the cycle in which all three conditions are satisfied. The interrupt occurs after 3 machine cycles only when the three interrupt conditions are sat- isfied on execution of other than one-cycle instructions (Refer to Figure 16).
SINGLE-CHIP 4-BIT CMOS MICROCOMPUTER MITSUBISHI MICROCOMPUTERS Fig. 16 Interrupt sequence T 1 F T F A D FI N T E X F S y s t e m c l o c k T h e p r o g r a m s t a r t s f r o m t h e i n t e r r u p t a d d r e s s I n t e r r u p t e n a b l e d s t a t e G W h e n a n i n t e r r u p t r e q u e s t f l a g i s s e t a f t e r i t s i n t e r r u p t i s e n a b l e d N o t e m a c h i n e c y c l e E I i n s t r u c t i o n e x e c u t i o n c y c l e I n t e r r u p t e n a b l e f l a g I N T E R e t a i n i n g l e v e l o f s y s t e m c l o c k f o r p e r i o d s o r m o r e i s n e c e s s a r y I n t e r r u p t d i s a b l e d s t a t e E x t e r n a l i n t e r r u p t T i m e r T i m e r a n d A D i n t e r r u p t s I n t e r r u p t a c t i v a t e d c o n d i t i o n i s s a t i s f i e d 2 : T h e a d d r e s s i s s t a c k e d t o t h e l a s t c y c l e 3 : T h i s i n t e r v a l o f c y c l e s d e p e n d s o n t h e e x e c u t e d i n s t r u c t i o n a t t h e t i m e w h e n e a c h i n t e r r u p t a c t i v a t e d c o n d i t i o n i s s a t i s f i e d N o t e s T h e G r o u p o p e r a t e s i n t h e d e f a u l t m o d e a f t e r s y s t e m i s r e l e a s e d f r o m r e s e t sy s t e m c l o c k o p e r a t i o n s o u r c e c l o c k d i v i d e d b y f ( X I d e f a u l t m o d e f ( X I l o w s p e e d m o d e f ( X I h i g h s p e e d m o d e f ( X I m i d d l e s p e e d m o d e F l a g c l e a r e d t o m a c h i n e c y c l e s ( N o t e s
SINGLE-CHIP 4-BIT CMOS MICROCOMPUTER MITSUBISHI MICROCOMPUTERS Table 7 External interrupt activated conditions Name External 0 interrupt Input pin INT Activated condition When the next waveform is input to INT pin
- Both rising and falling waveforms Valid waveform selection bit I11 I12 Fig. 17 External interrupt circuit structure EXTERNAL INTERRUPTS The 4501 Group has the external 0 interrupt. An external interrupt request occurs when a valid waveform is input to an interrupt input pin (edge detection). The external interrupt can be controlled with the interrupt control register I1. (1) External 0 interrupt request flag (EXF0) External 0 interrupt request flag (EXF0) is set to “1” when a valid waveform is input to INT pin. The valid waveforms causing the interrupt must be retained at their level for 4 clock cycles or more of the system clock (Refer to Figure 16). The state of EXF0 flag can be examined with the skip instruction (SNZ0). Use the interrupt control register V1 to select the interrupt or the skip instruction. The EXF0 flag is cleared to “0” when an in- terrupt occurs or when the next instruction is skipped with the skip instruction.
- External 0 interrupt activated condition External 0 interrupt activated condition is satisfied when a valid waveform is input to INT pin. The valid waveform can be selected from rising waveform, falling waveform or both rising and falling waveforms. An example of how to use the external 0 interrupt is as follows. ➀ Set the bit 3 of register I1 to “1” for the INT pin to be in the input enabled state. ➁ Select the valid waveform with the bits 1 and 2 of register I1. ➂ Clear the EXF0 flag to “0” with the SNZ0 instruction. ➃ Set the NOP instruction for the case when a skip is performed with the SNZ0 instruction. ➄ Set both the external 0 interrupt enable bit (V1 0) and the INTE flag to “1.” The external 0 interrupt is now enabled. Now when a valid wave- form is input to the INT pin, the EXF0 flag is set to “1” and the external 0 interrupt occurs. I12 E X F 0 I 11 S N Z I 0 i n s t r u c t i o n P13/INT K 13 I 13 ( N o t e ) Wakeup Skip R i s i n g F a l l i n g O n e - s i d e d e d g e d e t e c t i o n c i r c u i t B o t h e d g e s d e t e c t i o n c i r c u i t E x t e r n a l 0 i n t e r r u p t This symbol represents a parasitic diode on the port.• Timer 1 count start synchronization circuit input
SINGLE-CHIP 4-BIT CMOS MICROCOMPUTER MITSUBISHI MICROCOMPUTERS (2) External interrupt control registers
- Interrupt control register I1 Register I1 controls the valid waveform for the external 0 inter- rupt. Set the contents of this register through register A with the TI1A instruction. The TAI1 instruction can be used to transfer the contents of register I1 to register A. Table 8 External interrupt control register I12 I11 I10 INT pin input control bit (Note 2) Interrupt valid waveform for INT pin/ return level selection bit (Note 2) INT pin edge detection circuit control bit INT pin timer 1 control enable bit Interrupt control register I1 R/Wat RAM back-up : state retainedat reset : 00002 INT pin input disabled INT pin input enabled Falling waveform (“L” level of INT pin is recognized with the SNZI0 instruction)/“L” level Rising waveform (“H ” level of INT pin is recognized with the SNZI0 instruction)/“H ” level One-sided edge detected Both edges detected Disabled Enabled Notes 1: “R ” represents read enabled, and “W ” represents write enabled. 2: When the contents of I12 and I13 are changed, the external interrupt request flag EXF0 may be set. Accordingly, clear EXF0 flag with the SNZ0 in- struction when the bit 0 (V10) of register V1 to “0”. In this time, set the NOP instruction after the SNZ0 instruction, for the case when a skip is performed with the SNZ0 instruction.
SINGLE-CHIP 4-BIT CMOS MICROCOMPUTER MITSUBISHI MICROCOMPUTERS (3) Notes on interrupts ➀ Note [1] on bit 3 of register I1 When the input of the INT pin is controlled with the bit 3 of regis- ter I1 in software, be careful about the following notes.
- Depending on the input state of the P13/INT pin, the external 0 in- terrupt request flag (EXF0) may be set when the bit 3 of register I1 is changed. In order to avoid the occurrence of an unexpected interrupt, clear the bit 0 of register V1 to “0” (refer to Figure 18➀ ) and then, change the bit 3 of register I1. In addition, execute the SNZ0 instruction to clear the EXF0 flag after executing at least one instruction (refer to Figure 18➁ ). Also, set the NOP instruction for the case when a skip is per- formed with the SNZ0 instruction (refer to Figure 18➂ ). LA 4 ; ( ✕✕✕ 0 LA 8 ; (1 ✕✕✕ 2) TI1A ; Control of INT pin input is changed SNZ0 ; The SNZ0 instruction is executed (EXF0 flag cleared) ✕ : these bits are not used here. Fig. 18 External 0 interrupt program example-1 ➁ Note [2] on bit 3 of register I1 When the bit 3 of register I1 is cleared, the RAM back-up mode is selected and the input of INT pin is disabled, be careful about the following notes.
- When the key-on wakeup function of port P1 3 is not used (regis- ter K13 = “0”), clear bits 2 and 3 of register I1 before system enters to the RAM back-up mode. (refer to Figure 19➀ ).
- ••
- •• LA 0 ; (00 ✕✕ 2) DI EPOF POF ; RAM back-up ✕ : these bits are not used here. Fig. 19 External 0 interrupt program example-2
- ••
- •• ➂ Note [3] on bit 2 of register I1 When the interrupt valid waveform of the P13/INT pin is changed with the bit 2 of register I1 in software, be careful about the fol- lowing notes.
- Depending on the input state of the P13/INT pin, the external 0 in- terrupt request flag (EXF0) may be set when the bit 2 of register I1 is changed. In order to avoid the occurrence of an unexpected interrupt, clear the bit 0 of register V1 to “0” (refer to Figure 20➀ ) and then, change the bit 2 of register I1 is changed. In addition, execute the SNZ0 instruction to clear the EXF0 flag after executing at least one instruction (refer to Figure 20➁ ). Also, set the NOP instruction for the case when a skip is per- formed with the SNZ0 instruction (refer to Figure 20➂ ). LA 4 ; ( ✕✕✕ 0 LA 12 TI1A ; Interrupt valid waveform is changed SNZ0 ; The SNZ0 instruction is executed (EXF0 flag cleared) ✕ : these bits are not used here. Fig. 20 External 0 interrupt program example-3
- ••
- ••
SINGLE-CHIP 4-BIT CMOS MICROCOMPUTER MITSUBISHI MICROCOMPUTERS TIMERS The 4501 Group has the following timers.
- Programmable timer The programmable timer has a reload register and enables the frequency dividing ratio to be set. It is decremented from a set- ting value n. When it underflows (count to n + 1), a timer interrupt request flag is set to “1,” new data is loaded from the reload reg- ister, and count continues (auto-reload function).
- Fixed dividing frequency timer The fixed dividing frequency timer has the fixed frequency divid- ing ratio (n). An interrupt request flag is set to “1” after every n count of a count pulse. Fig. 21 Auto-reload function Count source
- Instruction clock
- Prescaler output (ORCLK)
- Timer 1 underflow
- Prescaler output (ORCLK)
- CNTR input
- System clock
- Instruction clock Structure Frequency divider 8-bit programmable binary down counter (link to INT input) 8-bit programmable binary down counter 16-bit fixed dividing frequency binary down counter Circuit Prescaler Timer 1 Timer 2 16-bit timer Use of output signal
- Timer 1 and 2 count sources
- Timer 2 count source
- CNTR output
- Timer 1 interrupt
- CNTR output
- Timer 2 interrupt
- Watchdog timer (The 16th bit is counted twice) Frequency dividing ratio 4, 16 1 to 256 1 to 256 65536 Control register The 4501 Group timer consists of the following circuits.
- Prescaler : frequency divider
- Timer 1 : 8-bit programmable timer
- Timer 2 : 8-bit programmable timer (Timers 1 and 2 have the interrupt function, respectively)
- 16-bit timer Prescaler and timers 1 and 2 can be controlled with the timer con- trol registers W1, W2 and W6. The 16-bit timer is a free counter which is not controlled with the control register. Each function is described below. Table 9 Function related timers F F1 n 0016 n : C o u n t e r i n i t i a l v a l u e Count starts Reload Reload 1st underflow 2nd underflow n + 1 c o u n t n + 1 c o u n t T i m e An interrupt occurs or a skip instruction is executed. T i m e r i n t e r r u p t r e q u e s t f l a g T h e c o n t e n t s o f c o u n t e r “1” “0”
SINGLE-CHIP 4-BIT CMOS MICROCOMPUTER MITSUBISHI MICROCOMPUTERS Fig. 22 Timers structure b i t t i m e r W D T 11 6 I n s t r u c t i o n c l o c k QS Q T D W D F ORCLK XI N W W D i v i s i o n c i r c u i t d i v i d e d b y d i v i d e d b y d i v i d e d b y P 12/ C N T R P12 output0 W6 0 W2 3 (TR1AB) T F T2F (TAB1) W W 21, W W6 1 (T2AB) (TAB2) (TAB1) (TAB2) N o t e N o t e T1AB T1AB MR 3, MR2 W R S I12 I11 P 13/ I N T ( N o t e 1 ) I 10 W 22 T i m e r 1 u n d e r f l o w s i g n a l I13 R Q R S W E F Reset signal D W D T i n s t r u c t i o n W R S T i n s t r u c t i o n N o t e R W D F 1WRST instruction (Note 3) T i m e r 1 ( 8 ) T i m e r 1 i n t e r r u p t Reload register R1 (8) Register BR e g i s t e r A Timer 2 (8) Reload register R2 (8) Register BRegister A Timer 2 interrupt D a t a i s s e t a u t o m a t i c a l l y f r o m e a c h r e l o a d r e g i s t e r w h e n t i m e r o r u n d e r f l o w s a u t o r e l o a d f u n c t i o n Notes 1: Timer 1 count start synchronous circuit is set by the valid edge of P13/INT pin selected by bits 1 (I11) and 2 (I12) of register I1. 2: Count source is stopped by clearing to “0.” 3: When the WRST instruction is executed at WDF1 flag = “1,” WDF1 flag is cleared to “0” and the next instruction is skipped. When the WRST instruction is executed at WDF1 flag = “0,” skip is not executed. 4: When the DWDT and WRST instructions are executed continuously, WEF flag is cleared to “0” and reset by watchdog timer is not executed. Instruction clock Internal clock generating circuit (divided by 3) P r e s c a l e r One-sided edge detection circuit B o t h e d g e s d e t e c t i o n c i r c u i t Falling Rising C l o c k g e n e r a t i o n c i r c u i t S y s t e m c l o c k Timer 1 underflow signal Timer 2 underflow signal Reset signal W a t c h d o g r e s e t s i g n a l
SINGLE-CHIP 4-BIT CMOS MICROCOMPUTER MITSUBISHI MICROCOMPUTERS Table 10 Timer control registers Stop (state initialized) Operating Instruction clock divided by 4 Instruction clock divided by 16 Stop (state retained) Operating Count start synchronous circuit not selected Count start synchronous circuit selected Prescaler control bit Prescaler dividing ratio selection bit Timer 1 control bit Timer 1 count start synchronous circuit control bit Stop (state retained) Operating Count auto-stop circuit not selected Count auto-stop circuit selected Count source Timer 1 underflow signal Prescaler output (ORCLK) CNTR input System clock Timer 2 control bit Timer 1 count auto-stop circuit selection bit (Note 2) Timer 2 count source selection bits W1 2 W1 1 W1 0 W2 3 W2 2 W2 1 W2 0 Timer control register W1 R/Wat RAM back-up : 00002at reset : 00002 R/Wat RAM back-up : 00002at reset : 00002 Timer control register W2 R/Wat RAM back-up : state retainedat reset : 00002 This bit has no function, but read/write is enabled. This bit has no function, but read/write is enabled. Timer 1 underflow signal divided by 2 output Timer 2 underflow signal divided by 2 output 2(I/O)/CNTR input (Note 3) P12 (input)/CNTR input/output (Note 3) Not used Not used CNTR output selection bit 2/CNTR function selection bit Timer control register W6 R/Wat RAM back-up : state retainedat reset : 00002 Notes 1: “R ” represents read enabled, and “W ” represents write enabled. 2: This function is valid only when the timer 1 count start synchronization circuit is selected. 3: CNTR input is valid only when CNTR input is selected as the timer 2 count source. (1) Timer control registers
- Timer control register W1 Register W1 controls the count operation of timer 1, the selection of count start synchronous circuit, and the frequency dividing ra- tio and count operation of prescaler. Set the contents of this register through register A with the TW1A instruction. The TAW1 instruction can be used to transfer the contents of register W1 to register A.
- Timer control register W2 Register W2 controls the selection of timer 1 count auto-stop cir- cuit, and the count operation and count source of timer 2. Set the contents of this register through register A with the TW2A instruc- tion. The TAW2 instruction can be used to transfer the contents of register W2 to register A.
- Timer control register W6 Register W6 controls the P1 2/CNTR pin function and the selec- tion of CNTR output. Set the contents of this register through register A with the TW6A instruction. The TAW6 instruction can be used to transfer the contents of register W6 to register A.. (2) Prescaler Prescaler is a frequency divider. Its frequency dividing ratio can be selected. The count source of prescaler is the instruction clock. Use the bit 2 of register W1 to select the prescaler dividing ratio and the bit 3 to start and stop its operation. Prescaler is initialized, and the output signal (ORCLK) stops when the bit 3 of register W1 is cleared to “0.” W6 3 W6 2 W6 1 W6 0
SINGLE-CHIP 4-BIT CMOS MICROCOMPUTER MITSUBISHI MICROCOMPUTERS (5) Timer interrupt request flags (T1F, T2F) Each timer interrupt request flag is set to “1” when each timer underflows. The state of these flags can be examined with the skip instructions (SNZT1, SNZT2). Use the interrupt control register V1 to select an interrupt or a skip instruction. An interrupt request flag is cleared to “0” when an interrupt occurs or when the next instruction is skipped with a skip instruction. (6) Count start synchronization circuit (timer 1) Timer 1 has the count start synchronous circuit which synchronizes the input of INT pin, and can start the timer count operation. Timer 1 count start synchronous circuit function is selected by set- ting the bit 0 of register W1 to “1.” The control by INT pin input can be performed by setting the bit 0 of register I1 to “1.” The count start synchronous circuit is set by level change (“H ”→ “L” or “L”→ “H ”) of INT pin input. This valid waveform is selected by bits 1 (I1 1) and 2 (I12) of register I1 as follows;
- I11 = “0”: Synchronized with one-sided edge (falling or rising)
- I11 = “1”: Synchronized with both edges (both falling and rising) When register I11=“0” (synchronized with the one-sided edge), the ris- ing or falling waveform can be selected by the bit 2 of register I1;
- I1 2 = “0”: Falling waveform
- I12 = “1”: Rising waveform When timer 1 count start synchronous circuit is used, the count start synchronous circuit is set, the count source is input to each timer by inputting valid waveform to INT pin. Once set, the count start synchronous circuit is cleared by clearing the bit I1 0 to “0” or reset. However, when the count auto-stop circuit is selected (register W22 = “1”), the count start synchronous circuit is cleared (auto-stop) at the timer 1 underflow. (7) Count auto-stop circuit (timer 1) Timer 1 has the count auto-stop circuit which is used to stop timer 1 automatically by the timer 1 underflow when the count start syn- chronous circuit is used. The count auto-stop cicuit is valid by setting the bit 2 of register W2 to “1”. It is cleared by the timer 1 underflow and the count source to timer 1 is stopped. This function is valid only when the timer 1 count start synchronous circuit is selected. (3) Timer 1 (interrupt function) Timer 1 is an 8-bit binary down counter with the timer 1 reload reg- ister (R1). Data can be set simultaneously in timer 1 and the reload register (R1) with the T1AB instruction. Stop counting and then ex- ecute the T1AB instruction to set data to timer 1. Data can be written to reload register (R1) with the TR1AB instruction. When writing data to reload register R1 with the TR1AB instruction, the downcount after the underflow is started from the setting value of reload register R1. Timer 1 starts counting after the following process; ➀ set data in timer 1, and ➁ set the bit 1 of register W1 to “1.” However, INT pin input can be used as the start trigger for timer 1 count operation by setting the bit 0 of register W1 to “1.” Also, in this time, the auto-stop function by timer 1 underflow can be performed by setting the bit 2 of register W2 to “1.” When a value set is n, timer 1 divides the count source signal by n Once count is started, when timer 1 underflows (the next count pulse is input after the contents of timer 1 becomes “0”), the timer 1 interrupt request flag (T1F) is set to “1,” new data is loaded from reload register R1, and count continues (auto-reload function). Data can be read from timer 1 with the TAB1 instruction. When reading the data, stop the counter and then execute the TAB1 in- struction. (4) Timer 2 (interrupt function) Timer 2 is an 8-bit binary down counter with the timer 2 reload reg- ister (R2). Data can be set simultaneously in timer 2 and the reload register (R2) with the T2AB instruction. Stop counting and then ex- ecute the T2AB instruction to set data to timer 2. Timer 2 starts counting after the following process; ➀ set data in timer 2, ➁ select the count source with the bits 0 and 1 of register W2, and ➂ set the bit 3 of register W2 to “1.” When a value set is n, timer 2 divides the count source signal by n Once count is started, when timer 2 underflows (the next count pulse is input after the contents of timer 2 becomes “0”), the timer 2 interrupt request flag (T2F) is set to “1,” new data is loaded from reload register R2, and count continues (auto-reload function). Data can be read from timer 2 with the TAB2 instruction. When reading the data, stop the counter and then execute the TAB2 in- struction.
SINGLE-CHIP 4-BIT CMOS MICROCOMPUTER MITSUBISHI MICROCOMPUTERS (8) Timer input/output pin (P12/CNTR pin) CNTR pin is used to input the timer 2 count source and output the timer 1 and timer 2 underflow signal divided by 2. The P12/CNTR pin function can be selected by bit 0 of register W6. The CNTR output signal can be selected by bit 1 of register W6. When the CNTR input is selected for timer 2 count source, timer 2 counts the falling waveform of CNTR input. Fig. 23 Count timing diagram at CNTR input (9) Precautions Note the following for the use of timers.
- Prescaler Stop the prescaler operation to change its frequency dividing ra- tio.
- Count source Stop timer 1 or 2 counting to change its count source.
- Reading the count value Stop timer 1 or 2 counting and then execute the TAB1 or TAB2 instruction to read its data.
- Writing to the timer Stop timer 1 or 2 counting and then execute the T1AB or T2AB instruction to write its data.
- Writing to reload register R1 When writing data to reload register R1 while timer 1 is operat- ing, avoid a timing when timer 1 underflows. 0316 0216 0116 0016 FF16 FE 16 CNTR input Timer 2 count Timer 2 interrupt request flag (T2F) (Note) Note: This is an example when “FF 16” is set to timer 2 reload register R2L.
SINGLE-CHIP 4-BIT CMOS MICROCOMPUTER MITSUBISHI MICROCOMPUTERS WATCHDOG TIMER Watchdog timer provides a method to reset the system when a pro- gram run-away occurs. Watchdog timer consists of timer WDT(16-bit binary counter), watchdog timer enable flag (WEF), and watchdog timer flags (WDF1, WDF2). The timer WDT downcounts the instruction clocks as the count source from “FFFF 16” after system is released from reset. After the count is started, when the timer WDT underflow occurs (after the count value of timer WDT reaches “FFFF 16,” the next count pulse is input), the WDF1 flag is set to “1.” If the WRST instruction is never executed until the timer WDT un- derflow occurs (until timer WDT counts 65534), WDF2 flag is set to “1,” and the RESET pin outputs “L” level to reset the microcom- puter. Execute the WRST instruction at each period of 65534 machine cycle or less by software when using watchdog timer to keep the microcomputer operating normally. When the WEF flag is set to “1” after system is released from reset, the watchdog timer function is valid. When the DWDT instruction and the WRST instruction are ex- ecuted continuously, the WEF flag is cleared to “0” and the watchdog timer function is invalid. However, in order to set the WEF flag to “1” again once it has cleared to “0”, execute system reset. The WRST instruction has the skip function. When the WRST in- struction is executed while the WDF1 flag is “1”, the WDF1 flag is cleared to “0” and the next instruction is skipped. When the WRST instruction is executed while the WDF1 flag is “0”, the next instruction is not skipped. The skip function of the WRST instruction can be used even when the watchdog timer function is invalid. Fig. 24 Watchdog timer function c o u n t N o t e V a l u e o f b i t t i m e r W D T W D F f l a g W R S T i n s t r u c t i o n e x e c u t e d s k i p e x e c u t e d R E S E T p i n o u t p u t WDF2 flag ➄ System reset➀ Reset released A f t e r s y s t e m i s r e l e a s e d f r o m r e s e t a f t e r p r o g r a m i s s t a r t e d t i m e r W D T s t a r t s c o u n t d o w n W h e n t i m e r W D T u n d e r f l o w o c c u r s W D F f l a g i s s e t t o W h e n t h e W R S T i n s t r u c t i o n i s e x e c u t e d W D F f l a g i s c l e a r e d t o t h e n e x t i n s t r u c t i o n i s s k i p p e d W h e n t i m e r W D T u n d e r f l o w o c c u r s w h i l e W D F f l a g i s W D F f l a g i s s e t t o a n d t h e w a t c h d o g r e s e t s i g n a l i s o u t p u t T h e o u t p u t t r a n s i s t o r o f R E S E T p i n i s t u r n e d O N b y t h e w a t c h d o g r e s e t s i g n a l a n d s y s t e m r e s e t i s e x e c u t e d N o t e T h e n u m b e r o f c o u n t i s e q u a l t o t h e n u m b e r o f c y c l e b e c a u s e t h e c o u n t s o u r c e o f w a t c h d o g t i m e r i s t h e i n s t r u c t i o n c l o c k F F F 000016 ➁ ➁
SINGLE-CHIP 4-BIT CMOS MICROCOMPUTER MITSUBISHI MICROCOMPUTERS Fig. 25 Program example to start/stop watchdog timer Fig. 26 Program example to enter the RAM back-up mode when using the watchdog timer WRST ; WDF1 flag cleared DWDT ; W atchdog timer function enabled/disabled WRST ; WEF and WDF1 flags cleared
- ••
- •• WRST ; WDF1 flag cleared NOP DI ; Interrupt disabled EPOF ; POF instruction enabled POF Oscillation stop (RAM back-up mode)
- ••
- •• When the watchdog timer is used, clear the WDF1 flag at the pe- riod of 65534 machine cycles or less with the WRST instruction. When the watchdog timer is not used, execute the DWDT instruc- tion and the WRST instruction continuously (refer to Figure 25). The watchdog timer is not stopped with only the DWDT instruction. The contents of WDF1 flag and timer WDT are initialized at the RAM back-up mode. When using the watchdog timer and the RAM back-up mode, ini- tialize the WDF1 flag with the WRST instruction just before the microcomputer enters the RAM back-up state (refer to Figure 26) The watchdog timer function is valid after system is returned from the RAM back-up. When not using the watchdog timer function, ex- ecute the DWDT instruction and the WRST instruction continuously every system is returned from the RAM back-up, and stop the watchdog timer function.
- ••
SINGLE-CHIP 4-BIT CMOS MICROCOMPUTER MITSUBISHI MICROCOMPUTERS A-D CONVERTER The 4501 Group has a built-in A-D conversion circuit that performs conversion by 10-bit successive comparison method. Table 11 shows the characteristics of this A-D converter. This A-D converter can also be used as an 8-bit comparator to compare analog volt- ages input from the analog input pin with preset values. Table 11 A-D converter characteristics Characteristics Successive comparison method 10 bits Linearity error: ±2LSB Non-linearity error: ±0.9LSB 46.5 µs (High-speed mode at 4.0 MHz oscillation frequency) Parameter Conversion format Resolution Relative accuracy Conversion speed Analog input pin Fig. 27 A-D conversion circuit structure VS S VD D DAC DA converter TABAD Q 13 Q 11 Q1 0Q 12 TADAB 8 8 01 1 Q 13 Q 13 Q1 3 N o t e TALAQ1 3 TAQ1 T Q 1 A ADF (1) P 20/ AI N P 21/ AI N I A P 2 P 20, P 21) O P 2 A P 20, P 21) Register A (4) Register B (4) D A C o p e r a t i o n s i g n a l C o m p a r a t o r 2- c h a n n el m u l t i - p l e x e d an a l o g s w i t c h Instruction clock A-D control circuit S u c c e s s i v e c o m p a r i s o n r e g i s t e r A D A - D i n t e r r u p t C o m p a r a t o r r e g i s t e r ( 8 ) N o t e s 1 : T h i s s w i t c h i s t u r n e d O N o n l y w h e n A - D c o n v e r t e r i s o p e r a t i n g a n d g e n e r a t e s t h e c o m p a r i s o n v o l t a g e . W r i t i n g r e a d i n g d a t a t o t h e c o m p a r a t o r r e g i s t e r i s p o s s i b l e o n l y i n t h e c o m p a r a t o r m o d e Q 13= T h e v a l u e o f t h e c o m p a r a t o r r e g i s t e r i s r e t a i n e d e v e n w h e n t h e m o d e i s s w i t c h e d t o t h e A D c o n v e r s i o n m o d e Q 13= b e c a u s e i t i s s e p a r a t e d f r o m t h e s u c c e s s i v e c o m p a r i s o n r e g i s t e r A D A l s o t h e r e s o l u t i o n i n t h e c o m p a r a t o r m o d e i s b i t s b e c a u s e t h e c o m p a r a t o r r e g i s t e r c o n s i s t s o f b i t s N o t e
SINGLE-CHIP 4-BIT CMOS MICROCOMPUTER MITSUBISHI MICROCOMPUTERS Q1 3 Q1 2 A-D control register Q1 A-D operation mode selection bit Not used Analog input pin selection bits at reset : 00002 at RAM back-up : state retained Q1 1 A-D conversion mode Comparator mode This bit has no function, but read/write is enabled. Selected pins A IN0 AIN1 Not available Not available Note: “R ” represents read enabled, and “W ” represents write enabled. Q1 0 (1) Operating at A-D conversion mode The A-D conversion mode is set by setting the bit 3 of register Q1 to “0.” (2) Successive comparison register AD Register AD stores the A-D conversion result of an analog input in 10-bit digital data format. The contents of the high-order 8 bits of this register can be stored in register B and register A with the TABAD instruction. The contents of the low-order 2 bits of this reg- ister can be stored into the high-order 2 bits of register A with the TALA instruction. However, do not execute these instructions dur- ing A-D conversion. When the contents of register AD is n, the logic value of the com- parison voltage V ref generated from the built-in DA converter can be obtained with the reference voltage VDD by the following for- mula: Logic value of comparison voltage Vref Vref = ✕ n n: The value of register AD (n = 0 to 1023) V DD 1024 R/W Table 12 A-D control registers (3) A-D conversion completion flag (ADF) A-D conversion completion flag (ADF) is set to “1” when A-D con- version completes. The state of ADF flag can be examined with the skip instruction (SNZAD). Use the interrupt control register V2 to select the interrupt or the skip instruction. The ADF flag is cleared to “0” when the interrupt occurs or when the next instruction is skipped with the skip instruction. (4) A-D conversion start instruction (ADST) A-D conversion starts when the ADST instruction is executed. The conversion result is automatically stored in the register AD. (5) A-D control register Q1 Register Q1 is used to select the operation mode and one of ana- log input pins. Q1 1 Q1 0 (6) Operation description A-D conversion is started with the A-D conversion start instruction (ADST). The internal operation during A-D conversion is as follows: ➀ When the A-D conversion starts, the register AD is cleared to “000 16.” ➁ Next, the topmost bit of the register AD is set to “1,” and the comparison voltage Vref is compared with the analog input volt- age VIN. ➂ When the comparison result is Vref < VIN, the topmost bit of the register AD remains set to “1.” When the comparison result is Vref > VIN, it is cleared to “0.” The 4501 Group repeats this operation to the lowermost bit of the register AD to convert an analog value to a digital value. A-D con- version stops after 62 machine cycles (46.5 µs when f(XIN) = 4.0 MHz in high-speed mode) from the start, and the conversion result is stored in the register AD. An A-D interrupt activated condition is satisfied and the ADF flag is set to “1” as soon as A-D conversion completes (Figure 28).
SINGLE-CHIP 4-BIT CMOS MICROCOMPUTER MITSUBISHI MICROCOMPUTERS Table 13 Change of successive comparison register AD during A-D conversion Comparison voltage (Vref) valueChange of successive comparison register ADAt starting conversion ✼ 1: 1st comparison result ✼ 3: 3rd comparison result ✼ 9: 9th comparison result ✼ 2: 2nd comparison result ✼ 8: 8th comparison result ✼ A: 10th comparison result 1st comparison 2nd comparison 3rd comparison After 10th comparison completes ✼ 1 ✼ 1 ✼ 1 ----- ----- ----- ----- ✼ 2 ✼ 2 ✼ 3 ✼ 8 ✼ 9 ✼ A A-D conversion result V DD VDD VDD VDD VDD VDD VDD VDD 1024 ○ ○○○ Fig. 29 Setting registers A-D control register Q1 A IN1 pin selected A-D conversion mode 0001 (Bit 3) (Bit 0) (7) A-D conversion timing chart Figure 28 shows the A-D conversion timing chart. Fig. 28 A-D conversion timing chart (8) How to use A-D conversion How to use A-D conversion is explained using as example in which the analog input from P21/AIN1 pin is A-D converted, and the high- order 4 bits of the converted data are stored in address M(Z, X, Y) = (0, 0, 0), the middle-order 4 bits in address M(Z, X, Y) = (0, 0, 1), and the low-order 2 bits in address M(Z, X, Y) = (0, 0, 2) of RAM. The A-D interrupt is not used in this example. ➀ Select the A IN1 pin function and A-D conversion mode with the register Q1 (refer to Figure 29). ➁ Execute the ADST instruction and start A-D conversion. ➂ Examine the state of ADF flag with the SNZAD instruction to de- termine the end of A-D conversion. ➃ Transfer the low-order 2 bits of converted data to the high-order 2 bits of register A (TALA instruction). ➄ Transfer the contents of register A to M (Z, X, Y) = (0, 0, 2). ➅ Transfer the high-order 8 bits of converted data to registers A and B (TABAD instruction). ➆ Transfer the contents of register A to M (Z, X, Y) = (0, 0, 1). ➇ Transfer the contents of register B to register A, and then, store into M(Z, X, Y) = (0, 0, 0). A D S T i n s t r u c t i o n A - D c o n v e r s i o n c o m p l e t i o n f l a g A D F 6 2 m a c h i n e c y c l e s D A C o p e r a t i o n s i g n a l
SINGLE-CHIP 4-BIT CMOS MICROCOMPUTER MITSUBISHI MICROCOMPUTERS (9) Operation at comparator mode The A-D converter is set to comparator mode by setting bit 3 of the register Q1 to “1.” Below, the operation at comparator mode is described. (10) Comparator register In comparator mode, the built-in DA comparator is connected to the 8-bit comparator register as a register for setting comparison volt- ages. The contents of register B is stored in the high-order 4 bits of the comparator register and the contents of register A is stored in the low-order 4 bits of the comparator register with the TADAB in- struction. When changing from A-D conversion mode to comparator mode, the result of A-D conversion (register AD) is undefined. However, because the comparator register is separated from regis- ter AD, the value is retained even when changing from comparator mode to A-D conversion mode. Note that the comparator register can be written and read at only comparator mode. If the value in the comparator register is n, the logic value of com- parison voltage V ref generated by the built-in DA converter can be determined from the following formula: (11) Comparison result store flag (ADF) In comparator mode, the ADF flag, which shows completion of A-D conversion, stores the results of comparing the analog input volt- age with the comparison voltage. When the analog input voltage is lower than the comparison voltage, the ADF flag is set to “1.” The state of ADF flag can be examined with the skip instruction (SNZAD). Use the interrupt control register V2 to select the inter- rupt or the skip instruction. The ADF flag is cleared to “0” when the interrupt occurs or when the next instruction is skipped with the skip instruction. (12) Comparator operation start instruction (ADST instruction) In comparator mode, executing ADST starts the comparator oper- ating. The comparator stops 8 machine cycles after it has started (6 µs at f(XIN) = 4.0 MHz in high-speed mode). When the analog input volt- age is lower than the comparison voltage, the ADF flag is set to “1.” (13) Notes for the use of A-D conversion 1 Note the following when using the analog input pins also for port P2 function:
- Selection of analog input pins Even when P20/AIN0, P21/AIN1 are set to pins for analog input, they continue to function as port P2 input/output. Accordingly, when any of them are used as I/O port and others are used as analog input pins, make sure to set the outputs of pins that are set for analog input to “1.” Also, the port input function of the pin functions as an analog input is undefined.
- TALA instruction When the TALA instruction is executed, the low-order 2 bits of register AD is transferred to the high-order 2 bits of register A, si- multaneously, the low-order 2 bits of register A is “0.” (14) Notes for the use of A-D conversion 2 Do not change the operating mode (both A-D conversion mode and comparator mode) of A-D converter with the bit 3 of register Q1 while the A-D converter is operating. When the operating mode of A-D converter is changed from the comparator mode to A-D conversion mode with the bit 3 of register Q1, note the following;
- Clear the bit 2 of register V2 to “0” to change the operating mode of the A-D converter from the comparator mode to A-D conver- sion mode with the bit 3 of register Q1.
- The A-D conversion completion flag (ADF) may be set when the operating mode of the A-D converter is changed from the com- parator mode to the A-D conversion mode. Accordingly, set a value to the bit 3 of register Q1, and execute the SNZAD instruc- tion to clear the ADF flag. Logic value of comparison voltage Vref Vref = ✕ n n: The value of register AD (n = 0 to 255) Fig. 30 Comparator operation timing chart VDD 256 A D S T i n s t r u c t i o n C o m p a r i s o n r e s u l t s t o r e f l a g A D F 8 m a c h i n e c y c l e s D A C o p e r a t i o n s i g n a l Comparator operation completed. (The value of ADF is determined)
SINGLE-CHIP 4-BIT CMOS MICROCOMPUTER MITSUBISHI MICROCOMPUTERS (15) Definition of A-D converter accuracy The A-D conversion accuracy is defined below (refer to Figure 31).
- Relative accuracy ➀ Zero transition voltage (V0T) This means an analog input voltage when the actual A-D con- version output data changes from “0” to “1.” ➁ Full-scale transition voltage (V FST ) This means an analog input voltage when the actual A-D con- version output data changes from “1023” to ”1022.” ➂ Linearity error This means a deviation from the line between V0T and VFST of a converted value between V0T and VFST . ➃ Differential non-linearity error This means a deviation from the input potential difference re- quired to change a converter value between V0T and VFST by 1 LSB at the relative accuracy.
- Absolute accuracy This means a deviation from the ideal characteristics between 0 to VDD of actual A-D conversion characteristics. Fig. 31 Definition of A-D conversion accuracy VFST –V0T 1022 VDD 1024 Vn: Analog input voltage when the output data changes from “n” to
- 1LSB at relative accuracy → (V)
- 1LSB at absolute accuracy → (V) VDDV1022VnV1V0 Vn n n 1022 1023 b a c Output data Differential non-linearity error = Linearity error = [LSB] c a b–a a [ L S B ] Actual A-D conversion characteristics a : 1 L S B b y r e l a t i v e a c c u r a c y b Vn Vn c D i f f e r e n c e b e t w e e n i d e a l Vn a n d a c t u a l Vn Zero transition voltage (V0T) A n a l o g v o l t a g e Full-scale transition voltage (VFST ) I d e a l l i n e o f A - D c o n v e r s i o n b e t w e e n V0–
SINGLE-CHIP 4-BIT CMOS MICROCOMPUTER MITSUBISHI MICROCOMPUTERS RESET FUNCTION System reset is performed by applying “L” level to RESET pin for 1 machine cycle or more when the following condition is satisfied; the value of supply voltage is the minimum value or more of the recommended operating conditions. Then when “H ” level is applied to RESET pin, software starts from address 0 in page 0. Fig. 32 Reset release timing Fig. 33 RESET pin input waveform and reset operation f XI N ) R E S E T Program starts (address 0 in page 0) R i n g o s c i l l a t o r i n t e r n a l o s c i l l a t o r i s c o u n t e d t i m e s RESET VD D 0.85VDD (Note) Note: Keep the value of supply voltage to the minimum value or more of the recommended operating conditions. R e s e t i n p u t m a c h i n e c y c l e o r m o r e P r o g r a m s t a r t s a d d r e s s i n p a g e Ring oscillator (internal oscillator) is counted 5359 times.
SINGLE-CHIP 4-BIT CMOS MICROCOMPUTER MITSUBISHI MICROCOMPUTERS Fig. 34 Power-on reset circuit example Name D 0, D1 D 2/C, D3/K P00, P01, P02, P03 P10, P11, P12/CNTR, P13/INT P20/AIN0, P21/AIN1 Notes 1: Output latch is set to “1.” 2: Pull-up transistor is turned OFF. Function D 0, D1 D 2, D3 P00–P03 P10–P13 P20, P21 State High-impedance (Note 1) High-impedance (Notes 1, 2) High-impedance (Notes 1, 2) High-impedance (Notes 1, 2) High-impedance (Notes 1, 2) (1) Power-on reset Reset can be automatically performed at power on (power-on re- set) by the built-in power-on reset circuit. When the built-in power-on reset circuit is used, the time for the supply voltage to rise from 0 V to 2.0 V must be set to 100 µs or less. If the rising time exceeds 100 µs, connect a capacitor between the RESET pin and V SS at the shortest distance, and input “L” level to RESET pin until the value of supply voltage reaches the minimum operating voltage. Table 14 Port state at reset R E S E T p i n WEF W a t c h d o g r e s e t s i g n a l N o t e P u l l u p t r a n s i s t o r N o t e P o w e r o n r e s e t c i r c u i t V o l g a t e d r o p d e t e c t i o n c i r c u i t VD D N o t e µs o r l e s s N o t e I n t e r n a l r e s e t s i g n a l P o w e r o n Reset released I n t e r n a l r e s e t s i g n a l R e s e t s t a t e N o t e s T h i s s y m b o l r e p r e s e n t s a p a r a s i t i c d i o d e A p p l i e d p o t e n t i a l t o R E S E T p i n m u s t b e VD D o r l e s s K e e p t h e v a l u e o f s u p p l y v o l t a g e t o t h e m i n i m u m v a l u e o r m o r e o f t h e r e c o m m e n d e d o p e r a t i n g c o n d i t i o n s Power-on reset circuit output
SINGLE-CHIP 4-BIT CMOS MICROCOMPUTER MITSUBISHI MICROCOMPUTERS Address 0 in page 0 is set to program counter. “✕ ” represents undefined. Fig. 35 Internal state at reset (2) Internal state at reset Figure 35 shows internal state at reset (they are the same after sys- tem is released from reset). The contents of timers, registers, flags and RAM except shown in Figure 35 are undefined, so set the ini- tial value to them. 00000000000000 0 (Interrupt disabled) 0 0 0 0 (Interrupt disabled) 0 0 0 0 (Interrupt disabled) 0000 0 0 0 0 (Prescaler and timer 1 stopped) 0 0 0 0 (Timer 2 stopped) 0000 1100 0000 0000 0000 0000 0000 0000 0000 0000 0000 ✕✕✕ 0000 0000 111
SINGLE-CHIP 4-BIT CMOS MICROCOMPUTER MITSUBISHI MICROCOMPUTERS VOLTAGE DROP DETECTION CIRCUIT The built-in voltage drop detection circuit is designed to detect a drop in voltage and to reset the microcomputer if the supply voltage drops below a set value. Fig. 36 Voltage drop detection reset circuit Fig. 37 Voltage drop detection circuit operation waveform V R S T VD D Q S R Reset signal R e t u r n i n p u t EPOF instruction +POF2 instruction (continuousu execution) (Note 2) V o l t a g e d r o p d e t e c t i o n c i r c u i t r e s e t s i g n a l (Note 1) Voltage drop detection circuit Notes 1: In the RAM back-up mode by the POF2 instruction, the voltage drop detection circuit stops. 2: When the VDD (supply voltage) is VRST (detection voltage) or less, the voltage drop detection circuit reset signal is output. VDD The microcomputer starts operation after the ring oscillator (internal oscillator) is counted 5359 times. VRST (detection voltage) V o l t a g e d r o p d e t e c t i o n c i r c u i t r e s e t s i g n a l R E S E T p i n N o t e s A f t e r s y s t e m i s r e l e a s e d f r o m r e s e t t h e r i n g o s c i l l a t o r i n t e r n a l o s c i l l a t o r i s s e l e c t e d a s t h e o p e r a t i o n c l o c k o f t h e m i c r o c o m p u t e r R e f e r t o t h e v o l t a g e d r o p d e t e c t i o n c i r c u i t i n t h e e l e c t r i c a l c h a r a c t e r i s t i c s f o r t h e r a t i n g v a l u e o f V R S T d e t e c t i o n v o l t a g e T h e V R S T d e t e c t i o n v o l t a g e d o e s n o t i n c l u d e h y s t e r e s i s N o t e
SINGLE-CHIP 4-BIT CMOS MICROCOMPUTER MITSUBISHI MICROCOMPUTERS RAM BACK-UP MODE The 4501 Group has the RAM back-up mode. When the POF or POF2 instruction is executed continuously after the EPOF instruction, system enters the RAM back-up state. The POF or POF2 instruction is equal to the NOP instruction when the EPOF instruction is not executed before the POF or POF2 in- struction. As oscillation stops retaining RAM, the function of reset circuit and states at RAM back-up mode, current dissipation can be reduced without losing the contents of RAM. In the RAM back-up mode by the POF instruction, system enters the RAM back-up mode and the voltage drop detection cicuit keeps operating. In the RAM back-up mode by the POF2 instruction, all internal periperal functions stop. Table 15 shows the function and states retained at RAM back-up. Figure 38 shows the state transition. (1) Identification of the start condition Warm start (return from the RAM back-up state) or cold start (re- turn from the normal reset state) can be identified by examining the state of the power down flag (P) with the SNZP instruction. (2) Warm start condition When the external wakeup signal is input after the system enters the RAM back-up state by executing the EPOF instruction and POF or POF2 instruction continuously, the CPU starts executing the program from address 0 in page 0. In this case, the P flag is “1.” (3) Cold start condition The CPU starts executing the program from address 0 in page 0 when;
- reset pulse is input to RESET pin, or
- reset by watchdog timer is performed, or
- voltage drop detection circuit is detected by the voltage drop In this case, the P flag is “0.” Table 15 Functions and states retained at RAM back-up Function Program counter (PC), registers A, B, carry flag (CY), stack pointer (SP) (Note 2) Contents of RAM Port level Selected oscillation circuit Timer control register W1 Timer control registers W2, W6 Clock control register MR Interrupt control registers V1, V2 Interrupt control register I1 Timer 1 function Timer 2 function A-D conversion function Voltage drop detection circuit A-D control register Q1 Pull-up control registers PU0 to PU2 Key-on wakeup control registers K0 to K2 External 0 interrupt request flag (EXF0) Timer 1 interrupt request flag (T1F) Timer 2 interrupt request flag (T2F) Watchdog timer flags (WDF1) Watchdog timer enable flag (WEF) 16-bit timer (WDT) A-D conversion completion flag (ADF) Interrupt enable flag (INTE) POF2 O O O O O (Note 3) O O O (Note 3) ✕ (Note 4) ✕ (Note 4) Notes 1:“O ” represents that the function can be retained, and “✕ ” repre- sents that the function is initialized. Registers and flags other than the above are undefined at RAM back-up, and set an initial value after returning. 2: The stack pointer (SP) points the level of the stack register and is initialized to “7” at RAM back-up. 3: The state of the timer is undefined. 4: Initialize the watchdog timer with the WRST instruction, and then execute the POF or POF2 instruction. 5: This function is operating in the RAM back-up mode. When the voltage drop is detected, system reset occurs. RAM back-up POF O O O O O (Note 3) O (Note 5) O O O (Note 3) ✕ (Note 4) ✕ (Note 4)
SINGLE-CHIP 4-BIT CMOS MICROCOMPUTER MITSUBISHI MICROCOMPUTERS (4) Return signal An external wakeup signal is used to return from the RAM back-up mode because the oscillation is stopped. Table 16 shows the return condition for each return source. (5) Control registers
- Key-on wakeup control register K0 Register K0 controls the port P0 key-on wakeup function. Set the contents of this register through register A with the TK0A instruc- tion. In addition, the TAK0 instruction can be used to transfer the contents of register K0 to register A.
- Key-on wakeup control register K1 Register K1 controls the port P1 key-on wakeup function. Set the contents of this register through register A with the TK1A instruc- tion. In addition, the TAK1 instruction can be used to transfer the contents of register K0 to register A.
- Key-on wakeup control register K2 Register K2 controls the ports P2, D 2/C and D3/K key-on wakeup function. Set the contents of this register through register A with the TK2A instruction. In addition, the TAK2 instruction can be used to transfer the contents of register K2 to register A. Table 16 Return source and return condition Remarks The key-on wakeup function can be selected by one port unit. Set the port using the key-on wakeup function to “H ” level before going into the RAM back-up state. Select the return level (“L” level or “H ” level) with the bit 2 of register I1 ac- cording to the external state before going into the RAM back-up state. Return condition Return by an external “L” level in- put. External wakeup signal Return source Port P0 Port P1 (Note) Port P2 Ports D 2/C, D3/K Port P13/INT (Note)
- Pull-up control register PU0 Register PU0 controls the ON/OFF of the port P0 pull-up transis- tor. Set the contents of this register through register A with the TPU0A instruction.
- Pull-up control register PU1 Register PU1 controls the ON/OFF of the port P1 pull-up transis- tor. Set the contents of this register through register A with the TPU1A instruction.
- Pull-up control register PU2 Register PU2 controls the ON/OFF of the ports P2, D 2/C and D3/ K pull-up transistor. Set the contents of this register through reg- ister A with the TPU2A instruction.
- Interrupt control register I1 Register I1 controls the valid waveform of the external 0 inter- rupt, the input control of INT pin and the return input level. Set the contents of this register through register A with the TI1A in- struction. In addition, the TAI1 instruction can be used to transfer the contents of register I1 to register A. Return by an external “H ” level or “L” level input. The return level can be selected with the bit 2 (I1 2) of register I1. When the return level is input, the EXF0 flag is not set. Note: When the bit 3 (K13) of register K1 is “0”, the key-on wakeup of the INT pin is valid (“H ” or “L” level). It is “1”, the key-on wakeup of port P13 is valid (“L” level).
SINGLE-CHIP 4-BIT CMOS MICROCOMPUTER MITSUBISHI MICROCOMPUTERS Fig. 38 State transition Fig. 39 Set source and clear source of the P flag Fig. 40 Start condition identified example using the SNZP in- struction R e s e t S t a b i l i z i n g t i m e a B Operation source clock: ceramic resonator Ring oscillator: stop RC oscillation circuit: stop A O p e r a t i o n s o u r c e c l o c k r i n g o s c i l l a t o r c l o c k C e r a m i c r e s o n a t o r o p e r a t i n g o t e R C o s c i l l a t i o n c i r c u i t s t o p C Operation source clock: RC oscillation Ring oscillator: stop Ceramic resonator: stop CMCK instruction execution (Note 3) CRCK instruction execution (Note 3) V o l t a g e d r o p d e t e c t e d K e y o n w a k e u p S t a b i l i z i n g t i m e b P O F i n s t r u c t i o n e x e c u t i o n D R A M b a c k u p V o l t a g e d r o p d e t e c t i o n c i r c u i t i s o p e r a t i n g Operation source clock: stop Key-on wakeup S t a b i l i z i n g t i m e c POF instruction execution Key-on wakeup S t a b i l i z i n g t i m e b P O F i n s t r u c t i o n e x e c u t i o n Key-on wakeup S t a b i l i z i n g t i m e c POF2 instruction execution E R A M b a c k u p A l l f u n c t i o n s o f m i c r o c o m p u t e r s t o p Operation source clock: stop P O F i n s t r u c t i o n e x e c u t i o n Key-on wakeup Key-on wakeup (Stabilizing time a ) POF2 instruction execution Stabilizing time a : Microcomputer starts its operation after counting the ring oscillator clock 5359 times by hardware. Stabilizing time b : Microcomputer starts its operation after counting the f(XIN) 5359 times by hardware. Stabilizing time c : Microcomputer starts its operation after counting the f(XIN) 165 times by hardware. Notes 1: Continuous execution of the EPOF instruction and the POF or POF2 instruction is required to go into the RAM back-up state. 2: Through the ceramic resonator is operating, the ring oscillator clock is selected as the operation source clock. 3: The oscillator clock corresponding to each instruction is selected as the operation source clock, and the ring oscillator is stopped. (Stabilizing time a ) Operating O p e r a t i n g Operating S R Q Power down flag PP O F o r P O F i n s t r u c t i o n Reset input G Set source G Clear source Reset input EPOF instruction + POF or POF2 instruction E P O F i n s t r u c t i o n + Program start P = “ 1 ” Yes Warm startCold start No
SINGLE-CHIP 4-BIT CMOS MICROCOMPUTER MITSUBISHI MICROCOMPUTERS Table 17 Key-on wakeup control register K03 K02 K01 K00 Key-on wakeup control register K0 Key-on wakeup not used Key-on wakeup used Key-on wakeup not used Key-on wakeup used Key-on wakeup not used Key-on wakeup used Key-on wakeup not used Key-on wakeup used Port P0 3 key-on wakeup control bit Port P0 2 key-on wakeup control bit Port P0 1 key-on wakeup control bit Port P00 key-on wakeup control bit at reset : 00002 at RAM back-up : state retained R/W Note: “R ” represents read enabled, and “W ” represents write enabled. K13 K12 K11 K10 Key-on wakeup control register K1 P13 key-on wakeup not used/INT pin key-on wakeup used P13 key-on wakeup used/INT pin key-on wakeup not used Key-on wakeup not used Key-on wakeup used Key-on wakeup not used Key-on wakeup used Key-on wakeup not used Key-on wakeup used Port P1 3/INT key-on wakeup control bit Port P12/CNTR key-on wakeup control bit Port P1 1 key-on wakeup control bit Port P1 0 key-on wakeup control bit at reset : 00002 at RAM back-up : state retained R/W K23 K22 K21 K20 Key-on wakeup control register K2 Key-on wakeup not used Key-on wakeup used Key-on wakeup not used Key-on wakeup used Key-on wakeup not used Key-on wakeup used Key-on wakeup not used Key-on wakeup used Port D 3/K key-on wakeup control bit Port D2/C key-on wakeup control bit Port P2 1/AIN1 key-on wakeup control bit Port P2 0/AIN0 key-on wakeup control bit at reset : 00002 at RAM back-up : state retained R/W
SINGLE-CHIP 4-BIT CMOS MICROCOMPUTER MITSUBISHI MICROCOMPUTERS PU0 3 PU0 2 PU0 1 PU0 0 Pull-up transistor OFF Pull-up transistor ON Pull-up transistor OFF Pull-up transistor ON Pull-up transistor OFF Pull-up transistor ON Pull-up transistor OFF Pull-up transistor ON Port P0 3 pull-up transistor control bit Port P02 pull-up transistor control bit Port P0 1 pull-up transistor control bit Port P0 0 pull-up transistor control bit Pull-up control register PU0 at reset : 00002 at RAM back-up : state retained W Table 18 Pull-up control register and interrupt control register PU1 3 PU1 2 PU1 1 PU1 0 Pull-up transistor OFF Pull-up transistor ON Pull-up transistor OFF Pull-up transistor ON Pull-up transistor OFF Pull-up transistor ON Pull-up transistor OFF Pull-up transistor ON Port P1 3/INT pull-up transistor control bit Port P1 2/CNTR pull-up transistor control bit Port P11 pull-up transistor control bit Port P1 0 pull-up transistor control bit Pull-up control register PU1 at reset : 00002 at RAM back-up : state retained W PU2 3 PU2 2 PU2 1 PU2 0 Pull-up transistor OFF Pull-up transistor ON Pull-up transistor OFF Pull-up transistor ON Pull-up transistor OFF Pull-up transistor ON Pull-up transistor OFF Pull-up transistor ON Port D 3/K pull-up transistor control bit Port D 2/C pull-up transistor control bit Port P2 1/AIN1 pull-up transistor control bit Port P20/AIN0 pull-up transistor control bit Pull-up control register PU2 at reset : 00002 at RAM back-up : state retained W I13 I12 I11 I10 INT pin input control bit (Note 2) Interrupt valid waveform for INT pin/ return level selection bit (Note 2) INT pin edge detection circuit control bit INT pin timer 1 control enable bit Notes 1: “R ” represents read enabled, and “W ” represents write enabled. 2: When the contents of I12 and I13 are changed, the external interrupt request flag EXF0 may be set. Accordingly, clear EXF0 flag with the SNZ0 in- struction when the bit 0 (V10) of register V1 to “0”. In this time, set the NOP instruction after the SNZ0 instruction, for the case when a skip is performed with the SNZ0 instruction. Interrupt control register I1 R/Wat RAM back-up : state retainedat reset : 00002 INT pin input disabled INT pin input enabled Falling waveform (“L” level of INT pin is recognized with the SNZI0 instruction)/“L” level Rising waveform (“H ” level of INT pin is recognized with the SNZI0 instruction)/“H ” level One-sided edge detected Both edges detected Disabled Enabled
SINGLE-CHIP 4-BIT CMOS MICROCOMPUTER MITSUBISHI MICROCOMPUTERS CLOCK CONTROL The clock control circuit consists of the following circuits.
- Ring oscillator (internal oscillator)
- Ceramic oscillator
- RC oscillation circuit
- Multi-plexer (clock selection circuit)
- Frequency divider
- Internal clock generating circuit Fig. 41 Clock control circuit structure The system clock and the instruction clock are generated as the source clock for operation by these circuits. Figure 41 shows the structure of the clock control circuit. The 4501 Group operates by the ring oscillator clock (f(RING)) which is the internal oscillator after system is released from reset. Also, the ceramic resonator or the RC oscillation can be used for the source oscillation (f(X IN)) of the 4501 Group. The CMCK in- struction or CRCK instruction is executed to select the ceramic resonator or RC oscillator, respectively.M R 3 M R 2 QS QR QS R C R C K i n s t r u c t i o n QS R CMCK instruction QS R RESET pin XO U T XIN Key-on wakeup signal Instruction clock Counter Wait time (Note 2) control circuit P r o g r a m s t a r t s i g n a lR C o s c i l l a t i o n c i r c u i t Division circuit divided by 8 divided by 4 divided by 2 Internal clock generation circuit (divided by 3) N o t e s S y s t e m o p e r a t e s b y t h e r i n g o s c i l l a t o r c l o c k f R I N G u n t i l t h e C M C K o r C R C K i n s t r u c t i o n i s e x e c u t e d a f t e r s y s t e m i s r e l e a s e d f r o m r e s e t T h e w a i t t i m e c o n t r o l c i r c u i t i s u s e d t o g e n e r a t e t h e t i m e r e q u i r e d t o s t a b i l i z e t h e f XI N ) o s c i l l a t i o n A f t e r t h e c e r t a i n o s c i l l a t i o n s t a b i l i z i n g w a i t t i m e e l a p s e s t h e p r o g r a m s t a r t s i g n a l i s o u t p u t T h i s c i r c u i t o p e r a t e s w h e n s y s t e m i s r e l e a s e d f r o m r e s e t o r r e t u r n e d f r o m R A M b a c k u p S y s t e m c l o c k R i n g o s c i l l a t o r i n t e r n a l o s c i l l a t o r N o t e M u l t i p l e x e r Ceramic resonator circuit POF or EPOF instruction + POF2 instruction
SINGLE-CHIP 4-BIT CMOS MICROCOMPUTER MITSUBISHI MICROCOMPUTERS Fig. 42 Switch to ceramic resonance/RC oscillation Fig. 43 Handling of XIN and XOUT when operating ring oscillator Fig. 44 Ceramic resonator external circuit Fig. 45 External RC oscillation circuit Execute the CMCK instruc- tion in program. Note: Externally connect a damping resistor Rd depending on the oscillation frequency. (A feedback resistor is built-in.) Use the resonator manu- facturer’s recommended value because constants such as ca- pacitance depend on the resonator. (1) Selection of source oscillation (f(XIN)) The ceramic resonator or RC oscillation can be used for the source oscillation of the MCU. After system is released from reset, the MCU starts operation by the clock output from the ring oscillator which is the internal oscilla- tor. When the ceramic resonator is used, execute the CMCK instruc- tion. When the RC oscillation is used, execute the CRCK instruction. The oscillation circuit by the CMCK or CRCK instruction can be selected only at once. The oscillation circuit corresponding to the first executed one of these two instructions is valid. Other os- cillation circuit and the ring oscillator stop. Execute the CMCK or the CRCK instruction in the initial setting rou- tine of program (executing it in address 0 in page 0 is recommended). Also, when the CMCK or the CRCK instruction is not executed in program, the MCU operates by the ring oscillator. (2) Ring oscillator operation When the MCU operates by the ring oscillator as the source oscil- lation (f(X IN)) without using the ceramic resonator or the RC oscillator, connect XIN pin to VSS and leave XOUT pin open (Figure 43). The clock frequency of the ring oscillator depends on the supply voltage and the operation temperature range. Be careful that variable frequencies when designing application products. (3) Ceramic resonator When the ceramic resonator is used as the source oscillation (f(XIN)), connect the ceramic resonator and the external circuit to pins XIN and XOUT at the shortest distance. Then, execute the CMCK instruction. A feedback resistor is built in between pins XIN and XOUT (Figure 44). (4) RC oscillation When the RC oscillation is used as the source oscillation (f(XIN)), connect the XIN pin to the external circuit of resistor R and the ca- pacitor C at the shortest distance and leave XOUT pin open. Then, execute the CRCK instruction (Figure 45). The frequency is affected by a capacitor, a resistor and a micro- computer. So, set the constants within the range of the frequency limits. R e s e t R i n g o s c i l l a t o r o p e r a t i o n CMCK instruction C R C K i n s t r u c t i o n
- Ceramic resonator valid
- Ring oscillator stop
- RC oscillation stop R C o s c i l l a t i o n v a l i d R i n g o s c i l l a t o r s t o p C e r a m i c r e s o n a t o r s t o p 4501 XIN XO U T Do not use the CMCK instruction and CRCK instruction in program. 4501 XIN XOUT R d C IN C OUT XI N XO U TR C x e c u t e t h e C R C K i n s t r u c t i o n i n p r o g r a m
SINGLE-CHIP 4-BIT CMOS MICROCOMPUTER MITSUBISHI MICROCOMPUTERS (5) External clock When the external signal clock is used as the source oscillation (f(XIN)), connect the XIN pin to the clock source and leave XOUT pin open. Then, execute the CMCK instruction (Figure 46). Be careful that the maximum value of the oscillation frequency when using the external clock differs from the value when using the ceramic resonator (refer to the recommended operating condition). Also, note that the RAM back-up mode (POF and POF2 instruc- tions) cannot be used when using the external clock. (6) Clock control register MR Register MR controls system clock. Set the contents of this register through register A with the TMRA instruction. In addition, the TAMR instruction can be used to transfer the contents of register MR to register A. Table 19 Clock control register MR Fig. 46 External clock input circuit ROM ORDERING METHOD Please submit the information described below when ordering Mask ROM. (three sets containing the identical data) Note : “R ” represents read enabled, and “W ” represents write enabled. MR 3 Clock control register MR System clock f(XIN) (high-speed mode) f(XIN)/2 (middle-speed mode) f(XIN)/4 (low-speed mode) f(XIN)/8 (default mode) This bit has no function, but read/write is enabled. This bit has no function, but read/write is enabled. at reset : 11002 at RAM back-up : 11002 MR 3 R/W Not used Not used System clock selection bits MR MR 1 MR 0 MR 2 4501 XI N XO U T E x t e r n a l o s c i l l a t i o n c i r c u i t VD D VSS E x e c u t e t h e C M C K i n s t r u c t i o n i n p r o g r a m
SINGLE-CHIP 4-BIT CMOS MICROCOMPUTER MITSUBISHI MICROCOMPUTERS LIST OF PRECAUTIONS ➀ Noise and latch-up prevention Connect a capacitor on the following condition to prevent noise and latch-up;
- connect a bypass capacitor (approx. 0.1 µF) between pins VDD and VSS at the shortest distance,
- equalize its wiring in width and length, and
- use relatively thick wire. In the One Time PROM version, CNVSS pin is also used as VPP pin. Accordingly, when using this pin, connect this pin to VSS through a resistor about 5 kΩ (connect this resistor to CNVSS / VPP pin as close as possible). ➁ Register initial values 1 The initial value of the following registers are undefined after sys- tem is released from reset. After system is released from reset, set initial values.
- Register Z (2 bits)
- Register D (3 bits)
- Register E (8 bits) ➂ Register initial values 2 The initial value of the following registers are undefined at RAM back-up. After system is returned from RAM back-up, set initial values.
- Register Z (2 bits)
- Register X (4 bits)
- Register Y (4 bits)
- Register D (3 bits)
- Register E (8 bits) ➃ Stack registers (SK S) and stack pointer (SP) Stack registers (SKs) are eight identical registers, so that subrou- tines can be nested up to 8 levels. However, one of stack registers is used respectively when using an interrupt service routine and when executing a table reference instruction. Accord- ingly, be careful not to over the stack when performing these operations together. ➄ Prescaler Stop the prescaler operation to change its frequency dividing ra- tio. ➅ Timer count source Stop timer 1 or 2 counting to change its count source. ➆ Reading the count value Stop timer 1 or 2 counting and then execute the TAB1 or TAB2 instruction to read its data. ➇ Writing to the timer Stop timer 1 or 2 counting and then execute the T1AB or T2AB instruction to write its data. ➈ Writing to reload register R1 When writing data to reload register R1 while timer 1 is operat- ing, avoid a timing when timer 1 underflows. Watchdog timer
- The watchdog timer function is valid after system is released from reset. When not using the watchdog timer function, execute the DWDT instruction and the WRST instruction continuously, and clear the WEF flag to “0” to stop the watchdog timer function.
- The watchdog timer function is valid after system is returned from the RAM back-up. When not using the watchdog timer function, execute the DWDT instruction and the WRST instruction continu- ously every system is returned from the RAM back-up, and stop the watchdog timer function. Multifunction
- The input/output of D 2, D3, P12 and P13 can be used even when C, K, INT and CNTR (input) are selected.
- The input of P12 can be used even when CNTR (output) is selected.
- The input/output of P20 and P21 can be used even when AIN0 and AIN1 are selected. Program counter Make sure that the PCH does not specify after the last page of the built-in ROM. POF and POF2 instructions When the POF or POF2 instruction is executed continuously af- ter the EPOF instruction, system enters the RAM back-up state. Note that system cannot enter the RAM back-up state when ex- ecuting only the POF or POF2 instruction. Be sure to disable interrupts by executing the DI instruction be- fore executing the EPOF instruction and the POF or POF2 instruction continuously. 3/INT pin Note [1] on bit 3 of register I1 When the input of the INT pin is controlled with the bit 3 of regis- ter I1 in software, be careful about the following notes.
- Depending on the input state of the P13/INT pin, the external 0 in- terrupt request flag (EXF0) may be set when the bit 3 of register I1 is changed. In order to avoid the occurrence of an unexpected interrupt, clear the bit 0 of register V1 to “0” (refer to Figure 47➀ ) and then, change the bit 3 of register I1. In addition, execute the SNZ0 instruction to clear the EXF0 flag after executing at least one instruction (refer to Figure 47➁ ). Also, set the NOP instruction for the case when a skip is per- formed with the SNZ0 instruction (refer to Figure 47➂ ). LA 4 ; ( ✕✕✕ 0 LA 8 ; (1 ✕✕✕ 2) TI1A ; Control of INT pin input is changed SNZ0 ; The SNZ0 instruction is executed (EXF0 flag cleared) ✕ : these bits are not used here.
- ••
- •• Fig. 47 External 0 interrupt program example-1
SINGLE-CHIP 4-BIT CMOS MICROCOMPUTER MITSUBISHI MICROCOMPUTERS Note [2] on bit 3 of register I1 When the bit 3 of register I1 is cleared, the RAM back-up mode is selected and the input of INT pin is disabled, be careful about the following notes.
- When the key-on wakeup function of port P1 3 is not used (regis- ter K13 = “0”), clear bits 2 and 3 of register I1 before system enters to the RAM back-up mode. (refer to Figure 48➀ ). LA 0 ; (00 ✕✕ 2) DI EPOF POF ; RAM back-up ✕ : these bits are not used here. Fig. 48 External 0 interrupt program example-2
- ••
- •• Note [3] on bit 2 of register I1 When the interrupt valid waveform of the P13/INT pin is changed with the bit 2 of register I1 in software, be careful about the fol- lowing notes.
- Depending on the input state of the P1 3/INT pin, the external 0 in- terrupt request flag (EXF0) may be set when the bit 2 of register I1 is changed. In order to avoid the occurrence of an unexpected interrupt, clear the bit 0 of register V1 to “0” (refer to Figure 49➀ ) and then, change the bit 2 of register I1. In addition, execute the SNZ0 instruction to clear the EXF0 flag after executing at least one instruction (refer to Figure 49➁ ). Also, set the NOP instruction for the case when a skip is per- formed with the SNZ0 instruction (refer to Figure 49➂ ). LA 4 ; ( ✕✕✕ 0 LA 12 TI1A ; Interrupt valid waveform is changed SNZ0 ; The SNZ0 instruction is executed (EXF0 flag cleared) ✕ : these bits are not used here. Fig. 49 External 0 interrupt program example-3
- ••
- •• Power-on reset Reset can be automatically performed at power on (power-on re- set) by the built-in power-on reset circuit. When the built-in power-on reset circuit is used, the time for the supply voltage to rise from 0 V to 2.0 V must be set to 100 µs or less. If the rising time exceeds 100 µs, connect a capacitor between the RESET pin and V SS at the shortest distance, and input “L” level to RE- SET pin until the value of supply voltage reaches the minimum operating voltage. Clock control Execute the CMCK or the CRCK instruction in the initial setting routine of program (executing it in addres 0 in page 0 is recom- mended). The oscillation circuit by the CMCK or CRCK instruction can be selected only at once. The oscillation circuit corresponding to the first executed one of these two instruction is valid. Other oscilla- tion circuits and the ring oscillator stop. Ring oscillator The clock frequency of the ring oscillator depends on the supply voltage and the operation temperature range. Be careful that variable frequencies when designing application products. Also, the oscillation stabilize wait time after system is released from reset is generated by the ring oscillator clock. When consid- ering the oscillation stabilize wait time after system is released from reset, be careful that the variable frequency of the ring oscil- lator clock. External clock When the external signal clock is used as the source oscillation (f(X IN)), note that the RAM back-up mode (POF and POF2 in- structions) cannot be used.
SINGLE-CHIP 4-BIT CMOS MICROCOMPUTER MITSUBISHI MICROCOMPUTERS Fig. 51 Analog input external circuit example-1 Fig. 52 Analog input external circuit example-2 Notes for the use of A-D conversion 1 Note the following when using the analog input pins also for port P2 function:
- Selection of analog input pins Even when P20/AIN0 and P21/AIN1 are set to pins for analog in- put, they continue to function as port P2 input/output. Accordingly, when any of them are used as I/O port and others are used as analog input pins, make sure to set the outputs of pins that are set for analog input to “1.” Also, the port input func- tion of the pin functions as an analog input is undefined.
- TALA instruction When the TALA instruction is executed, the low-order 2 bits of register AD is transferred to the high-order 2 bits of register A, si- multaneously, the low-order 2 bits of register A is “0.” Notes for the use of A-D conversion 2 Do not change the operating mode (both A-D conversion mode and comparator mode) of A-D converter with the bit 3 of register Q1 while the A-D converter is operating. When the operating mode of A-D converter is changed from the comparator mode to A-D conversion mode with the bit 3 of regis- ter Q1, note the following;
- Clear the bit 2 of register V2 to “0” (refer to Figure 50➀ ) to change the operating mode of the A-D converter from the com- parator mode to A-D conversion mode with the bit 3 of register Q1.
- The A-D conversion completion flag (ADF) may be set when the operating mode of the A-D converter is changed from the com- parator mode to the A-D conversion mode. Accordingly, set a value to the bit 3 of register Q1, and execute the SNZAD instruc- tion to clear the ADF flag. LA 8 ; ( ✕ 0✕✕ LA 0 ; (0 ✕✕✕ 2) TQ1A ; Operation mode of A-D converter is changed from comparator mode to A-D conversion mode. SNZAD NOP ✕ : these bits are not used here. Fig. 50 External 0 interrupt program example-3
- ••
- •• Notes for the use of A-D conversion 3 Each analog input pin is equipped with a capacitor which is used to compare the analog voltage. Accordingly, when the analog voltage is input from the circuit with high-impedance and, charge/ discharge noise is generated and the sufficient A-D accuracy may not be obtained. Therefore, reduce the impedance or, con- nect a capacitor (0.01 µF to 1 µF) to analog input pins (Figure 51). When the overvoltage applied to the A-D conversion circuit may occur, connect an external circuit in order to keep the voltage within the rated range as shown the Figure 52. In addition, test the application products sufficiently. Sensor AIN A p p l y t h e v o l t a g e w i t h i i n t h e s p e c i f i c a t i o n s t o a n a n a l o g i n p u t p i n Sensor AIN About 1kΩ
SINGLE-CHIP 4-BIT CMOS MICROCOMPUTER MITSUBISHI MICROCOMPUTERS CONTROL REGISTERS I13 I12 I11 I10 INT pin input control bit (Note 3) Interrupt valid waveform for INT pin/ return level selection bit (Note 3) INT pin edge detection circuit control bit INT pin timer 1 control enable bit Interrupt control register I1 R/Wat RAM back-up : state retainedat reset : 00002 INT pin input disabled INT pin input enabled Falling waveform (“L” level of INT pin is recognized with the SNZI0 instruction)/“L” level Rising waveform (“H ” level of INT pin is recognized with the SNZI0 instruction)/“H ” level One-sided edge detected Both edges detected Disabled Enabled MR 3 Clock control register MR System clock f(XIN) (high-speed mode) f(XIN)/2 (middle-speed mode) f(XIN)/4 (low-speed mode) f(XIN)/8 (default mode) This bit has no function, but read/write is enabled. This bit has no function, but read/write is enabled. at reset : 11002 at RAM back-up : 11002 MR 3 R/W Not used Not used System clock selection bits MR MR 1 MR 0 MR 2 This bit has no function, but read/write is enabled. Interrupt disabled (SNZAD instruction is valid) Interrupt enabled (SNZAD instruction is invalid) (Note 2) This bit has no function, but read/write is enabled. This bit has no function, but read/write is enabled. R/W V13 V12 V11 V10 V23 V22 V21 V20 Not used A-D interrupt enable bit Not used Not used Interrupt control register V2 at RAM back-up : 00002at reset : 00002 Interrupt control register V1 Timer 2 interrupt enable bit Timer 1 interrupt enable bit Not used External 0 interrupt enable bit Interrupt disabled (SNZT2 instruction is valid) Interrupt enabled (SNZT2 instruction is invalid) (Note 2) Interrupt disabled (SNZT1 instruction is valid) Interrupt enabled (SNZT1 instruction is invalid) (Note 2) This bit has no function, but read/write is enabled. Interrupt disabled (SNZ0 instruction is valid) Interrupt enabled (SNZ0 instruction is invalid) (Note 2) R/Wat RAM back-up : 0000 2at reset : 00002 R/Wat RAM back-up : 00002at reset : 00002 Notes 1: “R ” represents read enabled, and “W ” represents write enabled. 2: These instructions are equivalent to the NOP instruction. 3: When the contents of I1 2 and I13 are changed, the external interrupt request flag EXF0 may be set. Accordingly, clear EXF0 flag with the SNZ0 in- struction when the bit 0 (V10) of register V1 to “0”. In this time, set the NOP instruction after the SNZ0 instruction, for the case when a skip is performed with the SNZ0 instruction.
SINGLE-CHIP 4-BIT CMOS MICROCOMPUTER MITSUBISHI MICROCOMPUTERS Stop (state initialized) Operating Instruction clock divided by 4 Instruction clock divided by 16 Stop (state retained) Operating Count start synchronous circuit not selected Count start synchronous circuit selected Prescaler control bit Prescaler dividing ratio selection bit Timer 1 control bit Timer 1 count start synchronous circuit control bit Stop (state retained) Operating Count auto-stop circuit not selected Count auto-stop circuit selected Count source Timer 1 underflow signal Prescaler output (ORCLK) CNTR input System clock Timer 2 control bit Timer 1 count auto-stop circuit selection bit (Note 2) Timer 2 count source selection bits W1 2 W1 1 W1 0 Timer control register W1 R/Wat RAM back-up : 00002at reset : 00002 R/Wat RAM back-up : 00002at reset : 00002 Timer control register W2 R/Wat RAM back-up : state retainedat reset : 00002 This bit has no function, but read/write is enabled. This bit has no function, but read/write is enabled. Timer 1 underflow signal divided by 2 output Timer 2 underflow signal divided by 2 output 2(I/O)/CNTR input (Note 3) P12 (input)/CNTR input/output (Note 3) Not used Not used CNTR output selection bit 2/CNTR function selection bit Timer control register W6 R/Wat RAM back-up : state retainedat reset : 00002 Notes 1: “R ” represents read enabled, and “W ” represents write enabled. 2: This function is valid only when the timer 1 count start synchronization circuit is selected. 3: CNTR input is valid only when CNTR input is selected as the timer 2 count source. Q1 3 Q1 2 A-D control register Q1 A-D operation mode selection bit Not used Analog input pin selection bits at reset : 00002 at RAM back-up : state retained Q1 1 A-D conversion mode Comparator mode This bit has no function, but read/write is enabled. Selected pins A IN0 AIN1 Not available Not available Q1 0 R/W Q1 1 Q1 0 W2 3 W2 2 W2 1 W2 0 W6 3 W6 2 W6 1 W6 0
SINGLE-CHIP 4-BIT CMOS MICROCOMPUTER MITSUBISHI MICROCOMPUTERS K03 K02 K01 K00 Key-on wakeup control register K0 Key-on wakeup not used Key-on wakeup used Key-on wakeup not used Key-on wakeup used Key-on wakeup not used Key-on wakeup used Key-on wakeup not used Key-on wakeup used Port P0 3 key-on wakeup control bit Port P0 2 key-on wakeup control bit Port P01 key-on wakeup control bit Port P0 0 key-on wakeup control bit at reset : 00002 at RAM back-up : state retained R/W Note: “R ” represents read enabled, and “W ” represents write enabled. K13 K12 K11 K10 Key-on wakeup control register K1 P13 key-on wakeup not used/INT pin key-on wakeup used P13 key-on wakeup used/INT pin key-on wakeup not used Key-on wakeup not used Key-on wakeup used Key-on wakeup not used Key-on wakeup used Key-on wakeup not used Key-on wakeup used Port P1 3/INT key-on wakeup control bit Port P12/CNTR key-on wakeup control bit Port P1 1 key-on wakeup control bit Port P1 0 key-on wakeup control bit at reset : 00002 at RAM back-up : state retained R/W K23 K22 K21 K20 Key-on wakeup control register K2 Key-on wakeup not used Key-on wakeup used Key-on wakeup not used Key-on wakeup used Key-on wakeup not used Key-on wakeup used Key-on wakeup not used Key-on wakeup used Port D 3/K key-on wakeup control bit Port D2/C key-on wakeup control bit Port P2 1/AIN1 key-on wakeup control bit Port P2 0/AIN0 key-on wakeup control bit at reset : 00002 at RAM back-up : state retained R/W
SINGLE-CHIP 4-BIT CMOS MICROCOMPUTER MITSUBISHI MICROCOMPUTERS PU0 3 PU0 2 PU0 1 PU0 0 Pull-up transistor OFF Pull-up transistor ON Pull-up transistor OFF Pull-up transistor ON Pull-up transistor OFF Pull-up transistor ON Pull-up transistor OFF Pull-up transistor ON Port P0 3 pull-up transistor control bit Port P0 2 pull-up transistor control bit Port P0 1 pull-up transistor control bit Port P00 pull-up transistor control bit Pull-up control register PU0 at reset : 00002 at RAM back-up : state retained W PU1 3 PU1 2 PU1 1 PU1 0 Pull-up transistor OFF Pull-up transistor ON Pull-up transistor OFF Pull-up transistor ON Pull-up transistor OFF Pull-up transistor ON Pull-up transistor OFF Pull-up transistor ON Port P1 3/INT pull-up transistor control bit Port P1 2/CNTR pull-up transistor control bit Port P11 pull-up transistor control bit Port P1 0 pull-up transistor control bit Pull-up control register PU1 at reset : 00002 at RAM back-up : state retained W PU2 3 PU2 2 PU2 1 PU2 0 Pull-up transistor OFF Pull-up transistor ON Pull-up transistor OFF Pull-up transistor ON Pull-up transistor OFF Pull-up transistor ON Pull-up transistor OFF Pull-up transistor ON Port D 3/K pull-up transistor control bit Port D 2/C pull-up transistor control bit Port P21/AIN1 pull-up transistor control bit Port P2 0/AIN0 pull-up transistor control bit Pull-up control register PU2 at reset : 00002 at RAM back-up : state retained W Notes 1: “R ” represents read enabled, and “W ” represents write enabled.
SINGLE-CHIP 4-BIT CMOS MICROCOMPUTER MITSUBISHI MICROCOMPUTERS Symbol A B DR E MR PU0 PU1 PU2 X Y Z DP PC PC H PC L SK SP CY T1F T2F
Contents
Register A (4 bits) Register B (4 bits) Register D (3 bits) Register E (8 bits) A-D control register Q1 (4 bits) Interrupt control register V1 (4 bits) Interrupt control register V2 (4 bits) Interrupt control register I1 (4 bits) Timer control register W1 (4 bits) Timer control register W2 (4 bits) Timer control register W6 (4 bits) Clock control register MR (4 bits) Key-on wakeup control register K0 (4 bits) Key-on wakeup control register K1 (4 bits) Key-on wakeup control register K2 (4 bits) Pull-up control register PU0 (4 bits) Pull-up control register PU1 (4 bits) Pull-up control register PU2 (4 bits) Register X (4 bits) Register Y (4 bits) Register Z (2 bits) Data pointer (10 bits) (It consists of registers X, Y, and Z) Program counter (14 bits) High-order 7 bits of program counter Low-order 7 bits of program counter Stack register (14 bits ✕ 8) Stack pointer (3 bits) Carry flag Timer 1 reload register Timer 2 reload register Timer 1 Timer 2 Timer 1 interrupt request flag Timer 2 interrupt request flag Watchdog timer enable flag Interrupt enable flag External 0 interrupt request flag Power down flag A-D conversion completion flag Port D (4 bits) Port P0 (4 bits) Port P1 (4 bits) Port P2 (2 bits) Port C (1 bit) Port K (1 bit) Hexadecimal variable Hexadecimal variable Hexadecimal variable Hexadecimal variable Hexadecimal constant Hexadecimal constant Hexadecimal constant Binary notation of hexadecimal variable A (same for others) Direction of data movement Data exchange between a register and memory Decision of state shown before “?” Contents of registers and memories Negate, Flag unchanged after executing instruction RAM address pointed by the data pointer Label indicating address a 6 a5 a4 a3 a2 a1 a0 Label indicating address a6 a5 a4 a3 a2 a1 a0 in page p5 p4 p3 p2 p1 p0 Hex. C + Hex. number x (also same for others) Symbol WDF1 WEF INTE EXF0 P ADF D C K x y z p n i j A 3A2A1A0 ( ) M(DP) a p, a C x Note : Some instructions of the 4501 Group has the skip function to unexecute the next described instruction. The 4501 Group just invalidates the next instruc- tion when a skip is performed. The contents of program counter is not increased by 2. Accordingly, the number of cycles does not change even if skip is not performed. However, the cycle count becomes “1” if the TABP p, RT, or RTS instruction is skipped. INSTRUCTIONS The 4501 Group has the 111 instructions. Each instruction is de- scribed as follows; (1) Index list of instruction function (2) Machine instructions (index by alphabet) (3) Machine instructions (index by function) (4) Instruction code table SYMBOL The symbols shown below are used in the following list of instruc- tion function and the machine instructions.
SINGLE-CHIP 4-BIT CMOS MICROCOMPUTER MITSUBISHI MICROCOMPUTERS INDEX LIST OF INSTRUCTION FUNCTION Group- ing RAM addresses Mnemonic XAMI j TMA j LA n TABP p AM AMC A n AND OR SC RC SZC CMA RAR Function (A) ← → (M(DP)) (X) ← (X)EXOR(j) j = 0 to 15 (Y) ← (Y) + 1 (M(DP)) ← (A) (X) ← (X)EXOR(j) j = 0 to 15 (A) ← n n = 0 to 15 (SP) ← (SP) + 1 (SK(SP)) ← (PC) (PC H ) ← p (Note) (PCL) ← (DR2–DR 0, A3–A0) (B) ← (ROM(PC))7–4 (A) ← (ROM(PC))3–0 (PC) ← (SK(SP)) (SP) ← (SP) – 1 (A) ← (A) + (M(DP)) (A) ← (A) + (M(DP)) + (CY) (CY) ← Carry (A) ← (A) + n n = 0 to 15 (A) ← (A) AND (M(DP)) (A) ← (A) OR (M(DP)) (CY) ← 1 (CY) ← 0 (CY) = 0 ? (A) ← (A) → CY → A3A2A1A0 Mnemonic TAB TBA TAY TYA TEAB TABE TDA TAD TAZ TAX TASP LXY x, y LZ z INY DEY TAM j XAM j XAMD j Function (A) ← (B) (B) ← (A) (A) ← (Y) (Y) ← (A) 7–E4) ← (B) (E3–E0) ← (A) (B) ← (E7–E4) (A) ← (E3–E0) (DR 2–DR 0) ← (A2–A0) (A2–A0) ← (DR2–DR 0) (A3) ← 0 (A3, A2) ← 0 (A) ← (X) (A2–A0) ← (SP2–SP 0) (A3) ← 0 (X) ← x x = 0 to 15 (Y) ← y y = 0 to 15 (Z) ← z z = 0 to 3 (Y) ← (Y) + 1 (Y) ← (Y) – 1 (A) ← (M(DP)) (X) ← (X)EXOR(j) j = 0 to 15 (A) ← → (M(DP)) (X) ← (X)EXOR(j) j = 0 to 15 (A) ← → (M(DP)) (X) ← (X)EXOR(j) j = 0 to 15 (Y) ← (Y) – 1 RAM to register transfer Arithmetic operation RAM to register transfer Register to register transfer Group- ingPage 75, 88 81, 88 81, 88 86, 88 82, 88 76, 88 82, 88 77, 88 81, 88 81, 88 79, 88 66, 88 66, 88 66, 88 63, 88 78, 88 87, 88 87, 88 Page 87, 88 83, 88 66, 90 76, 90 60, 90 60, 90 60, 90 61, 90 68, 90 71, 90 69, 90 74, 90 63, 90 69, 90 Note: p is 0 to 15 for M34501M2, p is 0 to 31 for M34501M4/E4.
SINGLE-CHIP 4-BIT CMOS MICROCOMPUTER MITSUBISHI MICROCOMPUTERS INDEX LIST OF INSTRUCTION FUNCTION (continued) Group- ingFunction (Mj(DP)) ← 1 j = 0 to 3 (Mj(DP)) ← 0 j = 0 to 3 (Mj(DP)) = 0 ? j = 0 to 3 (A) = (M(DP)) ? (A) = n ? n = 0 to 15 (PC L) ← a6–a0 (PCH ) ← p (Note) (PCL) ← a6–a0 (PCH ) ← p (Note) (PCL) ← (DR2–DR 0, A3–A0) (SP) ← (SP) + 1 (SK(SP)) ← (PC) (PCH ) ← 2 (PCL) ← a6–a0 (SP) ← (SP) + 1 (SK(SP)) ← (PC) (PCH ) ← p (Note) (PCL) ← a6–a0 (SP) ← (SP) + 1 (SK(SP)) ← (PC) (PCH ) ← p (Note) (PCL) ← (DR2–DR 0, A3–A0) (PC) ← (SK(SP)) (SP) ← (SP) – 1 (PC) ← (SK(SP)) (SP) ← (SP) – 1 (PC) ← (SK(SP)) (SP) ← (SP) – 1 Comparisonoperation Subroutine operation Branch operation Bit operation Return operation Mnemonic SB j RB j SZB j SEAM SEA n B a BL p, a BLA p BM a BML p, a BMLA p RTI RT RTS Group- ing Page 71, 90 69, 90 74, 90 72, 90 72, 90 61, 92 61, 92 61, 92 62, 92 62, 92 62, 92 70, 92 70, 92 70, 92 Function (INTE) ← 0 (INTE) ← 1 After skipping, (EXF0) ← 0 V10 = 1: SNZ0 = NOP (A) ← (V1) (V1) ← (A) (A) ← (V2) (V2) ← (A) (A) ← (I1) (I1) ← (A) (A) ← (W1) (W1) ← (A) (A) ← (W2) (W2) ← (A) (A) ← (W6) (W6) ← (A) (B) ← (T17–T14) (A) ← (T13–T10) (R17–R1 4) ← (B) (T17–T14) ← (B) (R13–R1 0) ← (A) (T13–T10) ← (A) (B) ← (T27–T24) (A) ← (T23–T20) (R27–R2 4) ← (B) (T27–T24) ← (B) (R23–R2 0) ← (A) (T23–T20) ← (A) Mnemonic DI EI SNZ0 SNZI0 TAV1 TV1A TAV2 TV2A TAI1 TI1A TAW1 TW1A TAW2 TW2A TAW6 TW6A TAB1 T1AB TAB2 T2AB Interrupt operation Page 64, 94 64, 94 72, 94 73, 94 79, 94 85, 94 80, 94 85, 94 77, 94 82, 94 80, 94 85, 94 80, 94 86, 94 80, 94 86, 94 75, 94 75, 94 76, 94 75, 94 Timer operation Note: p is 0 to 15 for M34501M2, p is 0 to 31 for M34501M4/E4.
SINGLE-CHIP 4-BIT CMOS MICROCOMPUTER MITSUBISHI MICROCOMPUTERS INDEX LIST OF INSTRUCTION FUNCTION (continued) Group- ing Group- ing Function (R17–R1 4) ← (B) (R13–R1 0) ← (A) After skipping, (T1F) ← 0 V12 = 1: SNZT1 = NOP After skipping, (T2F) ← 0 V13 = 1: SNZT2 = NOP (A) ← (P0) (P0) ← (A) (A) ← (P1) (P1) ← (A) (A3, A2) ← 0 (D) ← 1 (D(Y)) ← 0 (Y) = 0 to 3 (D(Y)) ← 1 (Y) = 0 to 3 (D(Y)) = 0 ? (Y) = 0 to 3 (C) ← 1 (C) ← 0 (C) = 1 ? Mnemonic TR1AB SNZT1 SNZT2 IAP0 OP0A IAP1 OP1A IAP2 OP2A CLD RD SD SZD SCP RCP SNZCP Timer operation Page 85, 94 73, 94 74, 94 65, 96 67, 96 65, 96 67, 96 65, 96 68, 96 62, 96 70, 96 71, 96 74, 96 71, 96 69, 96 73, 96 Function (A0) ← (K) (A3–A1) ← 0 (K) ← (A0) (K0) ← (A) (A) ← (K0) (K1) ← (A) (A) ← (K1) (K2) ← (A) (A) ← (K2) (PU0) ← (A) (PU1) ← (A) (PU2) ← (A) In A-D conversion mode (Q13 = 0), (B) ← (AD9–AD 6) (A) ← (AD5–AD 2) In comparator mode (Q13 = 1), (B) ← (AD7–AD 4) (A) ← (AD3–AD 0) (A3, A2) ← (AD1, AD0) (A1, A0) ← 0 (AD7–AD 4) ← (B) (AD3–AD 0) ← (A) (A) ← (Q1) (Q1) ← (A) (ADF) ← 0 Q1 3 = 0: A-D conversion starting Q1 3 = 1: Comparator operation starting After skipping, (ADF) ← 0 V22 = 1: SNZAD = NOP Mnemonic IAK OKA TK0A TAK0 TK1A TAK1 TK2A TAK2 TPU0A TPU1A TPU2A TABAD TALA TADAB TAQ1 TQ1A ADST SNZAD Page 65, 96 67, 96 82, 96 77, 96 83, 96 78, 96 83, 96 78, 96 84, 96 84, 96 84, 96 76, 98 78, 98 77, 98 79, 98 84, 98 60, 98 72, 98 Input/Output operation A-D conversion operation Input/Output operation
SINGLE-CHIP 4-BIT CMOS MICROCOMPUTER MITSUBISHI MICROCOMPUTERS Mnemonic NOP POF POF2 EPOF SNZP DWDT WRST CMCK CRCK TAMR TMRA Function (PC) ← (PC) + 1 RAM back-up (Voltage drop detection circuit valid) RAM back-up POF, POF2 instructions valid (P) = 1 ? Stop of watchdog timer func- tion enabled (WDF1) = 1 ? After skipping, (WDF1) ← 0 Ceramic oscillation circuit selected RC oscillation circuit selected (A) ← (MR) (MR) ← (A) Other operation INDEX LIST OF INSTRUCTION FUNCTION (continued) Group- ing Page 67, 100 68, 100 68, 100 64, 100 73, 100 64, 100 86, 100 63, 100 63, 100 79, 100 83, 100
SINGLE-CHIP 4-BIT CMOS MICROCOMPUTER MITSUBISHI MICROCOMPUTERS Flag CY 2 16 Skip conditionNumber of cycles Number of words Instruction code D 9 D 0 Flag CY 2 16 Skip conditionNumber of cycles Number of words Instruction code D 9 D 0 Flag CY 2 16 Skip conditionNumber of cycles Number of words Instruction code D 9 D 0 Flag CY 2 16 MACHINE INSTRUCTIONS (INDEX BY ALPHABET) A n (Add n and accumulator) 000110nnnn 06n 11 – Overflow = 0 Grouping: Arithmetic operation Description:Adds the value n in the immediate field to register A, and stores a result in register A. The contents of carry flag CY remains un- changed. Skips the next instruction when there is no overflow as the result of operation. Executes the next instruction when there is overflow as the result of operation. Operation: (A) ← (A) + n n = 0 to 15 ADST (A-D conversion STart) 1010011111 29F 11 – – Grouping: A-D conversion operation Description:Clears (0) to A-D conversion completion flag ADF, and the A-D conversion at the A-D con- version mode (Q1 3 = 0) or the comparator operation at the comparator mode (Q13 = 1) is started. Operation: (ADF) ← 0 Q1 3 = 0: A-D conversion starting Q1 3 = 1: Comparator operation starting (Q13 : bit 3 of A-D control register Q1) AM (Add accumulator and Memory) 0000001010 00A 11 – – Grouping: Arithmetic operation Description:Adds the contents of M(DP) to register A. Stores the result in register A. The contents of carry flag CY remains unchanged. Operation: (A) ← (A) + (M(DP)) AMC (Add accumulator, Memory and Carry) 0000001011 00B 11 0/1 – Grouping: Arithmetic operation Description:Adds the contents of M(DP) and carry flag CY to register A. Stores the result in register A and carry flag CY. Operation: (A) ← (A) + (M(DP)) + (CY) (CY) ← Carry
SINGLE-CHIP 4-BIT CMOS MICROCOMPUTER AND (logical AND between accumulator and memory) 0000011000 018 11 – – Grouping: Arithmetic operation Description:Takes the AND operation between the con- tents of register A and the contents of M(DP), and stores the result in register A. Operation: (A) ← (A) AND (M(DP)) B a (Branch to address a) 011a 6 a5 a4 a3 a2 a1 a0 1a 11 – – Grouping: Branch operation Description:Branch within a page : Branches to address a in the identical page. Note: Specify the branch address within the page including this instruction. Operation: (PCL) ← a6 to a0 BL p, a (Branch Long to address a in page p) 00111p 4 p3 p2 p1 p0 0p 22 – – Grouping: Branch operation Description:Branch out of a page : Branches to address a in page p. Note: p is 0 to 15 for M34501M2, and p is 0 to 31 for M34501M4/E4. Operation: (PCH ) ← p (PCL) ← a6 to a0 BLA p (Branch Long to address (D) + (A) in page p) 0000010000 010 22 – – Grouping: Branch operation Description:Branch out of a page : Branches to address (DR 2 DR 1 DR 0 A3 A2 A1 A0)2 specified by registers D and A in page p. Note: p is 0 to 15 for M34501M2 and p is 0 to 31 for M34501M4/E4. 2 16100a 6 a5 a4 a3 a2 a1 a0 2aa E Operation: (PCH ) ← p (PCL) ← (DR2–DR 0, A3–A0) 2 16100p 4 00p 3 p2 p1 p0 2pp MACHINE INSTRUCTIONS (INDEX BY ALPHABET) (continued)
SINGLE-CHIP 4-BIT CMOS MICROCOMPUTER MITSUBISHI MICROCOMPUTERS Flag CY 2 16 Skip conditionNumber of cycles Number of words Instruction code D 9 D 0 Flag CY 2 16 Skip conditionNumber of cycles Number of words Instruction code D 9 D 0 Flag CY 2 16 Skip conditionNumber of cycles Number of words Instruction code D 9 D 0 Flag CY 2 16 BM a (Branch and Mark to address a in page 2) 010a 6 a5 a4 a3 a2 a1 a0 1aa 11 – – Grouping: Subroutine call operation Description:Call the subroutine in page 2 : Calls the sub- routine at address a in page 2. Note: Subroutine extending from page 2 to another page can also be called with the BM instruc- tion when it starts on page 2. Be careful not to over the stack because the maximum level of subroutine nesting is 8. Operation: (SP) ← (SP) + 1 (SK(SP)) ← (PC) (PC H ) ← 2 (PCL) ← a6–a0 BML p, a (Branch and Mark Long to address a in page p) 00110p 4 p3 p2 p1 p0 0p 22 – – Grouping: Subroutine call operation Description:Call the subroutine : Calls the subroutine at address a in page p. Note: p is 0 to 15 for M34501M2 and p is 0 to 31 for M34501M4/E4. Be careful not to over the stack because the maximum level of subroutine nesting is 8. Operation: (SP) ← (SP) + 1 (SK(SP)) ← (PC) (PC H ) ← p (PCL) ← a6–a0 BMLA p (Branch and Mark Long to address (D) + (A) in page p) 0000110000 030 22 – – Grouping: Subroutine call operation Description:Call the subroutine : Calls the subroutine at address (DR2 DR1 DR0 A3 A2 A1 A0)2 speci- fied by registers D and A in page p. Note: p is 0 to 15 for M34501M2 and p is 0 to 31 for M34501M4/E4. Be careful not to over the stack because the maximum level of subroutine nesting is 8. CLD (CLear port D) 0000010001 011 11 – – Grouping: Input/Output operation Description:Sets (1) to port D. Operation: (D) ← 1 2 16100a 6 a5 a4 a3 a2 a1 a0 2aa C Operation: (SP) ← (SP) + 1 (SK(SP)) ← (PC) (PCH ) ← p (PCL) ← (DR2–DR 0, A3–A0) 2 16100p 4 00p 3 p2 p1 p0 2pp MACHINE INSTRUCTIONS (INDEX BY ALPHABET) (continued)
SINGLE-CHIP 4-BIT CMOS MICROCOMPUTER CMA (CoMplement of Accumulator) 0000011100 01C 11 – – Grouping: Arithmetic operation Description:Stores the one’s complement for register A’s contents in register A. Operation: (A) ← (A) CMCK (Clock select: ceraMic oscillation ClocK) 1010011010 29A 11 – – Grouping: Other operation Description:Selects the ceramic oscillation circuit and stops the ring oscillator. Operation: Ceramic oscillation circuit selected CRCK (Clock select: Rc oscillation ClocK) 1010011011 29B 11 – – Grouping: Other operation Description:Selects the RC oscillation circuit and stops the ring oscillator. Operation: RC oscillation circuit selected DEY (DEcrement register Y) 0000010111 017 11 – (Y) = 15 Grouping: RAM addresses Description:Subtracts 1 from the contents of register Y. As a result of subtraction, when the contents of register Y is 15, the next instruction is skipped. When the contents of register Y is not 15, the next instruction is executed. Operation: (Y) ← (Y) – 1 MACHINE INSTRUCTIONS (INDEX BY ALPHABET) (continued)
SINGLE-CHIP 4-BIT CMOS MICROCOMPUTER MITSUBISHI MICROCOMPUTERS Flag CY 2 16 Skip conditionNumber of cycles Number of words Instruction code D 9 D 0 Flag CY 2 16 Skip conditionNumber of cycles Number of words Instruction code D 9 D 0 Flag CY 2 16 Skip conditionNumber of cycles Number of words Instruction code D 9 D 0 Flag CY 2 16 DI (Disable Interrupt) 0000000100 004 11 – – Grouping: Interrupt control operation Description:Clears (0) to interrupt enable flag INTE, and disables the interrupt. Note: Interrupt is disabled by executing the DI in- struction after executing 1 machine cycle. Operation: (INTE) ← 0 DWDT (Disable WatchDog Timer) 1010011100 29C 11 – – Grouping: Other operation Description:Stops the watchdog timer function by the WRST instruction after executing the DWDT instruction. Operation: Stop of watchdog timer function enabled EPOF (Enable POF instruction) 0001011011 05B 11 – – Grouping: Other operation Description:Makes the immediate after POF or POF2 in- struction valid by executing the EPOF instruction. Operation: POF instruction, POF2 instruction valid EI (Enable Interrupt) 0000000101 005 11 – – Grouping: Interrupt control operation Description:Sets (1) to interrupt enable flag INTE, and enables the interrupt. Note: Interrupt is enabled by executing the EI in- struction after executing 1 machine cycle. Operation: (INTE) ← 1 MACHINE INSTRUCTIONS (INDEX BY ALPHABET) (continued)
SINGLE-CHIP 4-BIT CMOS MICROCOMPUTER IAK (Input Accumulator from port K) 1001101111 26F 11 – – Grouping: Input/Output operation Description:Transfers the contents of port K to the bit 0 (A0) of register A. Note: After this instruction is executed, “0” is stored to the high-order 3 bits (A3–A 1) of register A. Operation: (A0) ← (K) (A3–A1) ← 0 IAP0 (Input Accumulator from port P0) 1001100000 260 11 – – Grouping: Input/Output operation Description:Transfers the input of port P0 to register A. IAP1 (Input Accumulator from port P1) 1001100001 261 11 – – Grouping: Input/Output operation Description:Transfers the input of port P1 to register A. Operation: (A) ← (P1) IAP2 (Input Accumulator from port P2) 1001100010 262 11 – – Grouping: Input/Output operation Description:Transfers the input of port P2 to the low-or- der 2 bits (A1, A0) of register A. Note: After this instruction is executed, “0” is stored to the high-order 2 bits (A3, A2) of reg- ister A. Operation: (A1, A0) ← (P21, P20) (A3, A2) ← 0 Operation: (A) ← (P0) MACHINE INSTRUCTIONS (INDEX BY ALPHABET) (continued)
SINGLE-CHIP 4-BIT CMOS MICROCOMPUTER MITSUBISHI MICROCOMPUTERS Flag CY 2 16 Skip conditionNumber of cycles Number of words Instruction code D 9 D 0 Flag CY 2 16 Skip conditionNumber of cycles Number of words Instruction code D 9 D 0 Flag CY 2 16 Skip conditionNumber of cycles Number of words Instruction code D 9 D 0 Flag CY 2 16 INY (INcrement register Y) 0000010011 013 1 1 – (Y) = 0 Grouping: RAM addresses Description:Adds 1 to the contents of register Y . As a re- sult of addition, when the contents of register Y is 0, the next instruction is skipped. When the contents of register Y is not 0, the next instruction is executed. Operation: (Y) ← (Y) + 1 LA n (Load n in Accumulator) 000111nnnn 07n 11 – Continuous Grouping: Arithmetic operation Description:Loads the value n in the immediate field to register A. When the LA instructions are continuously coded and executed, only the first LA in- struction is executed and other LA instructions coded continuously are skipped. Operation: (A) ← n n = 0 to 15 LXY x, y (Load register X and Y with x and y) 11x 3 x2 x1 x0 y3 y2 y1 y0 3xy 11 – Continuous Grouping: RAM addresses Description:Loads the value x in the immediate field to register X, and the value y in the immediate field to register Y. When the LXY instructions are continuously coded and executed, only the first LXY instruction is executed and other LXY instructions coded continuously are skipped. Operation: (X) ← x x = 0 to 15 (Y) ← y y = 0 to 15 MACHINE INSTRUCTIONS (INDEX BY ALPHABET) (continued) LZ z (Load register Z with z) 00010010z 1 z0 04 11 – – Grouping: RAM addresses Description:Loads the value z in the immediate field to register Z. Operation: (Z) ← z z = 0 to 3
SINGLE-CHIP 4-BIT CMOS MICROCOMPUTER OP1A (Output port P1 from Accumulator) 1000100001 221 11 – – Grouping: Input/Output operation Description:Outputs the contents of register A to port P1. Operation: (P1) ← (A) NOP (No OPeration) 0000000000 000 11 – – Grouping: Other operation Description:No operation; Adds 1 to program counter value, and others remain unchanged. Operation: (PC) ← (PC) + 1 OKA (Output port K from Accumulator) 1000011111 21F 11 – – Grouping: Input/Output operation Description:Outputs the contents of bit 0 (A0) of register A to port K. OP0A (Output port P0 from Accumulator) 1000100000 220 11 – – Grouping: Input/Output operation Description:Outputs the contents of register A to port P0. Operation: (P0) ← (A) Operation: (K) ← (A0) MACHINE INSTRUCTIONS (INDEX BY ALPHABET) (continued)
SINGLE-CHIP 4-BIT CMOS MICROCOMPUTER MITSUBISHI MICROCOMPUTERS Flag CY 2 16 Skip conditionNumber of cycles Number of words Instruction code D 9 D 0 Flag CY 2 16 Skip conditionNumber of cycles Number of words Instruction code D 9 D 0 Flag CY 2 16 Skip conditionNumber of cycles Number of words Instruction code D 9 D 0 Flag CY 2 16 OP2A (Output port P2 from Accumulator) 1000100010 222 11 – – Grouping: Input/Output operation Description:Outputs the contents of the low-order 2 bits (A1, A0) of register A to port P2. Operation: (P21, P20) ← (A1, A0) OR (logical OR between accumulator and memory) 0000011001 019 11 – – Grouping: Arithmetic operation Description:Takes the OR operation between the con- tents of register A and the contents of M(DP), and stores the result in register A. Operation: (A) ← (A) OR (M(DP)) MACHINE INSTRUCTIONS (INDEX BY ALPHABET) (continued) POF (Power OFf1) 0000000010 002 11 – – Grouping: Other operation Description:Puts the system in RAM back-up state by executing the POF instruction after execut- ing the EPOF instruction. However, the voltage drop detection circuit is valid. Note: If the EPOF instruction is not executed before executing this instruction, this instruction is equivalent to the NOP instruction. POF2 (Power OFf2) 0000001000 008 11 – – Grouping: Other operation Description:Puts the system in RAM back-up state by executing the POF2 instruction after ex- ecuting the EPOF instruction. Operations of all functions are stopped. Note: If the EPOF instruction is not executed be- fore executing this instruction, this instruction is equivalent to the NOP instruc- tion. Operation: RAM back-up Operation: RAM back-up However, voltage drop detection circuit valid
SINGLE-CHIP 4-BIT CMOS MICROCOMPUTER RC (Reset Carry flag) 0000000110 006 11 0 – Grouping: Arithmetic operation Description:Clears (0) to carry flag CY. Operation: (CY) ← 0 RCP (Reset Port C) 1010001100 28C 11 – – Grouping: Input/Output operation Description:Clears (0) to port C. Operation: (C) ← 0 RAR (Rotate Accumulator Right) 0000011101 01D 11 0/1 – Grouping: Arithmetic operation Description:Rotates 1 bit of the contents of register A in- cluding the contents of carry flag CY to the right. Operation: → CY → A 3A2A1A0 RB j (Reset Bit) 00010011j j 04 11 – – Grouping: Bit operation Description:Clears (0) the contents of bit j (bit specified by the value j in the immediate field) of M(DP). Operation: (Mj(DP)) ← 0 j = 0 to 3 C MACHINE INSTRUCTIONS (INDEX BY ALPHABET) (continued)
SINGLE-CHIP 4-BIT CMOS MICROCOMPUTER MITSUBISHI MICROCOMPUTERS Flag CY 2 16 Skip conditionNumber of cycles Number of words Instruction code D 9 D 0 Flag CY 2 16 Skip conditionNumber of cycles Number of words Instruction code D 9 D 0 Flag CY 2 16 Skip conditionNumber of cycles Number of words Instruction code D 9 D 0 Flag CY 2 16 RD (Reset port D specified by register Y) 0000010100 014 11 – – Grouping: Input/Output operation Description:Clears (0) to a bit of port D specified by register Note: Set 0 to 3 to register Y because port D is four ports (D0–D 3). When values except above are set to regis- ter Y , this instruction is equivalent to the NOP instruction. Operation: (D(Y)) ← 0 However, (Y) = 0 to 3 RT (ReTurn from subroutine) 0001000100 044 12 – – Grouping: Return operation Description:Returns from subroutine to the routine called the subroutine. Operation: (PC) ← (SK(SP)) (SP) ← (SP) – 1 MACHINE INSTRUCTIONS (INDEX BY ALPHABET) (continued) RTI (ReTurn from Interrupt) 0001000110 046 11 – – Grouping: Return operation Description:Returns from interrupt service routine to main routine. Returns each value of data pointer (X, Y , Z), carry flag, skip status, NOP mode status by the continuous description of the LA/LXY in- struction, register A and register B to the states just before interrupt. RTS (ReTurn from subroutine and Skip) 0001000101 045 12 – Skip at uncondition Grouping: Return operation Description:Returns from subroutine to the routine called the subroutine, and skips the next instruction at uncondition. Operation: (PC) ← (SK(SP)) (SP) ← (SP) – 1 Operation: (PC) ← (SK(SP)) (SP) ← (SP) – 1
SINGLE-CHIP 4-BIT CMOS MICROCOMPUTER SCP (Set Port C) 1010001101 28D 11 – – Grouping: Input/Output operation Description:Sets (1) to port C. Operation: (C) ← 1 SD (Set port D specified by register Y) 0000010101 015 11 – – Grouping: Input/Output operation Description:Sets (1) to a bit of port D specified by register Y. Note: Set 0 to 3 to register Y because port D is four ports (D0–D 3). When values except above are set to regis- ter Y , this instruction is equivalent to the NOP instruction. Operation: (D(Y)) ← 1 (Y) = 0 to 3 SB j (Set Bit) 00010111j j 05 11 – – Grouping: Bit operation Description:Sets (1) the contents of bit j (bit specified by the value j in the immediate field) of M(DP). Operation: (Mj(DP)) ← 0 j = 0 to 3 SC (Set Carry flag) 0000000111 007 11 1 – Grouping: Arithmetic operation Description:Sets (1) to carry flag CY . Operation: (CY) ← 1 C MACHINE INSTRUCTIONS (INDEX BY ALPHABET) (continued)
SINGLE-CHIP 4-BIT CMOS MICROCOMPUTER MITSUBISHI MICROCOMPUTERS Flag CY 2 16 Skip conditionNumber of cycles Number of words Instruction code D 9 D 0 Flag CY 2 16 Skip conditionNumber of cycles Number of words Instruction code D 9 D 0 Flag CY 2 16 Skip conditionNumber of cycles Number of words Instruction code D 9 D 0 Flag CY 2 16 SEA n (Skip Equal, Accumulator with immediate data n) 0000100101 025 22 – (A) = n Grouping: Comparison operation Description:Skips the next instruction when the contents of register A is equal to the value n in the im- mediate field. Executes the next instruction when the con- tents of register A is not equal to the value n in the immediate field. Operation: (A) = n ? n = 0 to 15 SEAM (Skip Equal, Accumulator with Memory) 0000100110 026 Grouping: Comparison operation Description:Skips the next instruction when the contents of register A is equal to the contents of M(DP). Executes the next instruction when the con- tents of register A is not equal to the contents of M(DP). Operation: (A) = (M(DP)) ? 2 16000111nnnn 07n MACHINE INSTRUCTIONS (INDEX BY ALPHABET) (continued) SNZ0 (Skip if Non Zero condition of external 0 interrupt request flag) 0000111000 038 11 – V10 = 0: (EXF0) = 1 Grouping: Interrupt operation Description:When V1 0 = 0 : Skips the next instruction when external 0 interrupt request flag EXF0 is “1.” After skipping, clears (0) to the EXF0 flag. When the EXF0 flag is “0,” executes the next instruction. When V1 0 = 1 : This instruction is equivalent to the NOP instruction. Operation: V10 = 0: (EXF0) = 1 ? After skipping, (EXF0) ← 0 V10 = 1: SNZ0 = NOP (V10 : bit 0 of the interrupt control register V1) SNZAD (Skip if Non Zero condition of A-D conversion completion flag) 1010000111 287 Grouping: A-D conversion operation Description:When V2 2 = 0 : Skips the next instruction when A-D conversion completion flag ADF is “1.” After skipping, clears (0) to the ADF flag. When the ADF flag is “0,” executes the next instruction. When V2 2 = 1 : This instruction is equivalent to the NOP instruction. Operation: V22 = 0: (ADF) = 1 ? After skipping, (ADF) ← 0 V22 = 1: SNZAD = NOP (V22 : bit 2 of the interrupt control register V2)
SINGLE-CHIP 4-BIT CMOS MICROCOMPUTER SNZP (Skip if Non Zero condition of Power down flag) 0000000011 003 11 – (P) = 1 Grouping: Other operation Description:Skips the next instruction when the P flag is “1”. After skipping, the P flag remains un- changed. Executes the next instruction when the P flag is “0.” SNZT1 (Skip if Non Zero condition of Timer 1 inerrupt request flag) 1010000000 280 Grouping: Timer operation Description:When V1 2 = 0 : Skips the next instruction when timer 1 interrupt request flag T1F is “1.” After skipping, clears (0) to the T1F flag. When the T1F flag is “0,” executes the next instruction. When V1 2 = 1 : This instruction is equivalent to the NOP instruction. Operation: V12 = 0: (T1F) = 1 ? After skipping, (T1F) ← 0 V12 = 1: SNZT1 = NOP (V12 = bit 2 of interrupt control register V1) Operation: (P) = 1 ? SNZCP (Skip if Non Zero condition of Port C) 1010001001 289 1 1 – (C) = 1 Grouping: Input/Output operation Description:Skips the next instruction when the contents of port C is “1.” Executes the next instruction when the con- tents of port C is “0.” Operation: (C) = 1 ? SNZI0 (Skip if Non Zero condition of external 0 Interrupt input pin) 0000111010 03A Grouping: Interrupt operation Description:When I1 2 = 0 : Skips the next instruction when the level of INT pin is “L.” Executes the next instruction when the level of INT pin is “H.” When I1 2 = 1 : Skips the next instruction when the level of INT pin is “H.” Executes the next instruction when the level of INT pin is “L.” Operation: I1 (I12 : bit 2 of the interrupt control register I1) MACHINE INSTRUCTIONS (INDEX BY ALPHABET) (continued)
SINGLE-CHIP 4-BIT CMOS MICROCOMPUTER MITSUBISHI MICROCOMPUTERS Flag CY 2 16 Skip conditionNumber of cycles Number of words Instruction code D 9 D 0 Flag CY 2 16 Skip conditionNumber of cycles Number of words Instruction code D 9 D 0 Flag CY 2 16 Skip conditionNumber of cycles Number of words Instruction code D 9 D 0 Flag CY 2 16 SZB j (Skip if Zero, Bit) 00001000j j 02j 11 – (Mj(DP)) = 0 j = 0 to 3 Grouping: Bit operation Description:Skips the next instruction when the contents of bit j (bit specified by the value j in the im- mediate field) of M(DP) is “0.” Executes the next instruction when the con- tents of bit j of M(DP) is “1.” Operation: (Mj(DP)) = 0 ? j = 0 to 3 SNZT2 (Skip if Non Zero condition of Timer 2 inerrupt request flag) 1010000001 281 11 – V 1 3 = 0: (T2F) = 1 Grouping: Timer operation Description:When V1 3 = 0 : Skips the next instruction when timer 2 interrupt request flag T2F is “1.” After skipping, clears (0) to the T2F flag. When the T2F flag is “0,” executes the next instruction. When V1 3 = 1 : This instruction is equivalent to the NOP instruction. Operation: V13 = 0: (T2F) = 1 ? After skipping, (T2F) ← 0 V13 = 1: SNZT2 = NOP (V13 = bit 3 of interrupt control register V1) MACHINE INSTRUCTIONS (INDEX BY ALPHABET) (continued) SZC (Skip if Zero, Carry flag) 0000101111 02F 11 – (CY) = 0 Grouping: Arithmetic operation Description:Skips the next instruction when the contents of carry flag CY is “0.” After skipping, the CY flag remains un- changed. Executes the next instruction when the con- tents of the CY flag is “1.“ Operation: (CY) = 0 ? SZD (Skip if Zero, port D specified by register Y) 0000100100 024 22 – (D(Y)) = 0 (Y) = 0 to 3 Grouping: Input/Output operation Description:Skips the next instruction when a bit of port D specified by register Y is “0.” Executes the next instruction when the bit is “1.” Note: Set 0 to 3 to register Y because port D is four ports (D0–D 3). When values except above are set to register Y, this instruction is equivalent to the NOP instruction. Operation: (D(Y)) = 0 ? (Y) = 0 to 3 2 160000101011 02B
SINGLE-CHIP 4-BIT CMOS MICROCOMPUTER TAB (Transfer data to Accumulator from register B) 0000011110 01E 11 – – Grouping: Other operation Description:Transfers the contents of register B to regis- ter A. TAB1 (Transfer data to Accumulator and register B from timer 1) 1001110000 270 11 – – Grouping: Timer operation Description:Transfers the high-order 4 bits (T17–T14) of timer 1 to register B. Transfers the low-order 4 bits (T1 3–T10) of timer 1 to register A. Operation: (B) ← (T17–T14) (A) ← (T13–T10) Operation: (A) ← (B) T1AB (Transfer data to timer 1 and register R1 from Accumulator and register B) 1000110000 230 11 – – Grouping: Timer operation Description:Transfers the contents of register B to the high-order 4 bits of timer 1 and timer 1 re- load register R1. Transfers the contents of register A to the low-order 4 bits of timer 1 and timer 1 reload register R1. Operation: (T1 7–T14) ← (B) (R17–R1 4) ← (B) (T13–T10) ← (A) (R13–R1 0) ← (A) T2AB (Transfer data to timer 2 and register R2 from Accumulator and register B) 1000110001 231 11 – – Grouping: Timer operation Description:Transfers the contents of register B to the high-order 4 bits of timer 2 and timer 2 re- load register R2. Transfers the contents of register A to the low-order 4 bits of timer 2 and timer 2 reload register R2. Operation: (T2 7–T24) ← (B) (R27–R2 4) ← (B) (T23–T20) ← (A) (R23–R2 0) ← (A) MACHINE INSTRUCTIONS (INDEX BY ALPHABET) (continued)
SINGLE-CHIP 4-BIT CMOS MICROCOMPUTER MITSUBISHI MICROCOMPUTERS Flag CY 2 16 Skip conditionNumber of cycles Number of words Instruction code D 9 D 0 Flag CY 2 16 Skip conditionNumber of cycles Number of words Instruction code D 9 D 0 Flag CY 2 16 Skip conditionNumber of cycles Number of words Instruction code D 9 D 0 Flag CY 2 16 TAB2 (Transfer data to Accumulator and register B from timer 2) 1001110001 271 11 – – Grouping: Timer operation Description:Transfers the high-order 4 bits (T27–T24) of timer 2 to register B. Transfers the low-order 4 bits (T2 3–T20) of timer 2 to register A. Operation: (B) ← (T27–T24) (A) ← (T23–T20) TABAD (Transfer data to Accumulator and register B from register AD) 1001111001 279 11 – – Grouping: A-D conversion operation Description: In the A-D conversion mode (Q13 = 0), trans- fers the high-order 4 bits (AD9–AD 6) of register AD to register B, and the middle-order 4 bits (AD5–AD 2) of register AD to register A. In the comparator mode (Q13 = 1), transfers the middle-order 4 bits (AD7–AD 4) of register AD to register B, and the low-order 4 bits (AD 3–AD 0) of register AD to register A. Operation: In A-D conversion mode (Q13 = 0), (B) ← (AD9–AD 6) (A) ← (AD5–AD 2) In comparator mode (Q13 = 1), (B) ← (AD7–AD 4) (A) ← (AD3–AD 0) (Q13 : bit 3 of A-D control register Q1) MACHINE INSTRUCTIONS (INDEX BY ALPHABET) (continued) TABE (Transfer data to Accumulator and register B from register E) 0000101010 02A 11 – – Grouping: Register to register transfer Description:Transfers the high-order 4 bits (E7–E 4) of register E to register B, and low-order 4 bits of register E to register A. Operation: (B) ← (E 7–E4) (A) ← (E3–E0) TABP p (Transfer data to Accumulator and register B from Program memory in page p) 00100p 4 p3 p2 p1 p0 0p 13 – – Grouping: Arithmetic operation Description: Transfers bits 7 to 4 to register B and bits 3 to 0 to register A. These bits 7 to 0 are the ROM pattern in ad-dress (DR2 DR 1 DR 0 A3 A2 A1 A0)2 specified by registers A and D in page p. Note: p is 0 to 15 for M34501M2, and p is 0 to 31 for M34501M4/E4. When this instruction is executed, be careful not to over the stack because 1 stage of stack register is used. Operation: (SP) ← (SP) + 1 (SK(SP)) ← (PC) (PC H ) ← p (PCL) ← (DR2–DR 0, A3–A0) (B) ← (ROM(PC))7–4 (A) ← (ROM(PC))3–0 (PC) ← (SK(SP)) (SP) ← (SP) – 1
SINGLE-CHIP 4-BIT CMOS MICROCOMPUTER TAD (Transfer data to Accumulator from register D) 0001010001 051 11 – – Grouping: Register to register transfer Description:Transfers the contents of register D to the low-order 3 bits (A2–A0) of register A. Note: When this instruction is executed, “0” is stored to the bit 3 (A3) of register A. TADAB (Transfer data to register AD from Accumulator from register B) 1000111001 239 11 – – Grouping: A-D conversion operation Description:In the A-D conversion mode (Q13 = 0), this instruction is equivalent to the NOP instruc- tion. In the comparator mode (Q13 = 1), transfers the contents of register B to the high-order 4 bits (AD7–AD 4) of comparator register, and the contents of register A to the low-order 4 bits (AD 3–AD 0) of comparator register. (Q13 = bit 3 of A-D control register Q1) Operation: (AD7–AD 4) ← (B) (AD3–AD 0) ← (A) Operation: (A2–A0) ← (DR2–DR 0) (A3) ← 0 MACHINE INSTRUCTIONS (INDEX BY ALPHABET) (continued) TAI1 (Transfer data to Accumulator from register I1) 1001010011 253 11 – – Grouping: Interrupt operation Description:Transfers the contents of interrupt control register I1 to register A. Operation: (A) ← (I1) TAK0 (Transfer data to Accumulator from register K0) 1001010110 256 11 – – Grouping: Input/Output operation Description:Transfers the contents of key-on wakeup control register K0 to register A. Operation: (A) ← (K0)
SINGLE-CHIP 4-BIT CMOS MICROCOMPUTER MITSUBISHI MICROCOMPUTERS Flag CY 2 16 Skip conditionNumber of cycles Number of words Instruction code Flag CY 2 16 Skip conditionNumber of cycles Number of words Instruction code Flag CY 2 16 Skip conditionNumber of cycles Number of words Instruction code Flag CY 2 16 D 9 D 0 D 9 D 0 D 9 D 0 D 9 D 0 TAK1 (Transfer data to Accumulator from register K1) 1001011001 259 11 – – Grouping: Input/Output operation Description:Transfers the contents of key-on wakeup control register K1 to register A. Operation: (A) ← (K1) TAK2 (Transfer data to Accumulator from register K2) 1001011010 25A 11 – – Grouping: Input/Output operation Description:Transfers the contents of key-on wakeup control register K2 to register A. Operation: (A) ← (K2) MACHINE INSTRUCTIONS (INDEX BY ALPHABET) (continued) TALA (Transfer data to Accumulator from register LA) 1001001001 249 11 – – Grouping: A-D conversion operation Description:Transfers the low-order 2 bits (AD1, AD0) of register AD to the high-order 2 bits (A3, A2) of register A. Note: After this instruction is executed, “0” is stored to the low-order 2 bits (A1, A0) of register A. Operation: (A3, A2) ← (AD1, AD0) (A1, A0) ← 0 TAM j (Transfer data to Accumulator from Memory) 101100 jjjj 2 C j 11 – – Grouping: RAM to register transfer Description:After transferring the contents of M(DP) to register A, an exclusive OR operation is per- formed between register X and the value j in the immediate field, and stores the result in register X. Operation: (A) ← (M(DP)) (X) ← (X)EXOR(j) j = 0 to 15
SINGLE-CHIP 4-BIT CMOS MICROCOMPUTER TAMR (Transfer data to Accumulator from register MR) 1001010010 252 11 – – Grouping: Other operation Description:Transfers the contents of clock control reg- ister MR to register A. Operation: (A) ← (MR) TAQ1 (Transfer data to Accumulator from register Q1) 1001000100 244 11 – – Grouping: A-D conversion operation Description:Transfers the contents of A-D control regis- ter Q1 to register A. Operation: (A) ← (Q1) MACHINE INSTRUCTIONS (INDEX BY ALPHABET) (continued) TASP (Transfer data to Accumulator from Stack Pointer) 0001010000 050 11 – – Grouping: Register to register transfer Description:Transfers the contents of stack pointer (SP) to the low-order 3 bits (A2–A0) of register A. Note: After this instruction is executed, “0” is stored to the bit 3 (A3) of register A. TAV1 (Transfer data to Accumulator from register V1) 0001010100 054 11 – – Grouping: Interrupt operation Description:Transfers the contents of interrupt control register V1 to register A. Operation: (A) ← (V1) Operation: (A2–A0) ← (SP2–SP 0) (A3) ← 0
SINGLE-CHIP 4-BIT CMOS MICROCOMPUTER MITSUBISHI MICROCOMPUTERS Flag CY 2 16 Skip conditionNumber of cycles Number of words Instruction code Flag CY 2 16 Skip conditionNumber of cycles Number of words Instruction code Flag CY 2 16 Skip conditionNumber of cycles Number of words Instruction code Flag CY 2 16 D 9 D 0 D 9 D 0 D 9 D 0 D 9 D 0 TAV2 (Transfer data to Accumulator from register V2) 0001010101 055 11 – – Grouping: Interrupt operation Description:Transfers the contents of interrupt control register V2 to register A. Operation: (A) ← (V2) TAW1 (Transfer data to Accumulator from register W1) 1001001011 24B 11 – – Grouping: Timer operation Description:Transfers the contents of timer control reg- ister W1 to register A. Operation: (A) ← (W1) MACHINE INSTRUCTIONS (INDEX BY ALPHABET) (continued) TAW2 (Transfer data to Accumulator from register W2) 1001001100 24C 11 – – Grouping: Timer operation Description:Transfers the contents of timer control regis- ter W2 to register A. Operation: (A) ← (W2) TAW6 (Transfer data to Accumulator from register W6) 1001010000 250 11 – – Grouping: Timer operation Description:Transfers the contents of timer control regis- ter W6 to register A. Operation: (A) ← (W6)
SINGLE-CHIP 4-BIT CMOS MICROCOMPUTER TAX (Transfer data to Accumulator from register X) 0001010010 052 11 – – Grouping: Register to register transfer Description:Transfers the contents of register X to reg- ister A. Operation: (A) ← (X) TAY (Transfer data to Accumulator from register Y) 0000011111 01F 11 – – Grouping: Register to register transfer Description:Transfers the contents of register Y to regis- ter A. Operation: (A) ← (Y) MACHINE INSTRUCTIONS (INDEX BY ALPHABET) (continued) TBA (Transfer data to register B from Accumulator) 0000001110 00E 11 – – Grouping: Register to register transfer Description:Transfers the contents of register A to regis- ter B. Operation: (B) ← (A) TAZ (Transfer data to Accumulator from register Z) 0001010011 053 11 – – Grouping: Register to register transfer Description:Transfers the contents of register Z to the low-order 2 bits (A1, A0) of register A. Note: After this instruction is executed, “0” is stored to the high-order 2 bits (A3, A2) of register A. Operation: (A1, A0) ← (Z1, Z0) (A3, A2) ← 0
SINGLE-CHIP 4-BIT CMOS MICROCOMPUTER MITSUBISHI MICROCOMPUTERS Flag CY 2 16 Skip conditionNumber of cycles Number of words Instruction code Flag CY 2 16 Skip conditionNumber of cycles Number of words Instruction code Flag CY 2 16 Skip conditionNumber of cycles Number of words Instruction code Flag CY 2 16 D 9 D 0 D 9 D 0 D 9 D 0 D 9 D 0 TDA (Transfer data to register D from Accumulator) 0000101001 029 11 – – Grouping: Register to register transfer Description:Transfers the contents of the low-order 3 bits (A2–A0) of register A to register D. Operation: (DR 2–DR 0) ← (A2–A0) TEAB (Transfer data to register E from Accumulator and register B) 0000011010 01A 11 – – Grouping: Register to register transfer Description:Transfers the contents of register B to the high-order 4 bits (E3–E 0) of register E, and the contents of register A to the low-order 4 bits (E3–E0) of register E. Operation: (E7–E4) ← (B) (E3–E0) ← (A) MACHINE INSTRUCTIONS (INDEX BY ALPHABET) (continued) TI1A (Transfer data to register I1 from Accumulator) 1000010111 217 11 – – Grouping: Interrupt operation Description:Transfers the contents of register A to inter- rupt control register I1. Operation: (I1) ← (A) TK0A (Transfer data to register K0 from Accumulator) 1000011011 21B 11 – – Grouping: Input/Output operation Description:Transfers the contents of register A to key-on wakeup control register K0. Operation: (K0) ← (A)
SINGLE-CHIP 4-BIT CMOS MICROCOMPUTER TK1A (Transfer data to register K1 from Accumulator) 1000010100 214 11 – – Grouping: Input/Output operation Description:Transfers the contents of register A to key- on wakeup control register K1. TK2A (Transfer data to register K2 from Accumulator) 1000010101 215 11 – – Grouping: Input/Output operation Description:Transfers the contents of register A to key- on wakeup control register K2. Operation: (K2) ← (A) Operation: (K1) ← (A) MACHINE INSTRUCTIONS (INDEX BY ALPHABET) (continued) TMA j (Transfer data to Memory from Accumulator) 101011 jjjj 2 B j 11 – – Grouping: RAM to register transfer Description:After transferring the contents of register A to M(DP), an exclusive OR operation is per- formed between register X and the value j in the immediate field, and stores the result in register X. Operation: (M(DP)) ← (A) (X) ← (X)EXOR(j) j = 0 to 15 TMRA (Transfer data to register MR from Accumulator) 1000010110 216 11 – – Grouping: Other operation Description:Transfers the contents of register A to clock control register MR. Operation: (MR) ← (A)
SINGLE-CHIP 4-BIT CMOS MICROCOMPUTER MITSUBISHI MICROCOMPUTERS Flag CY 2 16 Skip conditionNumber of cycles Number of words Instruction code Flag CY 2 16 Skip conditionNumber of cycles Number of words Instruction code Flag CY 2 16 Skip conditionNumber of cycles Number of words Instruction code Flag CY 2 16 D 9 D 0 D 9 D 0 D 9 D 0 D 9 D 0 TPU0A (Transfer data to register PU0 from Accumulator) 1000101101 22D 11 – – Grouping: Input/Output operation Description:Transfers the contents of register A to pull- up control register PU0. Operation: (PU0) ← (A) TPU1A (Transfer data to register PU1 from Accumulator) 1000101110 22E 11 – – Grouping: Input/Output operation Description:Transfers the contents of register A to pull- up control register PU1. Operation: (PU1) ← (A) MACHINE INSTRUCTIONS (INDEX BY ALPHABET) (continued) TQ1A (Transfer data to register Q1 from Accumulator) 1000000100 204 11 – – Grouping: A-D conversion operation Description:Transfers the contents of register A to A-D control register Q1. Operation: (Q1) ← (A) TPU2A (Transfer data to register PU2 from Accumulator) 1000101111 22F 11 – – Grouping: Input/Output operation Description:Transfers the contents of register A to pull-up control register PU2. Operation: (PU2) ← (A)
SINGLE-CHIP 4-BIT CMOS MICROCOMPUTER TR1AB (Transfer data to register R1 from Accumulator and register B) 1000111111 23F 11 – – Grouping: Timer operation Description:Transfers the contents of register B to the high-order 4 bits (R17–R1 4) of reload regis- ter R1, and the contents of register A to the low-order 4 bits (R13–R1 0) of reload regis- ter R1. TV1A (Transfer data to register V1 from Accumulator) 0000111111 03F 11 – – Grouping: Interrupt operation Description:Transfers the contents of register A to inter- rupt control register V1. Operation: (V1) ← (A) Operation: (R17–R1 4) ← (B) (R13–R1 0) ← (A) MACHINE INSTRUCTIONS (INDEX BY ALPHABET) (continued) TW1A (Transfer data to register W1 from Accumulator) 1000001110 20E 11 – – Grouping: Timer operation Description:Transfers the contents of register A to timer control register W1. Operation: (W1) ← (A) TV2A (Transfer data to register V2 from Accumulator) 0000111110 03E 11 – – Grouping: Interrupt operation Description:Transfers the contents of register A to inter- rupt control register V2. Operation: (V2) ← (A)
SINGLE-CHIP 4-BIT CMOS MICROCOMPUTER MITSUBISHI MICROCOMPUTERS Flag CY 2 16 Skip conditionNumber of cycles Number of words Instruction code Flag CY 2 16 Skip conditionNumber of cycles Number of words Instruction code Flag CY 2 16 Skip conditionNumber of cycles Number of words Instruction code Flag CY 2 16 D 9 D 0 D 9 D 0 D 9 D 0 D 9 D 0 TW2A (Transfer data to register W2 from Accumulator) 1000001111 20F 11 – – Grouping: Timer operation Description:Transfers the contents of register A to timer control register W2. Operation: (W2) ← (A) TW6A (Transfer data to register W6 from Accumulator) 1000010011 213 11 – – Grouping: Timer operation Description:Transfers the contents of register A to timer control register W6. Operation: (W6) ← (A) MACHINE INSTRUCTIONS (INDEX BY ALPHABET) (continued) TYA (Transfer data to register Y from Accumulator) 0000001100 00C 11 – – Grouping: Register to register transfer Description:Transfers the contents of register A to regis- ter Y. Operation: (Y) ← (A) WRST (Watchdog timer ReSeT) 1010100000 2A0 1 1 – (WDF1) = 1 Grouping: Other operation Description:Skips the next instruction when watchdog timer flag WDF1 is “1.” After skipping, clears (0) to the WDF1 flag. When the WDF1 flag is “0,” executes the next instruction. Also, stops the watchdog timer function when ex- ecuting the WRST instruction immediately after the DWDT instruction. Operation: (WDF1) = 1 ? After skipping, (WDF1) ← 0
SINGLE-CHIP 4-BIT CMOS MICROCOMPUTER XAM j (eXchange Accumulator and Memory data) 101101 jjjj 2 D j 11 – – Grouping: RAM to register transfer Description:After exchanging the contents of M(DP) with the contents of register A, an exclusive OR operation is performed between regis- ter X and the value j in the immediate field, and stores the result in register X. XAMD j (eXchange Accumulator and Memory data and Decrement register Y and skip) 101111 jjjj 2 F j 11 – (Y) = 15 Grouping: RAM to register transfer Description:After exchanging the contents of M(DP) with the contents of register A, an exclusive OR operation is performed between regis- ter X and the value j in the immediate field, and stores the result in register X. Subtracts 1 from the contents of register Y. As a result of subtraction, when the con- tents of register Y is 15, the next instruction is skipped. When the contents of register Y is not 15, the next instruction is executed. Operation: (A) ←→ (M(DP)) (X) ← (X)EXOR(j) j = 0 to 15 (Y) ← (Y) – 1 Operation: (A) ←→ (M(DP)) (X) ← (X)EXOR(j) j = 0 to 15 MACHINE INSTRUCTIONS (INDEX BY ALPHABET) (continued) XAMI j (eXchange Accumulator and Memory data and Increment register Y and skip) 101110 jjjj 2 E j 11 – (Y) = 0 Grouping: RAM to register transfer Description:After exchanging the contents of M(DP) with the contents of register A, an exclusive OR operation is performed between regis- ter X and the value j in the immediate field, and stores the result in register X. Adds 1 to the contents of register Y . As a re- sult of addition, when the contents of register Y is 0, the next instruction is skipped. when the contents of register Y is not 0, the next instruction is executed. Operation: (A) ←→ (M(DP)) (X) ← (X)EXOR(j) j = 0 to 15 (Y) ← (Y) + 1
Parameter Instruction code Function Number of cycles Number of words Mnemonic Type of instructions D 9 D 8 D 7 D 6 D 5 D 4 D 3 D 2 D 1 D 0 Hexadecimal notation SINGLE-CHIP 4-BIT CMOS MICROCOMPUTER MITSUBISHI MICROCOMPUTERS (A) ← (B) (B) ← (A) (A) ← (Y) (Y) ← (A) (E7–E4) ← (B) (E3–E0) ← (A) (B) ← (E7–E4) (A) ← (E3–E0) (DR 2–DR 0) ← (A2–A0) (A2–A0) ← (DR2–DR 0) (A3) ← 0 (A3, A2) ← 0 (A) ← (X) (A2–A0) ← (SP2–SP 0) (A3) ← 0 (X) ← x x = 0 to 15 (Y) ← y y = 0 to 15 (Z) ← z z = 0 to 3 (Y) ← (Y) + 1 (Y) ← (Y) – 1 (A) ← (M(DP)) (X) ← (X)EXOR(j) j = 0 to 15 (A) ← → (M(DP)) (X) ← (X)EXOR(j) j = 0 to 15 (A) ← → (M(DP)) (X) ← (X)EXOR(j) j = 0 to 15 (Y) ← (Y) – 1 (A) ← → (M(DP)) (X) ← (X)EXOR(j) j = 0 to 15 (Y) ← (Y) + 1 (M(DP)) ← (A) (X) ← (X)EXOR(j) j = 0 to 15 TAB TBA TAY TYA TEAB TABE TDA TAD TAZ TAX TASP LXY x, y LZ z INY DEY TAM j XAM j XAMD j XAMI j TMA j MACHINE INSTRUCTIONS (INDEX BY TYPES) 0000011110 0000001110 0000011111 0000001100 0000011010 0000101010 0000101001 0001010001 0001010011 0001010010 0001010000 11x 3 x2 x1 x0 y3 y2 y1 y0 00010010z 1 z0 0000010011 0000010111 101100 jjjj 101101 jjjj 101111 jjjj 101110 jjjj 101011 jjjj 01E 00E 01F 00C 01A 02A 029 051 053 052 050 3xy 048 013 017 2C j 2D j 2Fj 2Ej 2Bj RAM addresses RAM to register transfer Register to register transfer
Skip condition Datailed description Carry flag CY SINGLE-CHIP 4-BIT CMOS MICROCOMPUTER MITSUBISHI MICROCOMPUTERS Continuous (Y) = 0 (Y) = 15 (Y) = 15 (Y) = 0 Transfers the contents of register B to register A. Transfers the contents of register A to register B. Transfers the contents of register Y to register A. Transfers the contents of register A to register Y. Transfers the contents of register B to the high-order 4 bits (E 3–E0) of register E, and the contents of regis- ter A to the low-order 4 bits (E3–E0) of register E. Transfers the high-order 4 bits (E7–E4) of register E to register B, and low-order 4 bits of register E to regis- ter A. Transfers the contents of the low-order 3 bits (A2–A0) of register A to register D. Transfers the contents of register D to the low-order 3 bits (A2–A0) of register A. Transfers the contents of register Z to the low-order 2 bits (A1, A0) of register A. Transfers the contents of register X to register A. Transfers the contents of stack pointer (SP) to the low-order 3 bits (A2–A0) of register A. Loads the value x in the immediate field to register X, and the value y in the immediate field to register Y. When the LXY instructions are continuously coded and executed, only the first LXY instruction is executed and other LXY instructions coded continuously are skipped. Loads the value z in the immediate field to register Z. Adds 1 to the contents of register Y. As a result of addition, when the contents of register Y is 0, the next in- struction is skipped. When the contents of register Y is not 0, the next instruction is executed. Subtracts 1 from the contents of register Y. As a result of subtraction, when the contents of register Y is 15, the next instruction is skipped. When the contents of register Y is not 15, the next instruction is executed. After transferring the contents of M(DP) to register A, an exclusive OR operation is performed between reg- ister X and the value j in the immediate field, and stores the result in register X. After exchanging the contents of M(DP) with the contents of register A, an exclusive OR operation is per- formed between register X and the value j in the immediate field, and stores the result in register X. After exchanging the contents of M(DP) with the contents of register A, an exclusive OR operation is per- formed between register X and the value j in the immediate field, and stores the result in register X. Subtracts 1 from the contents of register Y. As a result of subtraction, when the contents of register Y is 15, the next instruction is skipped. When the contents of register Y is not 15, the next instruction is executed. After exchanging the contents of M(DP) with the contents of register A, an exclusive OR operation is per- formed between register X and the value j in the immediate field, and stores the result in register X. Adds 1 to the contents of register Y. As a result of addition, when the contents of register Y is 0, the next in- struction is skipped. when the contents of register Y is not 0, the next instruction is executed. After transferring the contents of register A to M(DP), an exclusive OR operation is performed between reg- ister X and the value j in the immediate field, and stores the result in register X.
Parameter Instruction code Function Number of cycles Number of words Mnemonic Type of instructions D 9 D 8 D 7 D 6 D 5 D 4 D 3 D 2 D 1 D 0 Hexadecimal notation SINGLE-CHIP 4-BIT CMOS MICROCOMPUTER MITSUBISHI MICROCOMPUTERS Note :p is 0 to 15 for M34501M2, p is 0 to 31 for M34501M4/E4. MACHINE INSTRUCTIONS (INDEX BY TYPES) (continued) 07n 08p 00A 00B 06n 018 019 007 006 02F 01C 01D 05C 04C 02j 026 025 07n 000111nnnn 00100p 4 p3 p2 p1 p0 0000001010 0000001011 000110nnnn 0000011000 0000011001 0000000111 0000000110 0000101111 0000011100 0000011101 00010111j j 00010011j j 00001000j j 0000100110 0000100101 000111nnnn LA n TABP p AM AMC A n AND OR SC RC SZC CMA RAR SB j RB j SZB j SEAM SEA n Arithmetic operation Comparison operation Bit operation (A) ← n n = 0 to 15 (SP) ← (SP) + 1 (SK(SP)) ← (PC) (PCH ) ← p (Note) (PCL) ← (DR2–DR 0, A3–A0) (B) ← (ROM(PC))7–4 (A) ← (ROM(PC))3–0 (PC) ← (SK(SP)) (SP) ← (SP) – 1 (A) ← (A) + (M(DP)) (A) ← (A) + (M(DP)) +(CY) (CY) ← Carry (A) ← (A) + n n = 0 to 15 (A) ← (A) AND (M(DP)) (A) ← (A) OR (M(DP)) (CY) ← 1 (CY) ← 0 (CY) = 0 ? (A) ← (A) → CY → A 3A2A1A0 (Mj(DP)) ← 1 j = 0 to 3 (Mj(DP)) ← 0 j = 0 to 3 (Mj(DP)) = 0 ? j = 0 to 3 (A) = (M(DP)) ? (A) = n ? n = 0 to 15
Skip condition Datailed description Carry flag CY SINGLE-CHIP 4-BIT CMOS MICROCOMPUTER MITSUBISHI MICROCOMPUTERS Continuous Overflow = 0 (CY) = 0 (Mj(DP)) = 0 j = 0 to 3 (A) = (M(DP)) (A) = n Loads the value n in the immediate field to register A. When the LA instructions are continuously coded and executed, only the first LA instruction is executed and other LA instructions coded continuously are skipped. Transfers bits 7 to 4 to register B and bits 3 to 0 to register A. These bits 7 to 0 are the ROM pattern in ad- dress (DR 2 DR1 DR0 A3 A2 A1 A0)2 specified by registers A and D in page p. When this instruction is executed, be careful not to over the stack because 1 stage of stack register is used. Adds the contents of M(DP) to register A. Stores the result in register A. The contents of carry flag CY re- mains unchanged. Adds the contents of M(DP) and carry flag CY to register A. Stores the result in register A and carry flag CY . Adds the value n in the immediate field to register A, and stores a result in register A. The contents of carry flag CY remains unchanged. Skips the next instruction when there is no overflow as the result of operation. Executes the next instruction when there is overflow as the result of operation. Takes the AND operation between the contents of register A and the contents of M(DP), and stores the re- sult in register A. Takes the OR operation between the contents of register A and the contents of M(DP), and stores the result in register A. Sets (1) to carry flag CY . Clears (0) to carry flag CY. Skips the next instruction when the contents of carry flag CY is “0.” Stores the one’s complement for register A’s contents in register A. Rotates 1 bit of the contents of register A including the contents of carry flag CY to the right. Sets (1) the contents of bit j (bit specified by the value j in the immediate field) of M(DP). Clears (0) the contents of bit j (bit specified by the value j in the immediate field) of M(DP). Skips the next instruction when the contents of bit j (bit specified by the value j in the immediate field) of M(DP) is “0.” Executes the next instruction when the contents of bit j of M(DP) is “1.” Skips the next instruction when the contents of register A is equal to the contents of M(DP). Executes the next instruction when the contents of register A is not equal to the contents of M(DP). Skips the next instruction when the contents of register A is equal to the value n in the immediate field. Executes the next instruction when the contents of register A is not equal to the value n in the immediate field.
Parameter Instruction code Function Number of cycles Number of words Mnemonic Type of instructions D 9 D 8 D 7 D 6 D 5 D 4 D 3 D 2 D 1 D 0 Hexadecimal notation SINGLE-CHIP 4-BIT CMOS MICROCOMPUTER MITSUBISHI MICROCOMPUTERS B a BL p, a BLA p BM a BML p, a BMLA p RTI RT RTS 011a 6 a5 a4 a3 a2 a1 a0 00111p 4 p3 p2 p1 p0 100a 6 a5 a4 a3 a2 a1 a0 0000010000 100p 4 00p 3 p2 p1 p0 010a 6 a5 a4 a3 a2 a1 a0 00110p 4 p3 p2 p1 p0 100a 6 a5 a4 a3 a2 a1 a0 0000110000 100p 4 00p 3 p2 p1 p0 0001000110 0001000100 0001000101 18a 0Ep 2aa 010 2pp 1aa 0C p 2aa 030 2pp 046 044 045 Subroutine operation Return operation MACHINE INSTRUCTIONS (continued) (PCL) ← a6–a0 (PCH ) ← p (Note) (PCL) ← a6–a0 (PCH ) ← p (Note) (PCL) ← (DR2–DR 0, A3–A0) (SP) ← (SP) + 1 (SK(SP)) ← (PC) (PCH ) ← 2 (PCL) ← a6–a0 (SP) ← (SP) + 1 (SK(SP)) ← (PC) (PCH ) ← p (Note) (PCL) ← a6–a0 (SP) ← (SP) + 1 (SK(SP)) ← (PC) (PCH ) ← p (Note) (PCL) ← (DR2–DR 0,A3–A0) (PC) ← (SK(SP)) (SP) ← (SP) – 1 (PC) ← (SK(SP)) (SP) ← (SP) – 1 (PC) ← (SK(SP)) (SP) ← (SP) – 1 Branch operation Note :p is 0 to 15 for M34501M2, p is 0 to 31 for M34501M4/E4.
Skip condition Datailed description Carry flag CY SINGLE-CHIP 4-BIT CMOS MICROCOMPUTER MITSUBISHI MICROCOMPUTERS Skip at uncondition Branch within a page : Branches to address a in the identical page. Branch out of a page : Branches to address a in page p. Branch out of a page : Branches to address (DR
2 DR1 DR0 A3 A2 A1 A0)2 specified by registers D and A in
page p. Call the subroutine in page 2 : Calls the subroutine at address a in page 2. Call the subroutine : Calls the subroutine at address a in page p. Call the subroutine : Calls the subroutine at address (DR2 DR1 DR0 A3 A2 A1 A0)2 specified by registers D and A in page p. Returns from interrupt service routine to main routine. Returns each value of data pointer (X, Y, Z), carry flag, skip status, NOP mode status by the continuous de- scription of the LA/LXY instruction, register A and register B to the states just before interrupt. Returns from subroutine to the routine called the subroutine. Returns from subroutine to the routine called the subroutine, and skips the next instruction at uncondition.
(INTE) ← 0 (INTE) ← 1 After skipping, (EXF0) ← 0 V10 = 1: SNZ0 = NOP (A) ← (V1) (V1) ← (A) (A) ← (V2) (V2) ← (A) (A) ← (I1) (I1) ← (A) (A) ← (W1) (W1) ← (A) (A) ← (W2) (W2) ← (A) (A) ← (W6) (W6) ← (A) (B) ← (T17–T14) (A) ← (T13–T10) (T17–T14) ← (B) (R17–R1 4) ← (B) (T13–T10) ← (A) (R13–R1 0) ← (A) (B) ← (T27–T24) (A) ← (T23–T20) (T27–T24) ← (B) (R27–R2 4) ← (B) (T23–T20) ← (A) (R23–R2 0) ← (A) (R17–R1 4) ← (B) (R13–R1 0) ← (A) After skipping, (T1F) ← 0 V12 = 1: SNZT1 = NOP After skipping, (T2F) ← 0 V13 = 1: SNZT2 = NOP 004 005 038 03A 054 03F 055 03E 253 217 24B 20E 24C 20F 250 213 270 230 271 231 23F 280 281 0000000100 0000000101 0000111000 0000111010 0001010100 0000111111 0001010101 0000111110 1001010011 1000010111 1001001011 1000001110 1001001100 1000001111 1001010000 1000010011 1001110000 1000110000 1001110001 1000110001 1000111111 1010000000 1010000001 Interrupt operation Timer operation Parameter Instruction code Function Number of cycles Number of words Mnemonic Type of instructions D 9 D 8 D 7 D 6 D 5 D 4 D 3 D 2 D 1 D 0 Hexadecimal notation SINGLE-CHIP 4-BIT CMOS MICROCOMPUTER MITSUBISHI MICROCOMPUTERS MACHINE INSTRUCTIONS (INDEX BY TYPES) (continued)
0 = 0: (EXF0) = 1 (INT) = “L” However, I12 = 0 (INT) = “H” However, I12 = 1 2 = 0: (T1F) = 1 V13 = 0: (T2F) =1 Skip condition Datailed description Carry flag CY SINGLE-CHIP 4-BIT CMOS MICROCOMPUTER MITSUBISHI MICROCOMPUTERS Clears (0) to interrupt enable flag INTE, and disables the interrupt. Sets (1) to interrupt enable flag INTE, and enables the interrupt. When V1 0 = 0 : Skips the next instruction when external 0 interrupt request flag EXF0 is “1.” After skipping, clears (0) to the EXF0 flag. When the EXF0 flag is “0,” executes the next instruction. When V1 0 = 1 : This instruction is equivalent to the NOP instruction. (V10: bit 0 of interrupt control register V1) When I12 = 0 : Skips the next instruction when the level of INT pin is “L.” Executes the next instruction when the level of INT pin is “H.” When I12 = 1 : Skips the next instruction when the level of INT pin is “H.” Executes the next instruction when the level of INT pin is “L.” (I12: bit 2 of interrupt control register I1) Transfers the contents of interrupt control register V1 to register A. Transfers the contents of register A to interrupt control register V1. Transfers the contents of interrupt control register V2 to register A. Transfers the contents of register A to interrupt control register V2. Transfers the contents of interrupt control register I1 to register A. Transfers the contents of register A to interrupt control register I1. Transfers the contents of timer control register W1 to register A. Transfers the contents of register A to timer control register W1. Transfers the contents of timer control register W2 to register A. Transfers the contents of register A to timer control register W2. Transfers the contents of timer control register W6 to register A. Transfers the contents of register A to timer control register W6. Transfers the high-order 4 bits (T1 7–T14) of timer 1 to register B. Transfers the low-order 4 bits (T13–T10) of timer 1 to register A. Transfers the contents of register B to the high-order 4 bits of timer 1 and timer 1 reload register R1. Trans- fers the contents of register A to the low-order 4 bits of timer 1 and timer 1 reload register R1. Transfers the high-order 4 bits (T27–T24) of timer 2 to register B. Transfers the low-order 4 bits (T23–T20) of timer 2 to register A. Transfers the contents of register B to the high-order 4 bits of timer 2 and timer 2 reload register R2. Trans- fers the contents of register A to the low-order 4 bits of timer 2 and timer 2 reload register R2. Transfers the contents of register B to the high-order 4 bits (R17–R1 4) of reload register R1, and the con- tents of register A to the low-order 4 bits (R13–R1 0) of reload register R1. When V1 2 = 0 : Skips the next instruction when timer 1 interrupt request flag T1F is “1.” After skipping, clears (0) to the T1F flag. When the T1F flag is “0,” executes the next instruction. When V1 2 = 1 : This instruction is equivalent to the NOP instruction. (V12: bit 2 of interrupt control register V1) When V1 3 = 0 : Skips the next instruction when timer 1 interrupt request flag T2F is “1.” After skipping, clears (0) to the T2F flag. When the T2F flag is “0,” executes the next instruction. When V1 3 = 1 : This instruction is equivalent to the NOP instruction. (V13: bit 3 of interrupt control register V1)
Parameter Instruction code Function Number of cycles Number of words Mnemonic Type of instructions D 9 D 8 D 7 D 6 D 5 D 4 D 3 D 2 D 1 D 0 Hexadecimal notation SINGLE-CHIP 4-BIT CMOS MICROCOMPUTER MITSUBISHI MICROCOMPUTERS IAP0 OP0A IAP1 OP1A IAP2 OP2A CLD RD SD SZD SCP RCP SNZCP IAK OKA TK0A TAK0 TK1A TAK1 TK2A TAK2 TPU0A TPU1A TPU2A 260 220 261 221 262 222 011 014 015 024 02B 28D 28C 289 26F 21F 21B 256 214 259 215 25A 22D 22E 22F 1001100000 1000100000 1001100001 1000100001 1001100010 1000100010 0000010001 0000010100 0000010101 0000100100 0000101011 1010001101 1010001100 1010001001 1001101111 1000011111 1000011011 1001010110 1000010100 1001011001 1000010101 1001011010 1000101101 1000101110 1000101111 Input/Output operation (A) ← (P0) (P0) ← (A) (A) ← (P1) (P1) ← (A) (A3, A2) ← 0 (D) ← 1 (D(Y)) ← 0 (Y) = 0 to 3 (D(Y)) ← 1 (Y) = 0 to 3 (D(Y)) = 0 ? (Y) = 0 to 3 (C) ← 1 (C) ← 0 (C) = 1? (A0) ← (K) (A3–A1) ← 0 (K) ← (A0) (K0) ← (A) (A) ← (K0) (K1) ← (A) (A) ← (K1) (K2) ← (A) (A) ← (K2) (PU0) ← (A) (PU1) ← (A) (PU2) ← (A) MACHINE INSTRUCTIONS (INDEX BY TYPES) (continued)
Skip condition Datailed description Carry flag CY SINGLE-CHIP 4-BIT CMOS MICROCOMPUTER MITSUBISHI MICROCOMPUTERS (D(Y)) = 0 ? (Y) = 0 to 3 (C) = 1 Transfers the input of port P0 to register A. Outputs the contents of register A to port P0. Transfers the input of port P1 to register A. Outputs the contents of register A to port P1. Transfers the input of port P2 to the low-order 2 bits (A 1, A0) of register A. Outputs the contents of the low-order 2 bits (A1, A0) of register A to port P2. Sets (1) to port D. Clears (0) to a bit of port D specified by register Y. Sets (1) to a bit of port D specified by register Y . Skips the next instruction when a bit of port D specified by register Y is “0.” Executes the next instruction when a bit of port D specified by register Y is “1.” Sets (1) to port C. Clears (0) to port C. Skips the next instruction when the contents of port C is “1.” Executes the next instruction when the contents of port C is “0.” Transfers the contents of port K to the bit 0 (A 0) of register A. Outputs the contents of bit 0 (A0) of register A to port K. Transfers the contents of register A to key-on wakeup control register K0. Transfers the contents of key-on wakeup control register K0 to register A. Transfers the contents of register A to key-on wakeup control register K1. Transfers the contents of key-on wakeup control register K1 to register A. Transfers the contents of register A to key-on wakeup control register K2. Transfers the contents of key-on wakeup control register K2 to register A. Transfers the contents of register A to pull-up control register PU0. Transfers the contents of register A to pull-up control register PU1. Transfers the contents of register A to pull-up control register PU2.
Parameter Instruction code Function Number of cycles Number of words Mnemonic Type of instructions D 9 D 8 D 7 D 6 D 5 D 4 D 3 D 2 D 1 D 0 Hexadecimal notation SINGLE-CHIP 4-BIT CMOS MICROCOMPUTER MITSUBISHI MICROCOMPUTERS TABAD TALA TADAB TAQ1 TQ1A ADST SNZAD NOP POF POF2 EPOF SNZP DWDT WRST CMCK CRCK TAMR TMRA 279 249 239 244 204 29F 287 000 002 008 05B 003 29C 2A0 29A 29B 252 216 1001111001 1001001001 1000111001 1001000100 1000000100 1010011111 1010000111 0000000000 0000000010 0000001000 0001011011 0000000011 1010011100 1010100000 1010011010 1010011011 1001010010 1000010110 A-D conversion operation Other operation In A-D conversion mode (Q13 = 0), (B) ← (AD9–AD 6) (A) ← (AD5–AD 2) In comparator mode (Q13 = 1), (B) ← (AD7–AD 4) (A) ← (AD3–AD 0) (A3, A2) ← (AD1, AD0) (A1, A0) ← 0 (AD7–AD 4) ← (B) (AD3–AD 0) ← (A) (A) ← (Q1) (Q1) ← (A) (ADF) ← 0 Q1 3 = 0: A-D conversion starting Q1 3 = 1: Comparator operation starting After skipping, (ADF) ← 0 V22 = 1: SNZAD = NOP (PC) ← (PC) + 1 RAM back-up However, voltage drop detection circuit is valid RAM back-up POF or POF2 instruction valid (P) = 1 ? Stop of watchdog timer function enabled (WDF1) = 1, after skipping, (WDF1) ← 0 Ceramic resonator selected RC oscillation selected (A) ← (MR) (MR) ← (A) MACHINE INSTRUCTIONS (INDEX BY TYPES) (continued)
Skip condition Datailed description Carry flag CY SINGLE-CHIP 4-BIT CMOS MICROCOMPUTER MITSUBISHI MICROCOMPUTERS 2 = 0: (ADF) = 1 (P) = 1 (WDF1) = 1 In the A-D conversion mode (Q13 = 0), transfers the high-order 4 bits (AD9–AD 6) of register AD to register B, and the middle-order 4 bits (AD5–AD 2) of register AD to register A. In the comparator mode (Q13 = 1), transfers the middle-order 4 bits (AD7–AD 4) of register AD to register B, and the low-order 4 bits (AD3–AD 0) of register AD to register A. (Q13: bit 3 of A-D control register Q1) Transfers the low-order 2 bits (AD1, AD0) of register AD to the high-order 2 bits (AD3, AD2) of register A. In the A-D conversion mode (Q13 = 0), this instruction is equivalent to the NOP instruction. In the comparator mode (Q13 = 1), transfers the contents of register B to the high-order 4 bits (AD7–AD 4) of comparator register, and the contents of register A to the low-order 4 bits (AD3–AD 0) of comparator register. (Q13 = bit 3 of A-D control register Q1) Transfers the contents of A-D control register Q1 to register A. Transfers the contents of register A to A-D control register Q1. Clears (0) to A-D conversion completion flag ADF, and the A-D conversion at the A-D conversion mode (Q1 = 0) or the comparator operation at the comparator mode (Q13 = 1) is started. (Q13 = bit 3 of A-D control register Q1) When V2 2 = 0 : Skips the next instruction when A-D conversion completion flag ADF is “1.” After skipping, clears (0) to the ADF flag. When the ADF flag is “0,” executes the next instruction. When V2 2 = 1 : This instruction is equivalent to the NOP instruction. (V22: bit 2 of interrupt control register V2) No operation; Adds 1 to program counter value, and others remain unchanged. Puts the system in RAM back-up state by executing the POF instruction after executing the EPOF instruc- tion. However, the voltage drop detection circuit is valid. Puts the system in RAM back-up state by executing the POF2 instruction after executing the EPOF instruction. Operations of all functions are stopped. Makes the immediate after POF or POF2 instruction valid by executing the EPOF instruction. Skips the next instruction when the P flag is “1”. After skipping, the P flag remains unchanged. Executes the next instruction when the P flag is “0.” Stops the watchdog timer function by the WRST instruction after executing the DWDT instruction. Skips the next instruction when watchdog timer flag WDF1 is “1.” After skipping, clears (0) to the WDF1 flag. When the WDF1 flag is “0,” executes the next instruction. Also, stops the watchdog timer function when ex- ecuting the WRST instruction immediately after the DWDT instruction. Selects the ceramic oscillation circuit and stops the ring oscillator. Selects the RC oscillation circuit and stops the ring oscillator. Transfers the contents of clock control register MR to register A. Transfers the contents of register A to clock control register MR.
SINGLE-CHIP 4-BIT CMOS MICROCOMPUTER MITSUBISHI MICROCOMPUTERS INSTRUCTION CODE TABLE D 3–D 0 Hex. notation 0000 0001 0010 0011 0100 0101 0110 0111 1000 1001 1010 1011 1100 1101 1110 1111 A B C D E F D 9–D 4 NOP POF SNZP DI EI RC SC POF2 AM AMC TYA TBA 000001 BLA CLD INY RD SD DEY AND OR TEAB CMA RAR TAB TAY 000010 SZB SZB SZB SZB SZD SEAn SEAM TDA TABE SZC 000011 BMLA SNZ0 SNZI0 TV2A TV1A 000100 RT RTS RTI LZ LZ LZ LZ RB RB RB RB 000101 TASP TAD TAX TAZ TAV1 TAV2 EPOF SB SB SB SB 000110 A A A A A A A A A A A A A A A A 000111 LA LA LA LA LA LA LA LA LA LA LA LA LA LA LA LA 001000 TABP TABP TABP TABP TABP TABP TABP TABP TABP TABP TABP TABP TABP TABP TABP TABP 001001 TABP 16* TABP 17* TABP 18* TABP 19* TABP 20* TABP 21* TABP 22* TABP 23* TABP 24* TABP 25* TABP 26* TABP 27* TABP 28* TABP 29* TABP 30* TABP 31* 001010 001011 001100 001101 001110 001111 BML BML BML BML BML BML BML BML BML BML BML BML BML BML BML BML BML* BML* BML* BML* BML* BML* BML* BML* BML* BML* BML* BML* BML* BML* BML* BML* BL BL BL BL BL BL BL BL BL BL BL BL BL BL BL BL BL* BL* BL* BL* BL* BL* BL* BL* BL* BL* BL* BL* BL* BL* BL* BL* BM BM BM BM BM BM BM BM BM BM BM BM BM BM BM BM 010000 010111 011000 011111 18–1F B B B B B B B B B B B B B B B B BL BML BLA BMLA SEA SZD The second word 10 0aaa aaaa 10 0aaa aaaa 10 0p00 pppp 10 0p00 pppp 00 0111 nnnn 00 0010 1011
- * cannot be used in the M34501M2-XXXFP. 10–17 000000 The above table shows the relationship between machine language codes and machine language instructions. D3–D 0 show the low-order 4 bits of the machine language code, and D9–D 4 show the high-order 6 bits of the machine language code. The hexadecimal representa- tion of the code is also provided. There are one-word instructions and two-word instructions, but only the first word of each instruction is shown. Do not use code marked “–.” The codes for the second word of a two-word instruction are described below.
SINGLE-CHIP 4-BIT CMOS MICROCOMPUTER MITSUBISHI MICROCOMPUTERS INSTRUCTION CODE TABLE (continued) TQ1A TW1A TW2A TW6A TK1A TK2A TMRA TI1A TK0A OKA T1AB T2AB TADAB TR1AB TAQ1 TALA TAW1 TAW2 TAW6 TAMR TAI1 TAK0 TAK1 TAK2 IAP0 IAP1 IAP2 IAK TAB1 TAB2 TABAD SNZT1 SNZT2 SNZAD SNZCP RCP SCP CMCK CRCK DWDT ADST WRST TAM TAM TAM TAM TAM TAM TAM TAM TAM TAM TAM TAM TAM TAM TAM TAM XAM XAM XAM XAM XAM XAM XAM XAM XAM XAM XAM XAM XAM XAM XAM XAM XAMI XAMI XAMI XAMI XAMI XAMI XAMI XAMI XAMI XAMI XAMI XAMI XAMI XAMI XAMI XAMI XAMD XAMD XAMD XAMD XAMD XAMD XAMD XAMD XAMD XAMD XAMD XAMD XAMD XAMD XAMD XAMD LXY LXY LXY LXY LXY LXY LXY LXY LXY LXY LXY LXY LXY LXY LXY LXY TMA TMA TMA TMA TMA TMA TMA TMA TMA TMA TMA TMA TMA TMA TMA TMA BL BML BLA BMLA SEA SZD The second word 10 0aaa aaaa 10 0aaa aaaa 10 0p00 pppp 10 0p00 pppp 00 0111 nnnn 00 0010 1011 OP0A OP1A OP2A TPU0A TPU1A TPU2A D 3–D 0 Hex. notation 0000 0001 0010 0011 0100 0101 0110 0111 1000 1001 1010 1011 1100 1101 1110 1111 A B C D E F D 9–D 4 100001 100010 100011 100100 100101 100110 100111 101000 101001 101010 101011 101100 101101 101110 101111 110000 111111 30–3F 100000 The above table shows the relationship between machine language codes and machine language instructions. D3–D 0 show the low- order 4 bits of the machine language code, and D9–D 4 show the high-order 6 bits of the machine language code. The hexadecimal representation of the code is also provided. There are one-word instructions and two-word instructions, but only the first word of each instruction is shown. Do not use code marked “–.” The codes for the second word of a two-word instruction are described below.
SINGLE-CHIP 4-BIT CMOS MICROCOMPUTER MITSUBISHI MICROCOMPUTERS Parameter Supply voltage Input voltage P0, P1, P2, D2/C, D3/K, RESET , XIN Input voltage D0, D1 Input voltage AIN0–AIN1 Output voltage P0, P1, P2, D2/C, D3/K, RESET Output voltage D0, D1 Output voltage XOUT Power dissipation Operating temperature range Storage temperature range Conditions Output transistors in cut-off state Ta = 25 °C Symbol V DD VI VI VI VO VO VO Pd Topr Tstg Unit V V V V V V V mW Ratings –0.3 to 6.5 –0.3 to VDD +0.3 –0.3 to 13.0 –0.3 to VDD +0.3 –0.3 to VDD +0.3 –0.3 to 13.0 –0.3 to VDD +0.3 300 –20 to 85 –40 to 125 ABSOLUTE MAXIMUM RAINGS
SINGLE-CHIP 4-BIT CMOS MICROCOMPUTER MITSUBISHI MICROCOMPUTERS RECOMMENDED OPERATING CONDITIONS 1 (Ta = –20 °C to 85 °C, VDD = 2.7 to 5.5 V, unless otherwise noted) Symbol VDD VRAM VSS VIH VIH VIH VIH VIH VIL VIL VIL VIL IOL (peak) IOL (peak) IOL (peak) IOL (peak) IOL (avg) IOL (avg) IOL (avg) IOL (avg) ΣIOL (avg) Parameter Supply voltage RAM back-up voltage Supply voltage “H” level input voltage “H” level input voltage “H” level input voltage “H” level input voltage “H” level input voltage “L” level input voltage “L” level input voltage “L” level input voltage “L” level input voltage “L” level peak output current “L” level peak output current “L” level peak output current “L” level peak output current “L” level average output current “L” level average output current “L” level average output current “L” level average output current “L” level total average current Notes 1: System is in the reset state when the value is the detection voltage of the voltage drop detection circuit or less. 2: The voltage drop detection circuit is operating in the RAM back-up with the POF instruction (system enters into the reset state when the value is VRST or less). In the RAM back-up mode with the POF2 instruction, the voltage drop detection circuit stops. 3: The average output current (IOH , IOL ) is the average value during 100 ms. UnitConditions High-speed mode Middle-speed mode Low-speed mode Default mode (at RAM back-up mode with the POF2 instruction) P0, P1, P2, D 2, D3, XIN D 0, D1 RESET C, K CNTR, INT P0, P1, P2, D 0–D 3, XIN C, K RESET CNTR, INT P2, RESET D 0, D1 D 2/C, D3/K P0, P1 P2, RESET (Note 3) D 0, D1 (Note 3) D2/C, D3/K (Note 3) P0, P1 (Note 3) P2, D, RESET P0, P1 Max. 5.5 VDD VDD VDD VDD VDD 0.2VDD 0.16VDD 0.3VDD 0.15VDD 5.0 Limits Min. 2.7 (Note 1) 1.8 (Note 2) 0.8VDD 0.8VDD 0.85VDD 0.5VDD 0.7VDD 0.85VDD Typ. f(XIN) ≤ 4.4 MHz VDD = 4.0 to 5.5 V VDD = 2.7 to 5.5 V VDD = 5.0 V VDD = 5.0 V VDD = 5.0 V VDD = 5.0 V VDD = 5.0 V VDD = 5.0 V VDD = 5.0 V VDD = 5.0 V V V V V V V V V V V V mA mA mA mA mA mA mA mA mA mA 4.4 f [MHz] f [MHz] Ceramic resonator and high-speed mode selected External clock input (ceramic resonator selected) Recommended operating condition 4.22.7 5.5 VDD [V] VRST (Note) 3.2 4.22.7 5.5 VDD [V] VRST (Note) Recommended operating condition It shows the electrical characteristics range of detected voltage for voltage drop detection circuit. System reset occurs when the supply voltage is under the detected voltage for voltage drop detection circuit. Note:
SINGLE-CHIP 4-BIT CMOS MICROCOMPUTER MITSUBISHI MICROCOMPUTERS f(XIN) f(XIN) ∆ f(XIN) f(CNTR) tw(CNTR) TPON Oscillation frequency (with a ceramic resonator/ RC oscillation) (Note) Oscillation frequency (with a ceramic resonator selected, external clock input) Oscillation frequency (at RC oscillation, error value of exteranal R, C not included) Note: use 30 pF capacitor and vary external R Timer external input frequency Timer external input period (“H ” and “L” pulse width) Valid supply voltage rising time for power-on reset circuit Conditions MHz MHz Hz s µs Max. 4.4 3.2 ±17 f(XIN)/6 f(XIN)/12 f(XIN)/24 f(XIN)/48 100 Limits High-speed mode Middle-speed mode Low-speed mode Default mode High-speed mode Middle-speed mode Low-speed mode Default mode V DD = 5.0 V ±10 %, Ta = 25 °C, –20 to 85 °C High-speed mode Middle-speed mode Low-speed mode Default mode High-speed mode Middle-speed mode Low-speed mode Default mode V DD = 0 → 2.0 V Min. Typ. 3/f(XIN) 6/f(XIN) 12/f(XIN) 24/f(XIN) RECOMMENDED OPERATING CONDITIONS 2 (Ta = –20 °C to 85 °C, VDD = 2.7 to 5.5 V, unless otherwise noted) ParameterSymbol Unit Note: The frequency is affected by a capacitor, a resistor and a microcomputer. So, set the constants within the range of the frequency limits.
SINGLE-CHIP 4-BIT CMOS MICROCOMPUTER MITSUBISHI MICROCOMPUTERS ELECTRICAL CHARACTERISTICS (Ta = –20 °C to 85 °C, VDD = 2.7 to 5.5 V, unless otherwise noted) VOL VOL VOL VOL IIH IIH IIL IIL IDD R PU VT+ – VT– VT+ – VT– f(RING) “L” level output voltage P0, P1 “L” level output voltage P2, RESET “L” level output voltage D0, D1 “L” level output voltage D2/C, D3/K “H ” level input current P0, P1, P2, D2/C, D3/K, RESET “H ” level input current D0, D1 “L” level input current P0, P1, P2 “L” level input current D 0, D1, D2/C, D3/K Supply current Pull-up resistor value P0, P1, P2, D2/C, D3/K, RESET Hysteresis INT, CNTR Hysteresis RESET Ring oscillator clock frequency (Note 3) at active mode (Notes 1, 2) at RAM back-up mode (POF instruction execution) at RAM back-up mode (POF2 instruction execution) V V V V µA µA µA µA mA µA µA kΩ V V MHz Test conditions VDD = 5.0 V VDD = 5.0 V VDD = 5.0 V VDD = 5.0 V VI = VDD VI = 12 V VI = 0 V P0, P1, P2 No pull-up VI = 0 V, D2/C, D3/K, No pull-up VDD = 5.0 V f(XIN) = 4.0 MHz VDD = 5.0 V Ta = 25 °C VDD = 5.0 V VDD = 3.0 V VI = 0 V, VDD = 5.0 V VDD = 5.0 V VDD = 5.0 V VDD = 5.0 V Limits Max. 2.0 0.9 2.0 0.6 2.0 0.9 2.0 0.9 1.0 1.0 5.0 3.9 3.3 3.0 100 1.0 6.0 150 3.0 IOL = 12 mA IOL = 4.0 mA IOL = 5.0 mA IOL = 1.0 mA IOL = 30 mA IOL = 10 mA IOL = 15 mA IOL = 5.0 mA Min. –1.0 –1.0 1.0 Typ. 1.7 1.3 1.1 1.0 0.1 0.25 1.2 2.0 High-speed mode Middle-speed mode Low-speed mode Default mode Symbol Parameter Unit Notes 1: The operation current of the voltage drop detection circuit is included. 2: When the A-D converter is used, the A-D operation current (IADD ) is included. 3: When system operates by the ring oscillator, the system clock frequency is the ring oscillator clock divided by the dividing ratio selected with register MR.
SINGLE-CHIP 4-BIT CMOS MICROCOMPUTER MITSUBISHI MICROCOMPUTERS A-D CONVERTER RECOMMENDED OPERATING CONDITIONS (Comparator mode included, Ta = –20 °C to 85 °C, unless otherwise noted) Symbol VDD VIA f(XIN) Parameter Supply voltage Analog input voltage Oscillation frequency A-D CONVERTER CHARACTERISTICS (Ta = –20 °C to 85 °C, unless otherwise noted) Conditions Unit V V MHz MHz MHz MHz Ta = 25 °C Ta = –20 °C to 85 °C VDD = VRST to 5.5 V High-speed mode Middle-speed mode Low-speed mode Default mode Min. 2.7 (Note) 3.0 0.1 0.2 0.4 0.8 Typ. Max. 5.5 5.5 V DD +2LSB Limits Symbol V0T VFST IADD TCONV Parameter Resolution Linearity error Differential non-linearity error Zero transition voltage Full-scale transition voltage A–D operating current (Note 1) A-D conversion time Comparator resolution Comparator error (Note 2) Comparator comparison time Test conditions bits LSB LSB mV mV mA µs bits mV µs Ta = 25 °C, VDD = VRST to 5.5 V Ta = –25 °C to 85 °C, VDD = 3.0 V to 5.5 V Ta = 25 °C, VDD = VRST to 5.5 V Ta = –25 °C to 85 °C, VDD = 3.0 V to 5.5 V VDD = 5.12 V VDD = 5.12 V VDD = 5.0 V f(X IN) = 0.4 MHz to 4.0 MHz f(XIN) = 4.0 MHz High-speed mode Middle-speed mode Low-speed mode Default mode Comparator mode V DD = 5.12 V f(XIN) = 4.0 MHz High-speed mode Middle-speed mode Low-speed mode Default mode Min. 5115 Typ. 5125 0.3 Max. ±2.0 ±0.9 5135 0.9 46.5 93.0 186 372 ±20 6.0 Limits Notes 1: When the A-D converter is used, the IADD is included to IDD . 2: As for the error from the logic value in the comparator mode, when the contents of the comparator register is n, the logic value of the comparison voltage Vref which is generated by the built-in DA converter can be obtained by the following formula. Logic value of comparison voltage Vref Vref = ✕ n n = Value of register AD (n = 0 to 255) VDD 256 Unit Note: System is in the reset state when the value is the detection voltage of the voltage drop detection circuit or less.
SINGLE-CHIP 4-BIT CMOS MICROCOMPUTER MITSUBISHI MICROCOMPUTERS BASIC TIMING DIAGRAM VOLTAGE DROP DETECTION CIRCUIT CHARACTERISTICS (Ta = –20 °C to 85 °C, unless otherwise noted) Test conditions Ta = 25 °C RAM back-up mode V DD = 5.0 V (POF instruction execution) (Note 2) Parameter Detection voltage (Note 1) Operation current of voltage drop detection circuit Symbol VRST IRST Limits UnitMin. 2.7 3.3 Typ. 3.5 Max. 4.2 3.7 100 V µA Notes 1: The detected voltage (VRST) is defined as the voltage when reset occurs while the supply voltage (VDD ) is falling. 2: The voltage drop detection circuit is operating in the RAM back-up with the POF instruction (It stops in the RAM back-up with the POF2 instruction). XI N : h i g h - s p e e d m o d e S y s t e m c l o c k f XI N ) P a r a m e t e r P i n n a m e M a c h i n e c y c l e M iM i + 1 D 0, D 1, D 2/ C , D 3/ K P 00–P 03 P 10–P 13 P 00– P 03 P 10–P 13 P 20, P 21 XI N : m i d d l e - s p e e d m o d e S y s t e m c l o c k f XI N ) P 20, P 21 C l o c k P o r t D o u t p u t Port D input P o r t P 0 , P 1 , P 2 o u t p u t P o r t P 0 , P 1 , P 2 i n p u t C N T RT i m e r o u t p u t XI N : l o w - s p e e d m o d e S y s t e m c l o c k f XI N ) XI N : d e f a u l t m o d e S y s t e m c l o c k f XI N ) D 0, D1, D2/C, D3/K INTInterrupt input C N T RT i m e r i n p u t
SINGLE-CHIP 4-BIT CMOS MICROCOMPUTER MITSUBISHI MICROCOMPUTERS Table 20 Product of built-in PROM version PROM size (✕ 10 bits) 4096 words RAM size (✕ 4 bits) 256 wordsM34501E4FP One Time PROM [shipped in blank]20P2N-A BUILT-IN PROM VERSION In addition to the mask ROM versions, the 4501 Group has the One Time PROM versions whose PROMs can only be written to and not be erased. The built-in PROM version has functions similar to those of the mask ROM versions, but it has PROM mode that enables writing to built-in PROM. Table 20 shows the product of built-in PROM version. Figure 52 shows the pin configurations of built-in PROM versions. The One Time PROM version has pin-compatibility with the mask ROM version. (1) PROM mode The 4501 Group has a PROM mode in addition to a normal opera- tion mode. It has a function to serially input/output the command codes, addresses, and data required for operation (e.g., read and program) on the built-in PROM using only a few pins. This mode can be selected by setting pins SDA (serial data input/output), S CLK (serial clock input), PGM to “H ” after connecting wires as shown in Figure 54 and powering on the VDD pin, and then apply- ing 12 V to the VPP pin. In the PROM mode, three types of software commands (read, pro- gram, and program verify) can be used. Clock-synchronous serial I/O is used, beginning from the LSB (LSB first). Use the special-perpose serial programmer when performing serial read/program. As for the serial programmer for the Mitsubishi single-chip micro- computer (serial programmer and control software), refer to the “Mitsubishi Microcomputer Development Support Tools” Hompage Fig. 53 Flow of writing and test of the product shipped in blank ROM typePackageProduct W r i t i n g w i t h P R O M p r o g r a m m e r Screening (Leave at 150 °C for 40 hours) (Note) Verify test with PROM programmer Function test in target device S i n c e t h e s c r e e n i n g t e m p e r a t u r e i s h i g h e r t h a n s t o r a g e t e m p e r a t u r e n e v e r e x p o s e t h e m i c r o c o m p u t e r t o C e x c e e d i n g h o u r s Note: (2) Notes on handling ➀ A high-voltage is used for writing. Take care that overvoltage is not applied. Take care especially at turning on the power. ➁ For the One Time PROM version shipped in blank, Mitsubishi Electric corp. does not perform PROM writing test and screening in the assembly process and following processes. In order to im- prove reliability after writing, performing writing and test according to the flow shown in Figure 53 before using is recom- mended (Products shipped in blank: PROM contents is not written in factory when shipped).
SINGLE-CHIP 4-BIT CMOS MICROCOMPUTER MITSUBISHI MICROCOMPUTERS Fig. 54 Pin configuration of built-in PROM version PIN CONFIGURATION (TOP VIEW) O u t l i n e P N A M E F P P21/AIN1 P12/CNTR P13/INT XI N XO U T C N VS S VS S VD D P20/AIN0 R E S E T D 3/ K D 2/ C D 0 D 1 P P P P P P VD D VS S VP P SCLK S D A VDD PGM
SINGLE-CHIP 4-BIT CMOS MICROCOMPUTER MITSUBISHI MICROCOMPUTERS PACKAGE OUTLINE SOP20-P-300-1.27 Weight(g) JEDEC Code 0.26 Cu Alloy 20P2N-A Plastic 20pin 300mil SOP Symbol Min Nom Max A b c D E L y Dimension in Millimeters H E .350 .180 .512 .25 .57 .40 .271 .10 .81 .40 .20 .612 .35 .271 .87 .60 .251 .627 .20 .12 .50 .250 .712 .45 .18 .80 .10 b2 – .760 – 0° – 8° e 20 11 101 H E E D e y F A A2 A1 L c e b2 Recommended Mount Pad Detail FDetail G z x –Z1 0.585 0.735 0.25 z b x M G
© 2001 MITSUBISHI ELECTRIC CORP. Printed in Japan (ROD) II New publication, effective June. 2001. 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 4-BIT CMOS MICROCOMPUTER MITSUBISHI MICROCOMPUTERS
Rev. Rev. No. date
1.0 First Edition 000711
1.1 Page 5: Input/Output ports; Description of AIN0–AIN3 added. 000726 Page 25: Fig.18 to Fig. 20; Description of “✕ ” revised. Page 33: (2) Successive comparison register AD; this instruction (error) → these instructions (correct) Page 42: Table 16; Return condition of port P13/INT revised bit 1 (error) → bit 2 (correct), EXF1 (error) → EXF0 (correct) Pages 49 to 51: Fig. 46 to Fig. 49; Description of “✕ ” revised. Page 73: SEAM; Instruction code 0000010110 (error) → 0000100110 (correct) Page 80: Description AD3, AD2 (error) → A3, A2 (correct) Page 88: WRST; Operation: (WDF) ← 1? (error) → (WDF1) = 1? (correct) Description: Skips the next instruction when watchdog timer flag WDF1 is “1.” After skipping, clears (0) to the WDF1 flag. When the WDF1 flag is “ Page 91: Description of DEY; “Subtracts 1 from the contents of register Y.” added. Page 93: Description of SEAM and description of SEA n are exchanged. Page 100: WRST; (WDF1) ← 0, (WDF1) = 1, after skipping, → after skipping, (WDF1) ← 1 (WDF1) ← 0 (error) (correct) Page 101: WRST; Skip condition: (WDF) = 1 (error) → (WDF1) = 1 (correct) Description: Skips the next instruction when watchdog timer flag WDF1 is “1.” After skipping, clears (0) to the WDF1 flag. When the WDF1 flag is “ Page 110: (1) PROM mode; 12.5 V (error) → 12 V (correct) Fig. 52; title revised
1.2 Pages 3, 4, 22 : Character fonts errors revised 000905
REVISION DESCRIPTION LIST 4501 GROUP DATA SHEET (1/2) Revision Description
Rev. Rev. No. date 2.0 The 4501/4502 Group data sheet is separated. 010620 Page 9: Port block diagram (3); Block diagram of P12/CNTR pin revised. Page 25: Fig. 22 Timers structure; Block diagram of P12/CNTR pin revised. Page 28: (9) Precautions → (8) Precautions (8) Timer input/output pin (P12/CNTR pin) added. Fig. 23 added. Page 29: WATCHDOG TIMER revised all. Page 30: Fig. 24 → Fig. 25, Fig. 25 → Fig. 26 Fig. 26 NOP instruction added Page 39: Fig. 37 Note 3 added. Page 61: BL p, a, BLA p instructions revised. Page 62: BML p, a, BMLA p instructions revised. Page 76: TABP p instruction revised. Page 90: TABP p instruction revised. Page 92: BL p, a, BLA p, BML p, a, BMLA p instructions revised. Page 100: BL, BML, BLA, BMLA instructions; The second word revised. Page 101: BL, BML, BLA, BMLA instructions; The second word revised. Page 102: ABSOLUTE MAXIMUM RATINGS; V DD –0.3 to 6.0 → –0.3 to 6.5 Page 103: RECOMMENDED OPERATING CONDITIONS 1; VRST → 2.7 Note 1 revised. Operating condition map added. Page 104: RECOMMENDED OPERATING CONDITIONS 2; VRST → 2.7 Page 105: ELECTRICAL CHARACTERISTICS; VRST → 2.7 Page 106: A-D CONVERTER RECOMMENDED OPERATING CONDITIONS; VDD (Ta = 25 °C) Min. VRST → 2.7, Note added REVISION DESCRIPTION LIST 4501 GROUP DATA SHEET (2/2) Revision Description