LC66P2316 SANYO | Alldatasheet

Document overview

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

Technical content

22897HA (OT) No. 5487-1/27 Overview The LC66P2316 is an on-chip OTP PROM version of the LC6623XX Series CMOS 4-bit single-chip micro- controllers. The LC66P2316 is appropriate for program development and product evaluation since it provides identical functionality and pin compatibility with the LC662316A. Features and Functions

  • On-chip OTP ROM capacity of 16 kilobytes, and an on- chip RAM capacity of 512 · 4 bits.
  • Fully supports the LC66000 Series common instruction set (128 instructions).
  • I/O ports: 36 pins
  • DTMF generator This microcontroller incorporates a circuit that can generate two sine wave outputs, DTMF output, or a melody output for software applications.
  • 8-bit serial interface: one circuit
  • Instruction cycle time: 0.95 to 10 µs (at 4.0 to 5.5 V)
  • Powerful timer functions and prescalers — Time limit timer, event counter, pulse width measurement, and square wave output using a 12-bit timer. — Time limit timer, event counter, PWM output, and square wave output using an 8-bit timer. — Time base function using a 12-bit prescaler.
  • Powerful interrupt system with 10 interrupt factors and 7 interrupt vector locations. — External interrupts: 3 factors/3 vector locations — Internal interrupts: 4 factors/4 vector locations (Waveform output internal interrupts: 3 factors and 1 vector; shared with external expansion interrupts)
  • Flexible I/O functions Selectable options include 20-mA drive outputs, inverter circuits, pull-up and open drain circuits.
  • Optional runaway detection function (watchdog timer)
  • 8-bit I/O functions
  • Power saving functions using halt and hold modes.
  • Packages: DIP42S, QIP48E (QFP48E)
  • Evaluation LSIs: LC66599 (evaluation chip) + EVA800/850-TB662YXX2 Package Dimensions unit: mm 3025B-DIP42S unit: mm 3156-QFP48E Preliminary LC66P2316 SANYO Electric Co.,Ltd. Semiconductor Bussiness Headquarters TOKYO OFFICE Tokyo Bldg., 1-10, 1 Chome, Ueno, Taito-ku, TOKYO, 110 JAPAN Four-Bit Single-Chip Microcontroller with 16 KB of On-Chip OTP PROM CMOS LSI (STAND OFF) 1.5 17.2 17.2 1.5 1.5 1.5 1.6 1.614.0 0.35 15.60.8 1.0 1.0 3.0max 2.70 0.1 0.15 11 2 1348 14.0 SANYO: QFP48E [LC66P2316] SANYO: DIP42S 37.9 0.95 0.48 1.78 1.15 15.24 13.8 0.25 3.8 4.250.51min 5.1 max [LC66P2316] No. 5487

Note: * Under development No. 5487-2/27 LC66P2316 Type No. No. of ROM capacity RAM Package Featurespins capacity LC66304A/306A/308A 42 4 K/6 K/8 KB 512 W DIP42S QFP48E LC66404A/406A/408A 42 4 K/6 K/8 KB 512 W DIP42S QFP48E LC66506B/508B/512B/516B 64 6 K/8 K/12 K/16 KB 512 W DIP64S QFP64A LC66354A/356A/358A 42 4 K/6 K/8 KB 512 W DIP42S QFP48E LC66354S/356S/358S 42 4 K/6 K/8 KB 512 W QFP44M LC66556A/558A/562A/566A 64 6 K/8 K/12 K/16 KB 512 W DIP64S QFP64E LC66354B/356B/358B 42 4 K/6 K/8 KB 512 W DIP42S QFP48E Low-voltage high-speed versions LC66556B/558B/562B/566B 64 6 K/8 K/12 K/16 KB 512 W DIP64S QFP64E 3.0 to 5.5 V/0.92 µs LC66354C/356C/358C 42 4 K/6 K/8 KB 512 W DIP42S QFP48E 2.5 to 5.5 V/0.92 µs LC662104A/06A/08A 30 4 K/6 K/8 KB 384 W DIP30SD MFP30S LC662304A/06A/08A/12A/16A 42

4 K/6 K/8 K/12 K/16 KB512 W DIP42S QFP48E

LC662508A/12A/16A 64 8 K/12 K/16 KB 512 W DIP64S QFP64E LC665304A/06A/08A/12A/16A 48 4 K/6 K/8 K/12 K/16 KB512 W DIP48S QFP48E Dual oscillator support 3.0 to 5.5 V/0.95 µs LC66E308 42 EPROM 8 KB 512 W DIC42S QFC48 with window with window LC66P308 42 OTPROM 8 KB 512 W DIP42S QFP48E LC66E408 42 EPROM 8 KB 512 W DIC42S QFC48 with window with window LC66P408 42 OTPROM 8 KB 512 W DIP42S QFP48E LC66E516 64 EPROM 16 KB 512 W DIC64S QFC64 with window with window LC66P516 64 OTPROM 16 KB 512 W DIP64S QFP64E LC66E2108 * 30 EPROM 8 KB 384 W LC66E2316 42 EPROM 16 KB 512 W DIC42S QFC48 with window with window LC66E2516 64 EPROM 16 KB 512 W DIC64S QFC64 with window with window LC66E5316 52/48 EPROM 16 KB 512 W DIC52S QFC48 with window with window LC66P2108 * 30 OTPROM 8 KB 384 W DIP30SD MFP30S LC66P2316 * 42 OTPROM 16 KB 512 W DIP42S QFP48E LC66P2516 64 OTPROM 16 KB 512 W DIP64S QFP64E LC66P5316 48 OTPROM 16 KB 512 W DIP48S QFP48E OTP 4.0 to 5.5 V/0.95 µs Window evaluation versions 4.5 to 5.5 V/0.92 µs Window and OTP evaluation versions 4.5 to 5.5 V/0.92 µs On-chip DTMF generator versions 3.0 to 5.5 V/0.95 µs Low-voltage versions 2.2 to 5.5 V/3.92 µs Normal versions 4.0 to 6.0 V/0.92 µs

We recommend the use of reflow-soldering techniques to solder-mount QFP packages. Please consult with your Sanyo representative for details on process conditions if the package itself is to be directly immersed in a dip-soldering bath (dip-soldering techniques). No. 5487-3/27 LC66P2316 DIP42S P20/SI0/A0 2P21/SO0/A1 3P22/SCK0/A2 4P23/INT0/A3 5P30/INT1/A4 6P31/POUT0/A5 7P32/POUT1/A6 8VSS 9OSC1 10OSC2 11VDD 12RES/V PP /OE 13PE0 14PE1 15TEST/EPMOD 16P33/HOLD 17P40/INV0I/A7 18P41/INV0O/A8 19P42/INV1I/A9 20P43/INV1O/A10 21P50/A11

42 P13/D7

41 P12/D6

40 P11/D5

39 P10/D4

38 P03/D3

37 P02/D2

36 P01/D1

35 P00/D0

34 PD3/INV3O

33 PD2/INV3I

32 PD1/INV2O

31 PD0/INV2I

30 PC3/DASEC

29 PC2/CE

28 P63/PIN1

27 P62/DT

26 P61

25 P60/ML

24 P53/INT2/TA

23 P52/A13

22 P51/A12

24 P61/DP

45P21/SO0/A1 16 P43/INV10/A10 46P22/SCK0/A2 15 P42/INV11/A9 47P23/INT0/A3 14 P41/INV00/A8 48P30/INT1/A4 13 P40/INV01/A7 Top view

The LC66P2316 was created for program development, product evaluation, and prototype development for products based on the LC6623XX Series microcontrollers. Keep the following points in mind when using this product. 1. After a reset The RES pin must be held low for an additional 3 instruction cycles after the oscillator stabilization period has elapsed. Also, the port output circuit types are set up during the 9 instruction cycles immediately after RES is set high. Only then is the program counter set to 0 and program execution started from that location. (The port output circuits all revert to the open-drain type during periods when RES is low.) 2. Notes on LC6623XX evaluation The high end of the EPROM area (locations 3FF0H to 3FFFH) are the option specification area. Option specification data must be programmed for and loaded into this area. The Sanyo specified cross assembler for this product is the program LC66S.EXE. Also, insert JMP instructions so that user programs do not attempt to execute addresses that exceed the capacity of the mask ROM, and write zeros (00H) to areas (other than 3FF0H to 3FFFH) that exceed the actual capacity of the mask ROM. 3. Mounting notes Due to structural considerations, Sanyo is unable to fully test one-time programmable products. Therefore, the user must apply the screening procedure described on page 20 to these products. 4. Use the following procedure when ordering ROM through the Sanyo PROM writing service. (Note that this is a for- fee service.)

  • If ordering one-time programmable and mask ROM versions at the same time: The customer must provide the EPROM for the mask ROM version, the order forms for the mask ROM version, and the order forms for the one-time programmable version.
  • If ordering only the one-time programmable version: The customer must provide the EPROM and the order forms for the one-time programmable version. The last section of the EPROM (locations 3FF0H to 3FFFH) is the option specification area, and the option specification data must be written to this area. The Sanyo specified cross assembler for this product is the program LC66S.EXE. Also, insert JMP instructions so that user programs do not attempt to execute addresses that exceed the capacity of the mask ROM, and write zeros (00H) to areas (other than 3FF0H to 3FFFH) that exceed the actual capacity of the mask ROM. 5. Differences between this product and the mask ROM version: Carefully read the sections on the following pages that describe these differences. No. 5487-4/27 LC66P2316 At least 10 ms VDD min Location Location VDD OSC RES Program execution (PC) Port output type At least 3 instruction Oscillator stabilization Open drain Option switching period 9 instruction cycles Option specification

Main differences between the LC66E2316, LC66P2316, and LC6623XX Series Note: * Although the microcontroller will remain in hold mode if the RES pin is set low while it is in hold mode, always use the reset start sequence (after switching HOLD from low to high, switch RES from low to high) when clearing hold mode. Also not that a current of about 100 µA flows from the RES pin when it is low. This increases the hold mode current drain by about 100 µA. See the data sheets for the individual products for details on other differences. System Block Diagram No. 5487-5/27 LC66P2316 Item LC6623XX Series (mask version) LC66E2316 LC66P2316 Differences in the main characteristics –30 to +70°C +10 to +40°C –30 to +70°C

  • Operating temperature range Typical: 10 µA Typical: 10 µA
  • Input high-level current (RES) Maximum: 1 µA (normal operation and halt mode) (normal operation and halt mode) Hold mode: 1 µA maximum Hold mode: 1 µA maximum
  • Input low-level current (RES) Maximum: 1 µA Typical: 100 µA Typical: 100 µA
  • Current drain (Operating at 4 MHz) Typical: 10 nA, maximum: 10 µALarger than that for the mask versions Larger than that for the mask versions (Halt mode at 4 MHz) Typical: 10 nA, maximum: 10 µA * Typical: 10 nA, maximum: 10 µA* (Hold mode) Port output types at reset The output type specified in Open-drain outputs Open-drain outputsthe options
  • QFP48E • QFC48 window package • QFP48E SYSTEM CONTROL RAM STACK (512W) SP E A OTPROM 16KB PC POUT0 SI0 SO0 SCK0 INT0 INT1. INT2 PIN1. POUT1 INVxO INV xI (x=0 to 3) FLAG DTMF GEN. PRESCALER INTERRUPT CONTROL MPX MPX TIMER1 MPX TIMER0 SERIAL I/O 0 PE PD PC E M R D P Y D P X D P L D P H P0 P1 P2 P3 P4 P5 P6 CZ ALU RES ML DT TEST OSC1 OSC2 HOLD EPROM control A0 to A13 D0 to D7 CE DASEC Vpp/OE EPMOD TA

No. 5487-6/27 LC66P2316 Pin I/O Overview Output driver type Options State after a Standby mode reset operation P00/D0 P01/D1 P02/D2 P03/D3 P10/D4 P11/D5 P12/D6 P13/D7 P20/SI0/A0 P21/SO0/A1 P22/SCK0/ P23/INT0/A3 P30/INT1/A4 P31/POUT0/ P32/POUT1/ P33/HOLD P40/INV0I/ P41/INV0O/ P42/INV1I/ P43/INV1O/ A10 I/O ports P00 to P03

  • Input or output in 4-bit or 1-bit units
  • P00 to P03 support the halt mode control function (This function can be specified in single-bit units.)
  • Used as data pins in EPROM mode I/O ports P10 to P13
  • Input or output in 4-bit or 1-bit units
  • Used as data pins in EPROM mode I/O ports P20 to P23
  • Input or output in 4-bit or 1-bit units
  • P20 is also used as the serial input SI0 pin.
  • P21 is also used as the serial output SO0 pin.
  • P22 is also used as the serial clock SCK0 pin.
  • P23 is also used as the INT0 interrupt request pin, and also as the timer 0 event counting and pulse width measurement input.
  • Used as address pins in EPROM mode I/O ports P30 to P32
  • Input or output in 3-bit or 1-bit units
  • P30 is also used as the INT1 interrupt request.
  • P31 is also used for the square wave output from timer 0.
  • P32 is also used for the square wave and PWM output from timer 1.
  • P31 and P32 also support 3-state outputs.
  • Used as address pins in EPROM mode Hold mode control input
  • Hold mode is set up by the HOLD instruction when HOLD is low.
  • In hold mode, the CPU is restarted by setting HOLD to the high level.
  • This pin can be used as input port P33 along with P30 to P32.
  • When the P33/HOLD pin is at the low level, the CPU will not be reset by a low level on the RES pin. Therefore, applications must not set P33/HOLD low when power is first applied. I/O ports P40 to P43
  • Input or output in 4-bit or 1-bit units
  • Input or output in 8-bit units when used in conjunction with P50 to P53.
  • Can be used for output of 8-bit ROM data when used in conjunction with P50 to P53.
  • Dedicated inverter circuit (option)
  • Used as address pins in EPROM mode I/O I/O I/O I/O I I/O
  • Pch: Pull-up MOS type
  • Nch: Intermediate sink current type
  • Pch: Pull-up MOS type
  • Nch: Intermediate sink current type
  • Pch: CMOS type
  • Nch: Intermediate sink current type
  • Pch: CMOS type
  • Nch: Intermediate sink current type
  • Pch: Pull-up MOS type
  • CMOS type when the inverter circuit option is selected
  • Nch: Intermediate sink current type
  • Pull-up MOS or Nch OD output
  • Output level on reset
  • Pull-up MOS or Nch OD output
  • Output level on reset CMOS or Nch OD output CMOS or Nch OD output
  • Pull-up MOS or Nch OD output
  • Output level on reset
  • Inverter circuit High or low (option) High or low (option) H H
  • High or low (option)
  • Inverter I/O is set to the output off state. Hold mode: Output off Hold mode: Output off Hold mode: Output off Hold mode: Output off Hold mode: Port output off, inverter output off Halt mode: Port output retained, inverter output continues Halt mode: Output retained Halt mode: Output off Halt mode: Output retained Halt mode: Output retained Continued on next page.

Continued from preceding page. Note: Pull-up MOS type: The output circuit includes a MOS transistor that pulls the pin up to VDD . CMOS output: Complementary output. OD output: Open-drain output. No. 5487-7/27 LC66P2316 Pin I/O Overview Output driver type Options State after a Standby mode reset operation P50/A11 P51/A12 P52/A13 P53/INT2/TA P60/ML P61 P62/DT P63/PIN1 PC2/CE PC3/DASEC PD0/INV2I PD1/INV2O PD2/INV3I PD3/INV3O I/O ports P50 to P53

  • Input or output in 4-bit or 1-bit units
  • Input or output in 8-bit units when used in conjunction with P40 to P43.
  • Can be used for output of 8-bit ROM data when used in conjunction with P40 to P43.
  • P53 is also used as the INT2 interrupt request.
  • Used as address pins in EPROM mode I/O ports P60 to P63
  • Input or output in 4-bit or 1-bit units
  • P60 is also used as the melody output ML pin.
  • P62 is also used as the tone output DT pin.
  • P63 is also used for the event count input to timer 1. I/O ports PC2 to PC3
  • Output in 2-bit or 1-bit units
  • PC3 is also used as the control CE and DASEC pin in EPROM mode. Dedicated input ports PD0 to PD3 Dedicated inverter circuits (option) I/O I/O I I
  • Pch: Pull-up MOS type
  • Nch: Intermediate sink current type
  • Pch: CMOS type
  • Nch: Intermediate sink current type
  • Pch: CMOS type
  • Nch: Intermediate sink current type
  • When the inverter circuit option is selected.
  • Pch: CMOS type
  • Nch: Intermediate sink current type
  • Pull-up MOS or Nch OD output
  • Output level on reset CMOS or Nch OD output CMOS or Nch OD output Inverter circuits High or low (option) H H Normal input Inverter I/O goes to the output off state. Hold mode: Output off Hold mode: Output off Hold mode: Port output off Hold mode: Inverter Output off Halt mode: Port output retained Halt mode: Inverter output continues Halt mode: Output retained Halt mode: Output retained PE0 PE1 OSC1 OSC2 RES/V PP / OE TEST/ EPMOD VDD VSS Dedicated input ports System clock oscillator connections When an external clock is used, leave OSC2 open and connect the clock signal to OSC1. System reset input
  • When the P33/HOLD pin is at the high level, a low level input to the RES pin will initialize the CPU.
  • This pin is also used as the VPP/OE pin in EPROM mode. CPU test pin This pin must be connected to V SS during normal operation. Setting this pin to +12 V switches the LC66P2316 to EPROM mode. Power supply pins I I O I I Ceramic oscillator or external clock selection Option selection Hold mode: input disabled Hold mode: oscillator stops Halt mode: inputs accepted Halt mode: oscillator continues
  1. Port 0, 1, 4, and 5 output level at reset option The output levels at reset for I/O ports 0, 1, 4, and 5 in independent 4-bit groups, can be selected from the following two options. 2. Oscillator circuit options
  • Main clock Note: There is no RC oscillator option. 3. Watchdog timer option A runaway detection function (watchdog timer) can be selected as an option. 4. Port output type options
  • The output type of each bit (pin) in ports P0, P1, P2, P3 (except for the P33/HOLD pin), P4, P5, P6, and PC can be selected individually from the following two options. No. 5487-8/27 LC66P2316 Option Circuit Conditions and notes 1. External clock 2. Ceramic oscillator The input has Schmitt characteristics Option Conditions and notes 1. Output high at reset The four bits of ports 0, 1, 4, or 5 are set in a group 2. Output low at reset The four bits of ports 0, 1, 4, or 5 are set in a group Option Circuit Conditions and notes 1. Open-drain output 2. Output with built-in pull-up resistor The port P2, P3, P5, and P6 inputs have Schmitt characteristics. The port P2, P3, P5, and P6 inputs have Schmitt characteristics. The CMOS outputs (ports P2, P3, P6, and PC) and the pull-up MOS outputs (P0, P1, P4, and P5) are distinguished by the drive capacity of the p-channel transistor. OSC1 OSC1 OSC2 Ceramic oscillator DSB Output data Input data DSB Output data Input data
  1. Inverter array circuit option One of the following options can be selected for each of the following port sets: P40/P41, P42/P43, PD0/PD1, and PD2/PD3. No. 5487-9/27 LC66P2316 Option Circuit Conditions and notes 1. Normal port I/O circuit 2. Inverter I/O circuit When the open-drain output type is selected When the built-in pull-up resistor output type is selected If this option is selected, The I/O circuit is disabled by the DSB signal. Also note that the open-drain port output type option and the high level at reset option must be selected. DSB Output data Input data DSB Output data Input data DSB DSB Output data high Input data Output data high Input data Input Output

LC662316 Series Option Data Area and Definitions LC66P2316 Continued on next page. ROM area Bit Option specified Option/data relationship 7P 5 Output level at reset 0 = high level, 1 = low level 6P 4 5 Unused This bit must be set to 0. 3FF0H

4 Oscillator option 0 = external clock, 1 = ceramic oscillator

3 Unused This bit must be set to 0. 2P 1 Output level at reset 0 = low level, 1 = high level 1P 0

0 Watchdog timer option 0 = none, 1 = yes (present)

7 P13

6 P12

Output type 0 = OD, 1 = PU

5 P11

4 P10

3 P03

2 P02

Output type 0 = OD, 1 = PU

1 P01

0 P00

7 Unused This bit must be set to 0.

6 P32

5 P31 Output type 0 = OD, 1 = PU

4 P30

3 P23

2 P22

Output type 0 = OD, 1 = PU

1 P21

0 P20

7 P53

6 P52

Output type 0 = OD, 1 = PU

5 P51

4 P50

3 P43

2 P42

Output type 0 = OD, 1 = PU

1 P41

0 P40

Unused This bit must be set to 0. 3FF4H

3 P63

2 P62

Output type 0 = OD, 1 = PU

1 P61

0 P60

Unused This bit must be set to 0. 3FF5H Unused This bit must be set to 0. Unused This bit must be set to 0. 3FF6H Unused This bit must be set to 0.

Continued from preceding page. No. 5487-11/27 LC66P2316 Continued on next page. ROM area Bit Option specified Option/data relationship Unused This bit must be set to 0. 3FF7H

3 PC3

Output type 0 = OD, 1 = PU

2 PC2

Unused This bit must be set to 0.

7 ML disabled option 0 = disabled, 1 = enabled

6 Unused This bit must be set to 1. 5 Unused This bit must be set to 1. 3FF8H

4 PD3 Inverter output 0 = inverter output, 1 = none

3 PD1

2 Unused This bit must be set to 1.

1 P43 Inverter output 0 = inverter output, 1 = none

0 P41

Unused This bit must be set to 0. 3FF9H Unused This bit must be set to 0. Unused This bit must be set to 0. 3FFAH Unused This bit must be set to 0. Unused This bit must be set to 0. 3FFBH Unused This bit must be set to 0. Unused This bit must be set to 0. 3FFCH Unused This bit must be set to 0. 3FFDH Reserved. Must be set to predefined data values. This data is generated by the assembler. 3 If the assembler is not used, set this data to ‘00’.

Continued from preceding page. Usage Notes 1. Option specification When using a Sanyo cross assembler with the LC66P2316, use the version called “LC66S.EXE” and specify the actual microcontroller to be evaluated with the CPU pseudo instruction in the source file. The port options must be specified in the source file. The cross assembler will create an option code list in the option specification area (locations 3FF0H to 3FFFH). It is also possible to directly set up data in the option specification area. If this is done, the options must be specified according to the option code creation table shown on the following page. 2. Writing the EPROM Use a special-purpose writing conversion board (the W66EP5316D for the DIP package, and the W66EP2316Q for the QFP package) to allow the EPROM programmers listed below to be used when writing the data created by the cross assembler to the LC66P2316.

  • The EPROM programmers listed below can be used.
  • The “27512 (V PP 12.5 V) Intel high-speed write” technique must be used to write the EPROM. Set the address range to location 0 to 3FFFH. The DASEC jumper must be off. 3. Using the data security function The data security function sets up the microcontroller in advance so that data that was written to the microcontroller EPROM cannot be read out. Use the following procedure to enable the LC66P2316 data security function.
  • Set the write conversion board DASEC jumper to the on position.
  • Write the data to the EPROM once again. At this time, since this function will operate, the EPROM programmer will issue an error. However, this error does not indicate that there was a problem in either the programmer or the LSI. Notes: 1. If the data at all addresses was “FF” at step 2, the data security function will not be activated. Notes: 2. The data security function will not be activated at step 2 if the “blank fi program fi verify” operation sequence is used. Notes: 3. Always return the jumper to the off position after the data security function has been activated. No. 5487-12/27 LC66P2316 ROM area Bit Option specified Option/data relationship 3FFEH Reserved. Must be set to predefined data values. This data is generated by the assembler. 3 If the assembler is not used, set this data to ‘00’. 3FFFH Reserved. Must be set to predefined data values. This data is generated by the assembler. 3 If the assembler is not used, set this data to ‘00’. Manufacturer Models that can be used Advantest R4945, R4944A, R4943, or equivalent products Ando AF9704 AVAL — Minato Electronics MODEL1890A

Absolute Maximum Ratings at Ta = 25°C, VSS = 0 V Note: 1. Applies to pins with open-drain output specifications. For pins with other than open-drain output specifications, the ratings in the pin column for that pin apply. 2. For the oscillator input and output pins, levels up to the free-running oscillation level are allowed. 3. Sink current (Applies to PD when the inverter array specifications have been selected.) 4. Source current (Applies to all pins except PD for which the pull-up output specifications, the CMOS output specifications, or the inverter array specifications have been selected. Applies to P8 pins for which the inverter array specifications have been selected.) Contact your Sanyo representative for the electrical characteristics when the inverter array or buffer array options are specified. 5. We recommend the use of reflow soldering techniques to solder mount QFP packages. Please consult with your Sanyo representative for details on process conditions if the package itself is to be directly immersed in a solder dip bath (solder dip or spray techniques). No. 5487-13/27 LC66P2316 Parameter Symbol Conditions Ratings Unit Note Maximum supply voltage V DD max V DD –0.3 to +7.0 V VIN1 P2, P3 (except for the P33/HOLD pin), –0.3 to +12.0 V 1 Input voltage P61, and P63 VIN2 All other inputs –0.3 to V DD + 0.3 V 2 VOUT 1 P2, P3 (except for the P33/HOLD pin), –0.3 to +12.0 V 1 Output voltage P61, and P63 VOUT 2 All other inputs –0.3 to V DD + 0.3 V 2 ION 1 P0, P1, P2, P3 (except for the P33/HOLD pin), 20 mA 3P4, P5, P6, PC Output current per pin ION 2 P41, P43, PC3, PD1, PD3 20 mA 3 –IOP 1 P0, P1, P4, P5 2 mA 4 –IOP 2 P2, P3 (except for the P33/HOLD pin), P6,and PC 4 mA 4 S ION 1 P0, P1, P2, P3 (except for the P33/HOLD pin), PD 75 mA 3 Total pin current S ION 2 P4, P5, P6, PC 75 mA 3 S IOP 1 P0, P1, P2, P3 (except for the P33/HOLD pin), PD 25 mA 4 S IOP 2 P4, P5, P6, PC 25 mA 4 Allowable power dissipation Pd max Ta = –30 to +70°C: DIP42S (QFP48E) 600 (430) mW 5 Operating temperature Topr –30 to +70 °C Storage temperature Tstg –55 to +125 °C SW DASEC O Pin 1 Aligned to the top SW DASEC Cut corner Pin 1 Pin 1 LC66P2316 (DIP) LC66P2316 (QFP) Write board (W66EP5316D) Write board (W66EP2316Q)

Allowable Operating Ranges at Ta = –30 to +70°C, VSS = 0 V, VDD = 4.0 to 5.5 V, unless otherwise specified. Note: 1. Applies to pins with open-drain specifications. However, VIH2 applies to the P33/HOLD pin. When ports P2, P3, and P6 have CMOS output specifications they cannot be used as input pins. 2. PC port pins with CMOS output specifications cannot be used as input pins. Contact your Sanyo representative for the allowable operating ranges for P4 and PD when the inverter array is used. No. 5487-14/27 LC66P2316 Parameter Symbol Conditions min typ max Unit Note Operating supply voltage V DD VDD 4.0 5.5 V Memory retention supply voltage VDD HV DD : During hold mode 1.8 5.5 V VIH1 P2, P3 (except for the P33/HOLD pin), 0.8 VDD 10.0 V 1P61, and P63: N-channel output transistor off Input high-level voltage V IH2 P33/HOLD, RES, OSC1: 0.8 VDD VDD VN-channel output transistor off VIH3 P0, P1, P4, P5, PC, PD, PE: 0.8 VDD VDD V2N-channel output transistor off VIL1 P2, P3 (except for the P33/HOLD pin), P6, VSS 0.2 VDD V1RES, and OSC1: N-channel output transistor off Input low-level voltage VIL2 P33/HOLD: V DD = 1.8 to 5.5 V V SS 0.2 VDD V VIL3 P0, P1, P4, P5, PC, PD, PE, TEST: VSS 0.2 VDD V2N-channel output transistor off Operating frequency fop 0.4 4.20 MHz (instruction cycle time) (Tcyc) (10) (0.95) (µs) [External clock input conditions] OSC1: Defined by Figure 1. Input the clock Frequency f ext signal to OSC1 and leave OSC2 open. 0.4 4.20 MHz(External clock input must be selected as the oscillator circuit option.) OSC1: Defined by Figure 1. Input the clock Pulse width t extH, textL signal to OSC1 and leave OSC2 open. 100 ns(External clock input must be selected as the oscillator circuit option.) OSC1: Defined by Figure 1. Input the clock Rise and fall times t extR, textF signal to OSC1 and leave OSC2 open. 30 ns(External clock input must be selected as the oscillator circuit option.)

Electrical Characteristics at Ta = –30 to +70°C, VSS = 0 V, VDD = 4.0 to 5.5 V unless otherwise specified. No. 5487-15/27 LC66P2316 Parameter Symbol Conditions min typ max Unit Note P2, P3 (except for the P33/HOLD pin), IIH1 P61, and P63: V IN = 10.0 V, with the output 5.0 µA 1 Nch transistor off P0, P1, P4, P5, PC, OSC1, and P33/HOLD IIH2 (Does not apply to PD, PE, PC2, PC3, P61, 1.0 µA 1Input high-level current and P63):V IN = VDD , with the output Nch transistor off IIH3 PD, PE, PC2, PC3: VIN = VDD , 1.0 µA 1with the output Nch transistor off IIH4 RES: V IN = VDD , operating, halt mode 10 µA 1 IIH5 RES: V IN = VDD , hold mode 1.0 µA 1 IIL1 Input ports other than PD, PE, PC2, and PC3: –1.0 µA 2 Input low-level current VIN = VSS , with the output Nch transistor off IIL2 PC2, PC3, PD, PE: VIN = VSS , –1.0 µA 2with the output Nch transistor off IIL3 RES: V IN = VSS 100 µA 1 P2, P3 (except for the P33/HOLD pin), VDD – 1.0 Output high-level voltage V OH 1 P6, and PC: IOH = –1 mA P2, P3 (except for the P33/HOLD pin), VDD – 0.5P6, and PC: IOH = –0.1 mA Value of the output pull-up resistor RPO P0, P1, P4, P5 30 100 150 kΩ 4 VOL 1 P0, P1, P2, P3, P4, P5, P6, and PC 0.4 V Output low-level voltage (except for the P33/HOLD pin): IOL = 1.6 mA VOL 2 P0, P1, P2, P3, P4, P5, P6, and PC 1.5 V(except for the P33/HOLD pin): IOL = 8 mA IOFF 1 P2, P3, P61, P63: VIN = VDD 5.0 µA 5 Output off leakage current IOFF 2 Does not apply to P2, P3, P61, and P63: 1.0 µA 5VIN = VDD [Schmitt characteristics] Hysteresis voltage V HYS 0.1 VDD V High-level threshold voltage Vt H P2, P3, P5, P6, OSC1 (EXT), RES 0.5 V DD 0.8 VDD V Low-level threshold voltage Vt L 0.2 VDD 0.5 VDD V [Ceramic oscillator] Oscillator frequency f CF OSC1, OSC2: Figure 2, 4 MHz 4.0 MHz Oscillator stabilization time f CFS Figure 3, 4 MHz 10.0 ms [Serial clock] Cycle time Input tCKCY 0.9 µs Output 2.0 Tcyc Low-level and high-level Input t CKL 0.4 µs pulse widths Output t CKH 1.0 Tcyc Rise an fall times Output t CKR , tCKF 0.1 µs [Serial input] Data setup time t ICK 0.3 µs Data hold time t CKI 0.3 µs [Serial output] SO0: With the timing of Figure 4 and Output delay time t CKO the test load of Figure 5. Stipulated with respect 0.3 µs to the falling edge (fl) of SCK0. SI0: With the timing of Figure 4. Stipulated with respect to the rising edge (›) of SCK0. SCK0: With the timing of Figure 4 and the test load of Figure 5. Continued on next page.

Continued from preceding page. Note: 1. With the output Nch transistor off in shared I/O ports with the open-drain output specifications. These pins cannot be used as input pins if the CMOS output specifications are selected.When the port option is selected for PE. 2. With the output Nch transistor off in shared I/O ports with the open-drain output specifications. The rating for the pull-up output specification pins is stipulated in terms of the output pull-up current IPO. These pins cannot be used as input pins if the CMOS output specifications are selected. 3. With the output Nch transistor off for CMOS output specification pins. 4. With the output Nch transistor off for pull-up output specification pins. 5. With the output Nch transistor off for open-drain output specification pins. 6. Reset state Tone (DTMF) Output Characteristics DC Characteristics at Ta = –30 to +70°C, VSS = 0 V Figure 1 External Clock Input Waveform No. 5487-16/27 LC66P2316 Parameter Symbol Conditions min typ max Unit Note [Pulse conditions] INT0: Figure 6, conditions under which the INT0 INT0 high and low-level t IOH, tIOL interrupt can be accepted, conditions under 2 Tcycwhich the timer 0 event counter or pulse width measurement input can be accepted High and low-level pulse widths tIIH, tIIL INT1, INT2: Figure 6, conditions under which 2 Tcycfor interrupt inputs other than INT0 the corresponding interrupt can be accepted PIN1 high and low-level tPINH , tPINL PIN1: Figure 6, conditions under which the 2 Tcycpulse widths timer 1 event counter input can be accepted RES high and low-level tRSH , tRSL RES: Figure 6, conditions under which reset 3 Tcycpulse widths can be applied. Operating current drain I DD OP VDD : 4-MHz ceramic oscillator 6.0 12 mA VDD : 4-MHz external clock 6.0 12 mA Halt mode current drain I DDHALT VDD : 4-MHz ceramic oscillator 4 8 mA VDD : 4-MHz external clock 4 8 mA Hold mode current drain I DDHOLD VDD : VDD = 1.8 to 5.5 V 0.01 10 µA Parameter Symbol Conditions min typ max Unit Tone distortion THD1 DT: Single tone, V DD = 4.0 to 5.5 V 2 7 % textLOPEN (OSC2)OSC1 textRtextF VSS VDD 0.2VDD 0.8VDD 1/fext textHExternal clock

Figure 2 Ceramic Oscillator Circuit Figure 3 Oscillator Stabilization Period Table 1 Guaranteed Ceramic Oscillator Constants External capacitor type Figure 4 Serial I/O Timing Figure 5 Timing Load Figure 6 Input Timing for the INT0, INT1, INT2, PIN1, and RES pins Figure 7 Tone Output Pin Load No. 5487-17/27 LC66P2316 External capacitor type Built-in capacitor type

4 MHz C1 = 33 pF ± 10% 4 MHz

(Murata Mfg. Co., Ltd.) C2 = 33 pF ± 10% (Murata Mfg. Co., Ltd.) CSA4.00MG CST4.00MG (Kyocera Corporation) C2 = 33 pF ± 10% (Kyocera Corporation) KBR4.0MS KBR4.0MES OSC2OSC1 C1 C2 Ceramic oscillator /n00 /n01/n03 VDD OSC 0V Oscillator unstable period tCFS Stable oscillation Operating VDD minimum value tICK tCKI tCKL tCKR tCKCY tCKH tCKF 0.8VDD (input) VDD -1 (output)0.2VDD (input) SCK0 SCK1 SI0 SI1 SO0 SO1 0.4VDD (output) 0.8VDD 0.2VDD tCK0 VDD -1 0.4VDD C=50pF TEST point R=1kΩ tI0H tI1H tPINH tRSH tI0L tI1L tPINL tRSL 0.8VDD 0.2VDD P60/ML P62/DT R=10 k

Preconditions for mounting one-time programmable microprocessors Usage Notes Due to inherent structural considerations, it is impossible to fully test one-time programmable microprocessors before the PROM has been programmed, i.e. before shipment from the factory. We recommend that users screen products whose PROM has been written according to the following procedure to improve the reliability of these products.

  • Due to the nature of the product, it is not possible to test write operations to all bits in one-time programmable microprocessors whose PROM has not been written. Therefore it may be impossible to guarantee a 100% yield on writing to these products. Please understand that no such guarantee may be made.
  • Storage of products in the moisture-proof packed (unopened) state
  • Store products in moisture-proof packages in an environment in which the temperature is no higher than 30°C and the relative humidity is no higher than 70%.
  • Storage of products after opening the moisture-proof packaging
  • After opening products that were packed in moisture-proof packaging, mount (solder) those products as soon as possible. Store products for no more than 96 hours after opening the moisture-proof packaging in an environment in which the temperature is no higher than 30°C and the relative humidity is no higher than 70%. a. Preconditions for mounting products that were programmed by the user b. Preconditions for mounting products that were programmed by Sanyo Sanyo ROM writing service Sanyo provides a for-fee ROM writing service that includes writing the one-time programmable ROM, printing, screening, and read-out verification. Contact your Sanyo sales representative for details. No. 5487-18/27 LC66P2316 DIP/QFP product Mounting Mounting Programming and verification Recommended screening conditions High-temperature bake (disconnected) 150°C ±5°C, 24 HR +1HR –0HR Program data verification DIP/QFP product

LC66XXXX Series Instruction Table (by function) Abbreviations: AC: Accumulator E: E register CF: Carry flag ZF: Zero flag HL: Data pointer DPH, DPL XY: Data pointer DPX, DPY M: Data memory M (HL): Data memory pointed to by the DPH, DPL data pointer M (XY): Data memory pointed to by the DPX, DPY auxiliary data pointer M2 (HL): Two words of data memory (starting on an even address) pointed to by the DPH, DPL data pointer SP: Stack pointer M2 (SP): Two words of data memory pointed to by the stack pointer M4 (SP): Four words of data memory pointed to by the stack pointer in: n bits of immediate data t2: Bit specification PCh: Bits 8 to 11 in the PC PCm: Bits 4 to 7 in the PC PCl: Bits 0 to 3 in the PC Fn: User flag, n = 0 to 15 TIMER0: Timer 0 TIMER1: Timer 1 SIO: Serial register P: Port P (i4): Port indicated by 4 bits of immediate data INT: Interrupt enable flag ( ), [ ]: Indicates the contents of a location ‹ : Transfer direction, result : Exclusive or : Logical and : Logical or +: Addition –: Subtraction —: Taking the one's complement No. 5487-19/27 LC66P2316 t2 11 10 01 00 Bit 2 3 22 21 20

No. 5487-20/27 LC66P2316 Continued on next page. Instruction code Affected Mnemonic Operation Description status Note D 7 D 6 D 5 D 4 D 3 D 2 D 1 D 0 bits [Accumulator manipulation instructions] CLA Clear AC 1000 0000 1 1 AC ‹ 0 Clear AC to 0. ZF Has a vertical (Equivalent to LAI 0.) skip function. DAA Decimal adjust AC 1100 1111 22 AC ‹ (AC) + 6 Add six to AC. ZFin addition 0010 0110 (Equivalent to ADI 6.) Decimal adjust AC 1100 1111 AC ‹ (AC) + 10 DAS in subtraction 0010 1010 2 2 (Equivalent to Add 10 to AC. ZF ADI 0AH.) CLC Clear CF 0001 1110 1 1 C F ‹ 0 Clear CF to 0. CF STC Set CF 0001 1111 1 1 C F ‹ 1 Set CF to 1. CF CMA Complement AC 0001 1000 1 1 A C ‹ (AC) Take the one’s complement ZFof AC. IA Increment AC 0001 0100 1 1 A C ‹ (AC) + 1 Increment AC. ZF, CF DA Decrement AC 0010 0100 1 1 A C ‹ (AC) – 1 Decrement AC. ZF, CF Rotate AC right AC 3 ‹ (CF), RAR through CF 0001 0000 1 1 ACn ‹ (ACn + 1), Shift AC (including CF) right. CF CF ‹ (AC0) Rotate AC left AC 0 ‹ (CF), RAL through CF 0000 0001 1 1 ACn + 1 ‹ (ACn), Shift AC (including CF) left. CF, ZF CF ‹ (AC3) TAE Transfer AC to E 0100 0101 1 1 E ‹ (AC) Transfer the contents of AC to E. TEA Transfer E to AC 0100 0110 1 1 A C ‹ (E) Transfer the contents of E to AC.ZF XAE Exchange AC with E 0100 0100 1 1 (AC) « (E) Exchange the contents of AC and E. [Memory manipulation instructions] IM Increment M 0001 0010 1 1 M (HL) ‹ Increment M (HL). ZF, CF[M (HL)] + 1 DM Decrement M 0010 0010 1 1 M (HL) ‹ Decrement M (HL). ZF, CF[M (HL)] – 1 IMDR i8 Increment M direct 1100 0111 2 2 M (i8) ‹ [M (i8)] + 1 Increment M (i8). ZF, CFI7 I6 I5 I4 I3 I2 I1 I0 DMDR i8 Decrement M direct 1100 0011 2 2 M (i8) ‹ [M (i8)] – 1 Decrement M (i8). ZF, CFI7 I6 I5 I4 I3 I2 I1 I0 SMB t2 Set M data bit 0000 11t 1 t0 1 1 [M (HL), t2] ‹ 1 Set the bit in M (HL) specified by t0 and t1 to 1. RMB t2 Reset M data bit 0010 11t 1 t0 1 1 [M (HL), t2] ‹ 0 Clear the bit in M (HL) ZFspecified by t0 and t1 to 0. [Arithmetic, logic and comparison instructions] Add the contents of AC and AD Add M to AC 0000 0110 1 1 AC ‹ (AC) + M (HL) as two’s complement ZF, CF[M (HL)] values and store the result in AC. Add the contents of AC and ADDR i8 Add M direct to AC 1100 1001 2 2 AC ‹ (AC) + [M (i8)]M (i8) as two’s complement ZF, CFI7 I6 I5 I4 I3 I2 I1 I0 values and store the result in AC. Add the contents of AC, ADC Add M to AC with CF 0000 0010 1 1 AC ‹ (AC) + M (HL) and C as two’s ZF, CF[M (HL)] + (CF) complement values and store the result in AC. Add the contents of AC and ADI i4 Add immediate data 1100 1111 22 AC ‹ (AC) + the immediate data as two’s ZFt o A C 0010 I 3 I2 I1 I0 I3, I2, I1, I0 complement values and store the result in AC. Subtract the contents of AC CF will be zero if SUBC Subtract AC from M 0001 0111 1 1 AC ‹ [M (HL)] – and CF from M (HL) as two’s ZF, CF there was a with CF (AC) – (CF) complement values and store borrow and one the result in AC. otherwise. And M with AC then AC ‹ (AC) Take the logical and of AC ANDA store AC 0000 0111 1 1 [M (HL)] and M (HL) and store the ZF result in AC. Or M with AC then AC ‹ (AC) Take the logical or of AC and ORA store AC 0000 0101 1 1 [M (HL)] M (HL) and store the result ZF in AC. Number of bytes Number of cycles

Continued from preceding page. No. 5487-21/27 LC66P2316 Continued on next page. Instruction code Affected Mnemonic Operation Description status Note D 7 D 6 D 5 D 4 D 3 D 2 D 1 D 0 bits [Arithmetic, logic and comparison instructions] Exclusive or M with AC ‹ (AC) Take the logical exclusive or EXL AC then store AC 0001 0101 1 1 [M (HL)] of AC and M (HL) and store ZF the result in AC. And M with AC then M (HL) ‹ (AC) Take the logical and of AC ANDM store M 0000 0011 1 1 [M (HL)] and M (HL) and store the ZF result in M (HL). Or M with AC then M (HL) ‹ (AC) Take the logical or of AC and ORM store M 0000 0100 1 1 [M (HL)] M (HL) and store the result ZF in M (HL). Compare the contents of AC and M (HL) and set or clear CF and ZF according to the result. CM Compare AC with M 0001 0110 1 1 [ M (HL)] + (AC) + 1 ZF, CF Compare the contents of AC and the immediate data I

3 I2 I1 I0 and set or clear CF

and ZF according to the result. CI i4 Compare AC with 1100 1111 22 I 3 I2 I1 I0 + (AC) + 1 ZF, CFimmediate data 1010 I 3 I2 I1 I0 ZF ‹ 1 Compare the contents of DP L CLI i4 Compare DP L with 1100 1111 22 if (DPL) = I3 I2 I1 I0 with the immediate data. ZFimmediate data 1011 I 3 I2 I1 I0 ZF ‹ 0 Set ZF if identical and clear if (DPL) ≠ I3 I2 I1 I0 ZF if not. ZF ‹ 1 if (AC, t2) = [M (HL), Compare the corresponding CMB t2 Compare AC bit with1100 1111 22 t2] bits specified by t0 and t1 in ZFM data bit 1101 00t 1 t0 ZF‹ 0 AC and M (HL). Set ZF if if (AC, t2) ≠ [M (HL), identical and clear ZF if not. t2] [Load and store instructions] LAE Load AC and E from 0101 1100 1 1 AC ‹ M (HL), Load the contents of M2 (HL) M2 (HL) E ‹ M (HL + 1) into AC, E. LAI i4 Load AC with 1000 I

3 I2 I1 I0 1 1 AC ‹ I3 I2 I1 I0

Load the immediate data ZF Has a vertical immediate data into AC. skip function LADR i8 Load AC from M 1100 0001 2 2 AC ‹ [M (i8)] Load the contents of M (i8) ZFdirect I 7 I6 I5 I4 I3 I2 I1 I0 into AC. S Store AC to M 0100 0111 1 1 M (HL) ‹ (AC) Store the contents of AC into M (HL). SAE Store AC and E to 0101 1110 1 1 M (HL) ‹ (AC) Store the contents of AC, E M2 (HL) M (HL + 1) ‹ (E) into M2 (HL). Load the contents of M (reg) into AC. The reg is either HL or XY Load AC from depending on t LA reg M (reg) 0100 10t 0 0 1 1 AC ‹ [M (reg)] ZF Number of bytes Number of cycles Magnitude CF ZFcomparison [M (HL)] > (AC) 0 0 [M (HL)] = (AC) 1 1 [M (HL)] < (AC) 1 0 Magnitude CF ZFcomparison I3 I2 I1 I0 > AC 0 0 I3 I2 I1 I0 = AC 1 1 I3 I2 I1 I0 < AC 1 0 reg T 0 HL 0 XY 1

Continued from preceding page. No. 5487-22/27 LC66P2316 Continued on next page. Instruction code Affected Mnemonic Operation Description status Note D 7 D 6 D 5 D 4 D 3 D 2 D 1 D 0 bits [Load and store instructions] Load the contents of M (reg) into AC. (The reg is either HL ZF is set Load AC from M (reg) AC ‹ [M (reg)] or XY.) Then increment the according to the LA reg, Ithen increment reg 0100 10t 0 11 2 D P L ‹ (DPL) + 1 contents of either DPL or DPY. ZF result of or DPY ‹ (DPY) + 1 The relationship between t0 incrementing and reg is the same as that DP L or DPY. for the LA reg instruction. Load the contents of M (reg) into AC. (The reg is either HL ZF is set Load AC from M (reg) AC ‹ [M (reg)] or XY.) Then decrement the according to the LA reg, Dthen decrement reg 0101 10t 0 11 2 D P L ‹ (DPL) – 1 contents of either DPL or DPY. ZF result of or DPY ‹ (DPY) – 1 The relationship between t0 decrementing and reg is the same as that DP L or DPY. for the LA reg instruction. Exchange the contents of M (reg) and AC. The reg is either HL or XY Exchange AC with depending on t XA reg M (reg) 0100 11t 0 0 1 1 (AC) « [M (reg)] Exchange the contents of M (reg) and AC. (The reg is ZF is set Exchange AC with (AC) « [M (reg)] either HL or XY.) Then according to the XA reg, I M (reg) then 0100 11t 0 11 2 D P L ‹ (DPL) + 1 increment the contents of ZF result of increment reg or DP Y ‹ (DPY) + 1 either DPL or DPY. The incrementing relationship between t0 and DP L or DPY.reg is the same as that for the XA reg instruction. Exchange the contents of M (reg) and AC. (The reg is ZF is set Exchange AC with (AC) « [M (reg)] either HL or XY.) Then according to the XA reg, D M (reg) then 0101 11t 0 11 2 D P L ‹ (DPL) – 1 decrement the contents of ZF result of decrement reg or DP Y ‹ (DPY) – 1 either DPL or DPY. The decrementing relationship between t0 and DP L or DPY.reg is the same as that for the XA reg instruction. XADR i8 Exchange AC with 1100 1000 2 2 (AC) « [M (i8)] Exchange the contents of AC M direct I 7 I6 I5 I4 I3 I2 I1 I0 and M (i8). LEAI i8 Load E & AC with 1100 0110 22 E ‹ I7 I6 I5 I4 Load the immediate data i8 immediate data I 7 I6 I5 I4 I3 I2 I1 I0 AC ‹ I3 I2 I1 I0 into E, AC. Load into E, AC the ROM data RTBL Read table data from0101 1010 1 2 E, AC ‹ at the location determined by program ROM [ROM (PCh, E, AC)] replacing the lower 8 bits of the PC with E, AC. Output from ports 4 and 5 the Read table data from Port 4, 5 ‹ ROM data at the location RTBLP program ROM then 0101 1000 1 2 [ROM (PCh, E, AC)]determined by replacing the output to P4, 5 lower 8 bits of the PC with E, AC. [Data pointer manipulation instructions] Load DPH with zero LDZ i4 and DPL with 0110 I 3 I2 I1 I0 11 DP H ‹ 0 Load zero into DP H and the immediate data DPL ‹ I3 I2 I1 I0 immediate data i4 into DPL. respectively LHI i4 Load DPH with 1100 1111 22 D P H ‹ I3 I2 I1 I0 Load the immediate data i4 immediate data 0000 I 3 I2 I1 I0 into DPH . LLI i4 Load DPL with 1100 1111 22 D P L ‹ I3 I2 I1 I0 Load the immediate data i4 immediate data 0001 I 3 I2 I1 I0 into DPL. LHLI i8 Load DPH , DPL with 1100 0000 22 DP H ‹ I7 I6 I5 I4 Load the immediate data into immediate data I 7 I6 I5 I4 I3 I2 I1 I0 DP L ‹ I3 I2 I1 I0 DL H , DPL. LXYI i8 Load DPX, DPY with 1100 0000 22 DP X ‹ I7 I6 I5 I4 Load the immediate data into immediate data I 7 I6 I5 I4 I3 I2 I1 I0 DP Y ‹ I3 I2 I1 I0 DL X, DPY. Number of bytes Number of cycles reg T 0 HL 0 XY 1

Continued from preceding page. No. 5487-23/27 LC66P2316 Continued on next page. Instruction code Affected Mnemonic Operation Description status Note D 7 D 6 D 5 D 4 D 3 D 2 D 1 D 0 bits [Data pointer manipulation instructions] IL Increment DP L 0001 0001 1 1 D P L ‹ (DPL) + 1 Increment the contents ZFof DPL. DL Decrement DP L 0010 0001 1 1 D P L ‹ (DPL) – 1 Decrement the contents ZFof DPL. IY Increment DP Y 0001 0011 1 1 D P Y ‹ (DPY) + 1 Increment the contents ZFof DPY. DY Decrement DP Y 0010 0011 1 1 D P Y ‹ (DPY) – 1 Decrement the contents ZFof DPY. TAH Transfer AC to DP H 1100 1111 22 D P H ‹ (AC) Transfer the contents of AC 1111 0000 t o D P H . THA Transfer DP H to AC 1100 1111 2 2 AC ‹ (DPH ) Transfer the contents of DPH ZF1110 0000 t o A C . XAH Exchange AC 0100 0000 1 1 (AC) « (DPH ) Exchange the contents of AC with DPH and DPH . TAL Transfer AC to DP L 1100 1111 22 D P L ‹ (AC) Transfer the contents of AC 1111 0001 t o D P L. TLA Transfer DP L to AC 1100 1111 2 2 AC ‹ (DPL) Transfer the contents of DPL ZF1110 0001 t o A C . XAL Exchange AC 0100 0001 1 1 (AC) « (DPL) Exchange the contents of AC with DPL and DPL. TAX Transfer AC to DP X 1100 1111 22 D P X ‹ (AC) Transfer the contents of AC 1111 0010 t o D P X. TXA Transfer DP X to AC 1100 1111 2 2 AC ‹ (DPX) Transfer the contents of DPX ZF1110 0010 t o A C . XAX Exchange AC 0100 0010 1 1 (AC) « (DPX) Exchange the contents of AC with DPX and DPX. TAY Transfer AC to DP Y 1100 1111 22 D P Y ‹ (AC) Transfer the contents of AC 1111 0011 t o D P Y. TYA Transfer DP Y to AC 1100 1111 2 2 AC ‹ (DPY) Transfer the contents of DPY ZF1110 0011 t o A C . XAY Exchange AC 0100 0011 1 1 (AC) « (DPY) Exchange the contents of AC with DPY and DPY. [Flag manipulation instructions] SFB n4 Set flag bit 0111 n 3 n2 n1 n0 1 1 Fn ‹ 1 Set the flag specified by n4 to 1. RFB n4 Reset flag bit 0011 n 3 n2 n1 n0 1 1 Fn ‹ 0 Reset the flag specified ZFby n4 to 0. [Jump and subroutine instructions] PC13, 12 ‹ This becomes JMP Jump in the current 1110P 11P10P9 P8 PC13, 12 Jump to the location in the PC12 + (PC12) addr bank P 7 P6 P5 P4 P3 P2 P1 P0

22 PC11 to 0 ‹ same bank specified by the immediately

immediate data P12. following a BANK instruction. Jump to the address PC13 to 8 ‹ Jump to the location JPEA stored at E and AC 0010 0111 1 1 PC13 to 8, determined by replacing the in the current page PC7 to 4 ‹ (E), lower 8 bits of the PC PC3 to 0 ‹ (AC) by E, AC. PC13 to 11 ‹ 0, PC10 to 0 ‹ CAL Call subroutine 0101 0 P 10P9 P8 22 P10 to P0, Call a subroutine.addr P 7 P6 P5 P4 P3 P2 P1 P0 M4 (SP)‹ (CF, ZF, PC13 to 0), SP ‹ (SP)-4 PC13 to 6, PC10 ‹ 0, CZP Call subroutine in the 1010 P

3 P2 P1 P0 12 PC5 to 2 ‹ P3 to P0, Call a subroutine on page 0

addr zero page M4 (SP) ‹ in bank 0. (CF, ZF, PC12 to 0), SP ‹ SP-4 BANK Change bank 0001 1011 1 1 Change the memory bank and register bank. Number of bytes Number of cycles

Continued from preceding page. No. 5487-24/27 LC66P2316 Instruction code Affected Mnemonic Operation Description status Note D 7 D 6 D 5 D 4 D 3 D 2 D 1 D 0 bits [Jump and subroutine instructions] Store the contents of reg in M2 (SP). Subtract 2 from SP after the store. PUSH Push reg on M2 (SP)1100 1111 22 M2 (SP) ‹ (reg) r e g 1111 1i 1 i0 0 SP ‹ (SP) – 2 Add 2 to SP and then load the POP 1100 1111 S P ‹ (SP) + 2 contents of M2(SP) into reg. reg Pop reg off M2 (SP)1110 1i 1 i0 0 22 reg ‹ [M2 (SP)] The relation between i1i0 and reg is the same as that for the PUSH reg instruction. Return from SP ‹ (SP) + 4 Return from a subroutine or RT subroutine 0001 1100 1 2 PC ‹ [M4 (SP)] interrupt handling routine. ZF and CF are not restored. Return from interrupt SP ‹ (SP) + 4 Return from a subroutine or RTI routine 0001 1101 1 2 P C ‹ [M4 (SP)] interrupt handling routine. ZF ZF, CF CF, ZF ‹ [M4 (SP)] and CF are restored. [Branch instructions] PC7 to 0 ‹ Branch to the location in the BAt2 Branch on AC bit 1101 00t 1 t0 22 P7 P6 P5 P4 same page specified by P7 to addr P 7 P6 P5 P4 P3 P2 P1 P0 P3 P2 P1 P0 P0 if the bit in AC specified by if (AC, t2) = 1the immediate data t1 t0 is one. PC7 to 0 ‹ Branch to the location in the BNAt2 Branch on no AC bit1001 00t 1 t0 22 P7 P6 P5 P4 same page specified by P7 to addr P 7 P6 P5 P4 P3 P2 P1 P0 P3 P2 P1 P0 P0 if the bit in AC specified by if (AC, t2) = 0the immediate data t1 t0 is zero. PC7 to 0 ‹ Branch to the location in the BMt2 1101 01t 1 t0 P7 P6 P5 P4 same page specified by P7 to addr Branch on M bit P7 P6 P5 P4 P3 P2 P1 P0

22 P 3 P2 P1 P0 P0 if the bit in M (HL) specified

if [M (HL),t2] by the immediate data t1 t0 = 1 is one. PC7 to 0 ‹ Branch to the location in the BNMt2 1001 01t 1 t0 P7 P6 P5 P4 same page specified by P7 to addr Branch on no M bitP7 P6 P5 P4 P3 P2 P1 P0 if [M (HL),t2] by the immediate data t1 t0 = 0 is zero. Internal control registers can also be tested by PC7 to 0 ‹ Branch to the location in the executing this P

7 P6 P5 P4 same page specified by P7 to instruction

BPt2 Branch on Port bit 1101 10t 1 t0 22 P 3 P2 P1 P0 P0 if the bit in port (DPL) immediately after addr P 7 P6 P5 P4 P3 P2 P1 P0 if [P (DPL), t2] specified by the immediate a BANK = 1 data t 1 t0 is one. instruction. However, this is limited to registers that can be read out. Internal control registers can also be tested by PC7 to 0 ‹ Branch to the location in the executing this P BNPt2 Branch on no Port bit1001 10t 1 t0 22 P 3 P2 P1 P0 P0 if the bit in port (DPL) immediately after addr P 7 P6 P5 P4 P3 P2 P1 P0 if [P (DPL), t2] specified by the immediate a BANK = 0 data t 1 t0 is zero. instruction. However, this is limited to registers that can be read out. Number of bytes Number of cycles Continued on next page. reg i 1 i0 HL 0 0 XY 0 1 AE 1 0 Illegal value 1 1

Continued from preceding page. No. 5487-25/27 LC66P2316 Continued on next page. Instruction code Affected Mnemonic Operation Description status Note D 7 D 6 D 5 D 4 D 3 D 2 D 1 D 0 bits [Branch instructions] PC7 to 0 ‹ Branch to the location in the BC addr Branch on CF 1101 1100 22 P7 P6 P5 P4 same page specified by P7 to P7 P6 P5 P4 P3 P2 P1 P0 P3 P2 P1 P0 P0 if CF is one.if (CF) = 1 PC7 to 0 ‹ Branch to the location in the BNC Branch on no CF 1001 1100 22 P7 P6 P5 P4 same page specified by P7 to addr P 7 P6 P5 P4 P3 P2 P1 P0 P3 P2 P1 P0 P0 if CF is zero.if (CF) = 0 PC7 to 0 ‹ Branch to the location in the BZ addr Branch on ZF 1101 1101 22 P7 P6 P5 P4 same page specified by P7 to P7 P6 P5 P4 P3 P2 P1 P0 P3 P2 P1 P0 P0 if ZF is one.if (ZF) = 1 PC7 to 0 ‹ Branch to the location in the BNZ Branch on no ZF 1001 1101 22 P7 P6 P5 P4 same page specified by P7 to addr P 7 P6 P5 P4 P3 P2 P1 P0 P3 P2 P1 P0 P0 if ZF is zero.if (ZF) = 0 PC7 to 0 ‹ Branch to the location in the BFn4 1111 n 3 n2 n1 n0 P7 P6 P5 P4 same page specified by P0 to addr Branch on flag bitP7 P6 P5 P4 P3 P2 P1 P0

22 P3 P2 P1 P0

P7 if the flag (of the 16 user if (Fn) = 1 flags) specified by n3 n2 n1 n0 is one. PC7 to 0 ‹ Branch to the location in the BNFn4 1011 n 3 n2 n1 n0 P7 P6 P5 P4 same page specified by P0 to addr Branch on no flag bitP7 P6 P5 P4 P3 P2 P1 P0 P7 if the flag (of the 16 user if (Fn) = 0 flags) specified by n3 n2 n1 n0 is zero. [I/O instructions] IP0 Input port 0 to AC 0010 0000 1 1 A C ‹ (P0) Input the contents of port ZF0 to AC. IP Input port to AC 0010 0110 1 1 A C ‹ [P (DPL)] Input the contents of port ZFP (DPL) to AC. IPM Input port to M 0001 1001 1 1 M (HL) ‹ [P (DPL)] Input the contents of port P (DPL) to M (HL). IPDR i4 Input port to 1100 1111 2 2 AC ‹ [P (i4)] Input the contents of ZFAC direct 0110 I 3 I2 I1 I0 P (i4) to AC. Input port 4, 5 to 1100 1111 E ‹ [P (4)] Input the contents of ports IP45 E, AC respectively 1101 0100 22 AC ‹ [P (5)] P (4) and P (5) to E and AC respectively. OP Output AC to port 0010 0101 1 1 P ( D P L) ‹ (AC) Output the contents of AC to port P (DPL). OPM Output M to port 0001 1010 1 1 P ( D P L) ‹ [M (HL)] Output the contents of M (HL) to port P (DPL). OPDR i4 Output AC to 1100 1111 2 2 P (i4) ‹ (AC) Output the contents of AC port direct 0111 I 3 I2 I1 I0 to P (i4). Output E, AC to port1100 1111 P (4) ‹ (E) Output the contents of E and OP45 4, 5 respectively 1101 0101 22 P (5) ‹ (AC) AC to ports P (4) and P (5) respectively. Set to one the bit in port SPB t2 Set port bit 0000 10t 1 t0 1 1 [P (DP L), t2] ‹ 1 P (DP L) specified by the immediate data t1 t0. Clear to zero the bit in port RPB t2 Reset port bit 0010 10t 1 t0 1 1 [P (DP L), t2] ‹ 0 P (DP L) specified by the ZF immediate data t1 t0. And port with P (P 3 to P0) ‹ Take the logical AND of P (P3 ANDPDR immediate data then1100 0101 2 2 [P (P 3 to P0)] to P0) and the immediate data ZFi4, p4 output I3 I2 I1 I0 P3 P2 P1 P0 I3 to I0 I3 I2 I1 I0 and output the result to P (P3 to P0). Or port with P (P 3 to P0) ‹ Take the logical OR of P (P3 ORPDR immediate data then 1100 0100 2 2 [P (P 3 to P0)] to P0) and the immediate data ZF i4, p4 output I3 I2 I1 I0 P3 P2 P1 P0 I3 to I0 I3 I2 I1 I0 and output the result to P (P3 to P0). Number of bytes Number of cycles

Continued from preceding page. No. 5487-26/27 LC66P2316 Instruction code Affected Mnemonic Operation Description status Note D 7 D 6 D 5 D 4 D 3 D 2 D 1 D 0 bits [Timer control instructions] TIMER0 ‹ [M2 (HL)],Write the contents of M2 (HL), WTTM0 Write timer 0 1100 1010 1 2 (AC) AC into the timer 0 reload register. 1100 1111 Write the contents of E, AC WTTM1 Write timer 1 1111 0100 2 2 TIMER1 ‹ (E), (AC) into the timer 1 reload register A. M2 (HL), Read out the contents of the RTIM0 Read timer 0 1100 1011 1 2 AC ‹ (TIMER0) timer 0 counter into M2 (HL), AC. RTIM1 Read timer 1 1100 1111 2 2 E, AC ‹ (TIMER1) Read out the contents of the 1111 0101 timer 1 counter into E, AC. START0 Start timer 0 1100 1111 2 2 Start timer 0 counter Start the timer 0 counter.1110 0110 START1 Start timer 1 1100 1111 2 2 Start timer 1 counter Start the timer 1 counter.1110 0111 STOP0 Stop timer 0 1100 1111 2 2 Stop timer 0 counter Stop the timer 0 counter.1111 0110 STOP1 Stop timer 1 1100 1111 2 2 Stop timer 1 counter Stop the timer 1 counter.1111 0111 [Interrupt control instructions] MSET Set interrupt master1100 1101 2 2 MSE ‹ 1 Set the interrupt master enable flag 0101 0000 enable flag to one. MRESET Reset interrupt 1100 1101 2 2 MSE ‹ 0 Clear the interrupt master master enable flag 1001 0000 enable flag to zero. EIH i4 Enable interrupt high1100 1101 2 2 EDIH ‹ (EDIH) i4Set the interrupt enable flag 0101 I 3 I2 I1 I0 to one. EIL i4 Enable interrupt low1100 1101 2 2 EDIL ‹ (EDIL) i4Set the interrupt enable flag 0100 I 3 I2 I1 I0 to one. DIH i4 Disable interrupt high1100 1101 2 2 EDIH ‹ (EDIH) i4Clear the interrupt enable ZF1001 I 3 I2 I1 I0 flag to zero. DIL i4 Disable interrupt low1100 1101 2 2 EDIL ‹ (EDIL) i4Clear the interrupt enable ZF1000 I 3 I2 I1 I0 flag to zero. WTSP Write SP 1100 1111 2 2 SP ‹ (E), (AC) Transfer the contents of E, 1101 1010 A C t o S P . RSP Read SP 1100 1111 2 2 E, AC ‹ (SP) Transfer the contents of SP 1101 1011 t o E , A C . [Standby control instructions] HALT HALT 1100 1111 2 2 HALT Enter halt mode.1101 1110 HOLD HOLD 1100 1111 2 2 HOLD Enter hold mode.1101 1111 [Serial I/O control instructions] STARTS Start serial I O 1100 1111 2 2 START SI O Start SIO operation.1110 1110 WTSIO Write serial I O 1100 1111 2 2 SIO ‹ (E), (AC) Write the contents of E, 1110 1111 A C t o SIO. RSIO Read serial I O 1100 1111 2 2 E, AC ‹ (SIO) Read out the contents of SIO 1111 1111 into E, AC. [Other instructions] Consume one machine cycle NOP No operation 0000 0000 1 1 N o operation without performing any operation. SB i2 Select bank 1100 1111 2 2 PC13, PC12 ‹ I1 I0 Specify the memory bank.1100 00I 1 I0 Number of bytes Number of cycles

No. 5487-27/27 LC66P2316 This catalog provides information as of February, 1997. Specifications and information herein are subject to change without notice. n No products described or contained herein are intended for use in surgical implants, life-support systems, aerospace equipment, nuclear power control systems, vehicles, disaster/crime-prevention equipment and the like, the failure of which may directly or indirectly cause injury, death or property loss. n Anyone purchasing any products described or contained herein for an above-mentioned use shall: À Accept full responsibility and indemnify and defend SANYO ELECTRIC CO., LTD., its affiliates, subsidiaries and distributors and all their officers and employees, jointly and severally, against any and all claims and litigation and all damages, cost and expenses associated with such use: \` Not impose any responsibility for any fault or negligence which may be cited in any such claim or litigation on SANYO ELECTRIC CO., LTD., its affiliates, subsidiaries and distributors or any of their officers and employees jointly or severally. n Information (including circuit diagrams and circuit parameters) herein is for example only; it is not guaranteed for volume production. SANYO believes information herein is accurate and reliable, but no guarantees are made or implied regarding its use or any infringements of intellectual property rights or other rights of third parties.