The LC66P5316 is an on-chip OTP PROM version of the
LC6653XX Series CMOS 4-bit single-chip microcontrollers. The LC66P5316 is appropriate for program
development and product evaluation since it provides
identical functionality and pin compatibility with the
LC665316A.
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: 42 pins
• A sub-oscillator circuit can be used (option)
This circuit allows power dissipation to be reduced by
operating at lower speeds.
• 8-bit serial interface: two circuits (can be connected in
cascade to form a 16-bit interface)
• 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 8 interrupt factors and 8
interrupt vector locations.
— External interrupts: 3 factors/3 vector locations
— Internal interrupts: 5 factors/5 vector locations
• Flexible I/O functions
16-value comparator inputs, 20-mA drive outputs,
inverter circuits, pull-up and open-drain circuits
selectable as options.
• Optional runaway detection function (watchdog timer)
• 8-bit I/O functions
• Power saving functions using halt and hold modes.
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. 5489-3/28
Page 4
LC66P5316
Usage Notes
The LC66P5316 was created for program development, product evaluation, and prototype development for products
based on the LC6653XX 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.)
V
min
V
DD
OSC
RES
DD
At least 10 ms
Oscillator
stabilization
At least 3
instruction
Program execution (PC)
Port output type
Open drain
Option switching
period
9 instruction
cycles
Location 0Location
1
Option specification
2. Notes on LC6653XX 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 forfee 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. 5489-4/28
Page 5
LC66P5316
Main differences between the LC66E5316, LC66P5316, and LC6653XX Series
ItemLC6653XX Series (mask version)LC66E5316LC66P5316
Differences in the main
characteristics–30 to +70°C+10 to +40°C–30 to +70°C
• Operating temperature range
3.0 to 5.5 V/0.95 to 10 µs4.5 to 5.5 V/0.95 to 10 µs4.0 to 5.5 V/0.92 to 10 µs
• Operating supply voltage/operating
frequency (cycle time)
• Input high-level current (RES)Maximum: 1 µA(normal operation and halt mode)(normal operation and halt mode)
• Current drain
(Operating at 4 MHz)
(Operating at 32 kHz)
(Halt mode at 4 MHz)Typical: 10 nA, maximum: 10 µA*Typical: 10 nA, maximum: 10 µA*
(Halt mode at 32 kHz)
(Hold mode)
Port output types at reset
Package
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 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.
(When the main oscillator is (When the main oscillator is (When the main oscillator is
operating)operating)operating)
3.0 to 5.5 V/25 to 127 µs4.5 to 5.5 V/25 to 127 µs4.0 to 5.5 V/25 to 127 µs
(When the sub-oscillator is operating) (When the sub-oscillator is operating) (When the sub-oscillator is operating)
Typical: 10 µA Typical: 10 µA
Hold mode: 1 µA maximumHold mode: 1 µA maximum
Typical: 10 nA, maximum: 10 µA
The output type specified in
the options
• DIP48S• DIC52S window package• DIP48S
• QFP48E• QFC48 window package• QFP48E
Larger than that for the mask versions Larger than that for the mask versions
Open-drain outputsOpen-drain outputs
See the data sheets for the individual products for details on other differences.
System Block Diagram
RAM STACK
RES
TEST
OSC1
OSC2
HOLD
XT1
XT2
AN1 to 4
SYSTEM
CONTROL
ADC
PE
PD
PC
(512W)
FLAG
E
D
D
D
SPEA
M
P
P
P
R
X
L
H
PRESCALER
CZ
D
P
Y
ALU
MPX TIMER0 SERIAL I/O 0
MPX
INTERRUPT
CONTROL
MPX
TIMER1
P0P1P2P3P4P5P6
SERIAL I/O 1
P8
OTP ROM
(16KB)
PC
POUT0
SI0
SO0
SCK0
INT0
INT1, INT2
SI1
SO1
SCK1
PIN1, POUT1
INV
xOINVxI
DS1DS0
PROM
control
(x=0 to 4)
A0 to A13
D0 to D7
CE
DASEC
VPP/OE
EPMOD
TA
No. 5489-5/28
Page 6
Pin Function Overview
LC66P5316
PinI/OOverviewOutput driver typeOptions
P00/D0
P01/D1
P02/D2
P03/D3
P10/D4
P11/D5
P12/D6
P13/D7
P20/SI0/A0
P21/SO0/A1
P22/SCK0/
A2
P23/INT0/A3
I/O ports P00 to P03
• Input or output in 4-bit or 1-bit units
• P00 to P03 support the halt mode
I/O
control function (This function can be
specified in 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
I/O
• 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
I/O
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
• 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
• Pull-up MOS or
• Output level on
• Pull-up MOS or
• Output level on
CMOS or Nch OD
output
Nch OD output
reset
Nch OD output
reset
State after a Standby mode
resetoperation
Hold mode:
High or low
(option)
High or low
(option)
H
Output off
Halt mode:
Output
retained
Hold mode:
Output off
Halt mode:
Output
retained
Hold mode:
Output off
Hold mode:
Output off
P30/INT1/A4
P31/POUT0/
A5
P32/POUT1/
A6
P33/HOLD
P40/INV0I/
A7
P41/INV0O/
A8
P42/INV1I/
A9
P43/INV1O/
A10
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.
I/O
• 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
I
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
I/O
data when used in conjunction with
P50 to P53.
• Dedicated inverter circuit (option)
• Used as address pins in EPROM mode
• 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
CMOS or Nch OD
output
• Pull-up MOS or
Nch OD output
• Output level on
reset
• Inverter circuit
H
• High or
low
(option)
• Inverter
I/O is set
to the
output off
state.
Hold mode:
Output off
Halt mode:
Output
retained
Hold mode:
Port output
off, inverter
output off
Halt mode:
Port output
retained,
inverter
output
continues
Continued on next page.
No. 5489-6/28
Page 7
Continued from preceding page.
LC66P5316
PinI/OOverviewOutput driver typeOptions
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
P50/A11
P51/A12
P52/A13
P53/INT2/TA
in conjunction with P40 to P43.
• Can be used for output of 8-bit ROM
I/O
data when used in conjunction with
P40 to P43.
• Pch: Pull-up MOS type
• Nch: Intermediate sink current
type
• Pull-up MOS or
• Output level on
• 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 serial input SI1
P60/SI1
P61/SO1
P62/SCK1
P63/PIN1
pin.
• P61 is also used as the serial output
I/O
SO1 pin.
• P62 is also used as the serial clock
• Pch: CMOS type
• Nch: Intermediate sink current
type
• CMOS or Nch OD
SCK1 pin.
• P63 is also used for the event count
input to timer 1.
P80/DS0
P81/DS1
P82
P83
Dedicated output ports P80 to P83
• Output in 4-bit or 1-bit units
• The contents of the output latch are
O
input using input instructions.
• P80 is a data shaper input (options)
• Pch: CMOS type
• Nch: Intermediate sink current
type
• CMOS or Nch OD
• Output level at
• Data shaper
• P81 is a data shaper output (options)
Nch OD output
reset
output
output
reset
circuit
State after a Standby mode
resetoperation
Hold mode:
Output off
High or low
(option)
Halt mode:
Output
retained
Hold mode:
Output off
H
Halt mode:
Output
retained
Hold mode:
Output off
High or low
(option)
Halt mode:
Output
retained
PC0
PC1
PC2/INV2I/
CE
PC3/INV2O/
DASEC
I/O ports PC0 to PC3
• Output in 4-bit or 1-bit units
I/O
• Dedicated inverter circuits (option)
• Used as the control CE and DASEC
pin in EPROM mode.
• Pch: CMOS type
• Nch: Intermediate sink current
type
PD0/AN1/
INV3I
PD1/AN2/
INV3O
PD2/AN3/
INV4I
PD3/AN4/
Dedicated input ports PD0 to PD3
• Can be switched in software to function
I
as 16-value analog inputs.
• Dedicated inverter circuits (option)
• Only when the inverter circuit
option is selected:
• Pch: CMOS type
• Nch: Intermediate sink current
type
INV4O
PE0/XT1
PE1/XT2
OSC1
Dedicated input ports and sub-oscillator
I
connections
I
System clock oscillator connections
When an external clock is used, leave
OSC2
O
OSC2 open and connect the clock signal
to OSC1.
System reset input
• When the P33/HOLD pin is at the high
/
RES/V
OE
TEST/
EPMOD
V
V
PP
DD
SS
level, a low level input to the RES pin
I
will initialize the CPU.
• Used as the V
mode.
/OE pin in EPROM
PP
CPU test pin
This pin must be connected to V
I
during normal operation.
Power supply pins
SS
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.
• CMOS or Nch OD
output
• Inverter circuits
Inverter circuits
Sub-oscillator/port
PE selection
Ceramic oscillator
or external clock
selection
H
Normal
input
Option
selection
Option
selection
Hold mode:
Output off
Halt mode:
Output
retained
Inverter
• Hold mode:
Output off
• Halt mode:
Output
continues
Hold mode:
Oscillator stops
Halt mode:
Oscillator
continues
No. 5489-7/28
Page 8
LC66P5316
User Options
1. Port 0, 1, 4, 5, and 8 output level at reset option
The output levels at reset for I/O ports 0, 1, 4, 5, and 8, in independent 4-bit groups, can be selected from the
following two options.
OptionConditions and notes
1. Output high at resetThe four bits of ports 0, 1, 4, 5, or 8 are set in a group
2. Output low at resetThe four bits of ports 0, 1, 4, 5, or 8 are set in a group
2. Oscillator circuit options
• Main clock
OptionCircuitConditions and notes
1. External clock
2. Ceramic oscillator
Note: There is no RC oscillator option.
• Sub-clock
OptionCircuitConditions and notes
1. Ports PE0 and PE1
2 Sub-oscillator
(crystal oscillator)
OSC1
Ceramic oscillator
C1
Crystal oscillator
C2
C1
C2
The input has Schmitt characteristics
OSC1
OSC2
DSB
Input data
XT1
XT2
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
OptionCircuitConditions and notes
1. Open-drain output
2. Output with built-in pull-up
resistor
Output data
Input data
DSB
Output data
Input data
DSB
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.
No. 5489-8/28
Page 9
LC66P5316
• One of the following two options can be selected for P8, in bit units.
OptionCircuitConditions and notes
1. Open-drain output
DSB
Output data
Output data
2. Output with built-in pulldown resistor
(CMOS output)
DSB
5. Inverter array circuit option
One of the following options can be selected for each of the following port sets: P40/P41, P42/P43, PC2/PC3,
PD0/PD1, and PD2/PD3. (PDs do not use option 1 because they are dedicated to inputs.)
OptionCircuitConditions and notes
Output data
Input data
DSB
1. Normal port I/O circuit
Output data
Input data
DSB
When the open-drain output type is selected
When the built-in pull-up resistor output type is
selected
The CMOS outputs (PC) and the pull-up MOS
outputs (P4) are distinguished by the drive
capacity of the p-channel transistor.
2. Inverter I/O circuit
Output data
high
Input data
DSB
Output data
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.
high
Input data
DSB
No. 5489-9/28
Page 10
LC66P5316
6. Buffer array circuit option
In addition to normal port output, one of the following two options may also be selected for P80 and P81.
OptionCircuitConditions and notes
1. Normal port output
2. Buffer input (P80) and
buffer output (P81) circuits
P80
P81
P80
DSB
DSB
DSB
Output data
Output data
Output data
low
Output data
low
Output data
low
When the open-drain output type is selected
When the built-in pull-down resistor output type is
selected (CMOS output)
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.
3. Buffer input (P80) and
buffer output (P81) circuits
with built-in zero-cross
detection circuits
P81
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.
Output data
DSB
low
No. 5489-10/28
Page 11
LC66P5316
LC665316 Series Option Data Area and Definitions
ROM areaBitOption specifiedOption/data relationship
3FF0H
3FF1H
3FF2H
3FF3H
3FF4H
3FF5H
3FF6H
7P5
6P4
5Sub-oscillator option0 = port PE, 1 = crystal oscillator
4Oscillator option0 = external clock, 1 = ceramic oscillator
3P8
2P1Output level at reset0 = low level, 1 = high level
1P0
0Watchdog timer option0 = none, 1 = yes (present)
7P13
6P12
5P11
4P10
3P03
2P02
1P01
0P00
7UnusedThis bit must be set to 0.
6P32
5P31Output type0 = OD, 1 = PU
4P30
3P23
2P22
1P21
0P20
7P53
6P52
5P51
4P50
3P43
2P42
1P41
0P40
7
6
UnusedThis bit must be set to 0.
5
4
3P63
2P62
1P61
0P60
7
6
UnusedThis bit must be set to 0.
5
4
3P83
2P82
1P81
0P80
7
6
UnusedThis bit must be set to 0.
5
4
3
2
UnusedThis bit must be set to 0.
1
0
Output level at reset0 = high level, 1 = low level
Output type0 = OD, 1 = PU
Output type0 = OD, 1 = PU
Output type0 = OD, 1 = PU
Output type0 = OD, 1 = PU
Output type0 = OD, 1 = PU
Output type0 = OD, 1 = PU
Output type0 = OD, 1 = PD
Continued on next page.
Page 12
LC66P5316
Continued from preceding page.
ROM areaBitOption specifiedOption/data relationship
7
6
UnusedThis bit must be set to 0.
5
3FF7H
3FF8H
3FF9H
3FFAH
3FFBH
3FFCH
3FFDH
4
3PC3
2PC2
1PC1
0PC0
7UnusedThis bit must be set to 1.
6Buffer output0 = used, 1 = none
5Buffer output with zero-cross bias input0 = used, 1 = none
4PD3
3PD1
2PC3Inverter output0 = inverter output, 1 = none
1P43
0P41
7
6
UnusedThis bit must be set to 0.
5
4
3
2
UnusedThis bit must be set to 0.
1
0
7
6
UnusedThis bit must be set to 0.
5
4
3
2
UnusedThis bit must be set to 0.
1
0
7
6
UnusedThis bit must be set to 0.
5
4
3
2
UnusedThis bit must be set to 0.
1
0
7
6
UnusedThis bit must be set to 0.
5
4
3
2
UnusedThis bit must be set to 0.
1
0
7
6
5
4
Reserved. Must be set to predefined data values.
3
2
1
0
Output type0 = OD, 1 = PU
This data is generated by the assembler.
If the assembler is not used, set this data to ‘00’.
Continued on next page.
No. 5489-12/28
Page 13
LC66P5316
Continued from preceding page.
ROM areaBitOption specifiedOption/data relationship
7
6
5
3FFEH
3FFFH
4
Reserved. Must be set to predefined data values.
3
2
1
0
7
6
5
4
Reserved. Must be set to predefined data values.
3
2
1
0
This data is generated by the assembler.
If the assembler is not used, set this data to ‘00’.
This data is generated by the assembler.
If the assembler is not used, set this data to ‘00’.
Usage Notes
1. Option specification
When using a Sanyo cross assembler with the LC66P5316, use the version called “LC66S.EXE” and specify the
actual microcontroller to be evaluated with the CPU pseudoinstruction in the source file. The port options must be
specified in the source file. The cross assembler will create an options 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 W66EP5316Q 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 LC66P5316.
• The EPROM programmers listed below can be used.
ManufacturerModels that can be used
AdvantestR4945, R4944A, R4943, or equivalent products
AndoAF9704
AVAL—
Minato ElectronicsMODEL1890A
• The “27512 (VPP12.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 LC66P5316 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 → program → verify” operation
sequence is used.
Notes: 3. Always return the jumper to the off position after the data security function has been activated.
No. 5489-13/28
Page 14
Pin 1
Aligned to the top
SW DASEC
LC66P5316
LC66P5316 (DIP)LC66P5316 (QFP)
Cut corner
Pin 1
SW
DASEC
Pin 1
Write board (W66EP5316D) Write board (W66EP5316Q)
Specifications
Absolute Maximum Ratings at Ta = 25°C, VSS= 0 V
ParameterSymbolConditionsRatingsUnitNote
Maximum supply voltageV
Input voltage
Output voltage
Output current per pin
Total pin current
Allowable power dissipationPd maxTa = –30 to +70°C: DIP48S (QFP48E)600 (430)mW5
Operating temperatureTopr–30 to +70°C
Storage temperatureTstg–55 to +125°C
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 P8 and PD when either the CMOS output specifications or the inverter array specifications have been selected.)
4. Source current (Applies to all pins except P8 and PD for which the pull-up output specifications, the CMOS output specifications, or the inverter
array specifications have been selected. Applies to PD 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).
maxV
DD
V
V
Σ I
Σ I
Σ I
Σ I
–I
–I
–I
V
V
OUT
OUT
I
ON
IN
IN
OP
OP
OP
ON
ON
OP
OP
DD
P2, P3 (except for the P33/HOLD pin),
1
P61, and P63
2All other inputs–0.3 to VDD+ 0.3V2
P2, P3 (except for the P33/HOLD pin),
1
P61, and P63
2All other inputs–0.3 to VDD+ 0.3V2
P0, P1, P2, P3 (except for the P33/HOLD pin),
1
P4, P5, P6, P8, PC, PD1, PD3
1P0, P1, P4, P52mA4
P2, P3 (except for the P33/HOLD pin),
2
P6,P8, and PC
3P41, P43, PC3, PD1, PD3, P8110mA4
1P4, P5, P6, P8, PC75mA3
P0, P1, P2, P3 (except for the P33/HOLD pin),
2
PD1, PD3
1P4, P5, P6, P8, PC25mA4
P0, P1, P2, P3 (except for the P33/HOLD pin),
2
PD1, PD3
–0.3 to +7.0V
–0.3 to +7.0V1
–0.3 to +7.0V1
20mA3
4mA 4
75mA3
25mA4
Page 15
LC66P5316
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, PC, and PD when the inverter array is used, and for P8 when the
buffer array is used.
3. Applies to pins with open-drain specifications. However, V
P2, P3, and P6 port pins with CMOS output specifications cannot be used as input pins.
V
DD
DD
IH
DD
HVDD: During hold mode1.85.5V
P2, P3 (except for the P33/HOLD pin),
1
P61, and P63: N-channel output transistor off
P33/HOLD, RES, OSC1:
Nch transistor off
P0, P1, P4, P5, P6, PC, OSC1, and P33/HOLD
2(Does not apply to PD, PE, PC2, and PC3):1.0µA1
IH
= VDD, with the output Nch transistor off
V
IN
PD, PC2, PC3, PE0, (When used as a port; does
not apply when the sub-oscillator option is
3
IH
selected.): V
transistor off
5RES: VIN= VDD, hold mode1.0µA1
IH
PE1 (When used as a port; does not apply when
6
IH
the sub-oscillator option is selected.) : V
Input ports other than PD, PE, PC2, and PC3:
V
= VSS, with the output Nch transistor off
IN
PD, PC2, PC3, PE0: V
2
IL
with the output Nch transistor off
= VDD, with the output Nch
IN
= VSS,
IN
SS
= V
IN
DD
–1.0µA2
–1.0µA2
100µA1
1.0µA1
1.0µA1
PE1 (When used as a port; does not apply
= V
V
IN
SS
P2, P3 (except for the P33/HOLD pin),
P6, P8, and PC: I
1
OH
P2, P3 (except for the P33/HOLD pin),
P6, P8, and PC: I
P0, P1, P4, P530100150kΩ4
PO
P0, P1, P2, P3, P4, P5, P6, P8, and PC
1
OL
(except for the P33/HOLD pin): I
P0, P1, P2, P3, P4, P5, P6, P8, and PC
2
OL
(except for the P33/HOLD pin): I
= –1 mA
OH
= –0.1 mA
OH
= 1.6 mA
OL
= 8 mA
OL
V
– 1.0
DD
V
– 0.5
DD
0.4V5
1.5V
1P2, P3, P61, P63: VIN= +7.0 V5.0µA6
Does not apply to P2, P3, P61, P63, and P8.:
2
V
= V
IN
DD
3P8: VIN= V
HYS
OSC1, OSC2: Figure 2, 4 MHz4.0MHz
CF
SS
–1.0µA7
0.1 V
DD
DD
DD
1.0µA6
0.8 V
DD
0.5 V
DD
Figure 3, 4 MHz10.0ms
XT1, XT2: Figure 2, when the sub-oscillator
XT
option is selected, 32 kHz
Figure 3, when the sub-oscillator option is
XTS
selected, 32 kHz
32.768kHz
1.05.0s
0.9µs
SCK0, SCK1: With the timing of Figure 4 and
CKL
the test load of Figure 5.
, t
CKF
0.4µs
1.0Tcyc
0.1µs
V3
V
V
V
Data setup timet
Data hold timet
[Serial output]
Output delay timet
ICK
CKI
CKO
SI0, SI1: With the timing of Figure 4.
0.3µs
Stipulated with respect to the rising edge (↑) of
SCK0 or SCK1.
0.3µs
SO0, SO1: With the timing of Figure 5 and
the test load of Figure 5. Stipulated with respect 0.3µs
to the falling edge (↓) of SCK0 or SCK1.
Continued on next page.
Page 17
LC66P5316
Continued from preceding page.
ParameterSymbolConditionsmintypmaxUnitNote
[Pulse conditions]
INT0: Figure 6, conditions under which the INT0
INT0 high and low-level t
High and low-level pulse widths
for interrupt inputs other than INT0the corresponding interrupt can be accepted
PIN1 high and low-level
pulse widthstimer 1 event counter input can be accepted
RES high and low-level
pulse widthscan be applied.
t
PINH
t
RSH
IOH
t
IIH
interrupt can be accepted, conditions under
, t
IOL
which the timer 0 event counter or pulse width
measurement input can be accepted
INT1, INT2: Figure 6, conditions under which
, t
IIL
PIN1: Figure 6, conditions under which the
, t
PINL
RES: Figure 6, conditions under which reset
, t
RSL
2Tcyc
2Tcyc
2Tcyc
3Tcyc
Operating current drainI
Halt mode current drainI
Hold mode current drainI
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. (Also applies when the Pch open-drain option is selected for P8.)
4. With the output Nch transistor off for pull-up output specification pins.
5. When CMOS output specifications are selected for P8.
6. With the output Nch transistor off for open-drain output specification pins.
7. With the output Pch transistor off for open-drain output specification pins.
Figure 6 Input Timing for the INT0, INT1, INT2, PIN1, and RES pins
No. 5489-18/28
Page 19
LC66P5316
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 userb. Preconditions for mounting products that were programmed by Sanyo
DIP/QFP product
Programming and verification
Recommended screening conditions
High-temperature bake (disconnected)
150°C ±5°C, 24 HR
Program data verification
MountingMounting
+1HR
–0HR
DIP/QFP product
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. 5489-19/28
Page 20
LC66P5316
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
t211100100
3
2
1
Bit2
2
2
0
2
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
CF, ZF ← [M4 (SP)] and CF are restored.
[Branch instructions]
PC7 to 0 ←Branch to the location in the
BAt2
addrP
Branch on AC bit
1101 00t
7P6P5P4P3P2P1P0
1t0
22
P
7P6P5P4
P3P2P1P
if (AC, t2) = 1the immediate data t
PC7 to 0 ←Branch to the location in the
BNAt2
addrP
Branch on no AC bit
1001 00t1t
7P6P5P4P3P2P1P0
0
22
P
7P6P5P4
P3P2P1P
if (AC, t2) = 0the immediate data t
PC7 to 0 ←Branch to the location in the
BMt21101 01t
addr
Branch on M bit
P7P6P5P4P3P2P1P
1t0
22P3P2P1P0P0if the bit in M (HL) specified
0
P7P6P5P4same page specified by P7to
if [M (HL),t2] by the immediate data t
= 1is one.
PC7 to 0 ←Branch to the location in the
BNMt21001 01t
addr
Branch on no M bit
P7P6P5P4P3P2P1P
1t0
22P3P2P1P0P0if the bit in M (HL) specified
0
P7P6P5P4same page specified by P7to
if [M (HL),t2] by the immediate data t
= 0is zero.
PC7 to 0 ←Branch to the location in the
P
BPt2
addrP
Branch on Port bit
1101 10t
7P6P5P4P3P2P1P0
1t0
22P3P2P1P0P0if the bit in port (DPL)
7P6P5P4
if [P (DPL), t2]specified by the immediate
= 1data t
PC7 to 0 ←Branch to the location in the
P
BNPt2
addrP
Branch on no Port bit
1001 10t
7P6P5P4P3P2P1P0
1t0
22P3P2P1P0P0if the bit in port (DPL)
7P6P5P4
if [P (DPL), t2]specified by the immediate
= 0data t
Store the contents of reg in
M2 (SP). Subtract 2 from SP
after the store.
regi1i
HL00
XY01
AE10
Illegal value11
Add 2 to SP and then load the
contents of M2(SP) into reg.
The relation between i1i0 and
reg is the same as that for the
PUSH reg instruction.
Return from a subroutine or
interrupt handling routine. ZF
and CF are not restored.
same page specified by P7to
P0if the bit in AC specified by
0
same page specified by P7to
P0if the bit in AC specified by
0
same page specified by P7to
is one.
1t0
same page specified by P7to
is zero.
1t0
1t0
1t0
bits
0
is one.
is zero.
1t0
1t0
Internal control
registers can also
be tested by
executing this
instruction
immediately after
a BANK
instruction.
However, this is
limited to
registers that can
be read out.
Internal control
registers can also
be tested by
executing this
instruction
immediately after
a BANK
instruction.
However, this is
limited to
registers that can
be read out.
Continued on next page.
No. 5489-25/28
Page 26
Continued from preceding page.
LC66P5316
MnemonicOperationDescriptionstatus Note
Instruction codeAffected
D
7D6D5D4D3D2D1D0
Number of
cycles
Number of
bytes
[Branch instructions]
BC addr Branch on CF
BNC
addrP
Branch on no CF
BZ addr Branch on ZF
BNZ
addrP
BFn4 1111n
addr
BNFn4 1011n
addr
Branch on no ZF
Branch on flag bit
Branch on no flag bit
1101 1100
P
7P6P5P4P3P2P1P0
1001 1100
7P6P5P4P3P2P1P0
1101 1101
P
7P6P5P4P3P2P1P0
1001 1101
7P6P5P4P3P2P1P0
P7P6P5P4P3P2P1P
P7P6P5P4P3P2P1P
3n2n1n0
0
3n2n1n0
0
22
22
22
22
22
22
PC7 to 0 ←
P
7P6P5P4
P3P2P1P
if (CF) = 1
PC7 to 0 ←
P
7P6P5P4
P3P2P1P
if (CF) = 0
PC7 to 0 ←
P
7P6P5P4
P3P2P1P
if (ZF) = 1
PC7 to 0 ←
P
7P6P5P4
P3P2P1P
if (ZF) = 0
PC7 to 0 ←
P7P6P5P
P
3P2P1P0
if (Fn) = 1
PC7 to 0 ←
P7P6P5P
P
3P2P1P0
if (Fn) = 0
Branch to the location in the
same page specified by P7to
0
P0if CF is one.
Branch to the location in the
same page specified by P7to
0
P0if CF is zero.
Branch to the location in the
same page specified by P7to
0
P0if ZF is one.
Branch to the location in the
same page specified by P7to
0
P0if ZF is zero.
Branch to the location in the
same page specified by P0to
4
P7if the flag (of the 16 user
flags) specified by n
is one.
Branch to the location in the
same page specified by P0to
4
P7if the flag (of the 16 user
flags) specified by n
is zero.
3n2n1n0
3n2n1n0
[I/O instructions]
IP0Input port 0 to AC0010 0000 1 1 AC ←(P0)
IPInput port to AC0010 0110 1 1 AC ←[P (DP
L
IPMInput port to M0001 1001 1 1 M (HL) ← [P (DP
IPDR i4
IP45
OPOutput AC to port0010 0101 1 1 P (DP
OPMOutput M to port0001 1010 1 1 P (DP
OPDR i4
OP45
Input port to 1100 1111
AC direct0110 I3I2I1I
Input port 4, 5 to1100 1111E ←[P (4)]
E, AC respectively1101 0100
Output AC to 1100 1111
port direct0111 I
3I2I1I0
Output E, AC to port 1100 1111P (4) ← (E)
4, 5 respectively1101 0101
22AC ← [P (i4)]
0
22
AC ← [P (5)]
22P (i4) ← (AC)
22
P (5) ← (AC)
) ← (AC)
L
) ← [M (HL)]
L
Input the contents of port
0 to AC.
Input the contents of port
)]
P (DP
) to AC.
L
Input the contents of port
)]
L
P (DP
) to M (HL).
L
Input the contents of
P (i4) to AC.
Input the contents of ports
P (4) and P (5) to E and AC
respectively.
Output the contents of AC to
port P (DP
Output the contents of M (HL)
to port P (DP
Output the contents of AC
to P (i4).
Output the contents of E and
AC to ports P (4) and P (5)
respectively.
ZF
ZF
ZF
).
L
).
L
Set to one the bit in port
SPB t2Set port bit0000 10t
11[P (DPL), t2] ← 1P (DPL) specified by the
1t0
immediate data t
1t0
.
Clear to zero the bit in port
RPB t2Reset port bit0010 10t1t011[P (DPL), t2] ← 0P (DPL) specified by the ZF
1t0
.
3
ZF
3
ANDPDR
i4, p4
ORPDR
i4, p4
And port with P (P
immediate data then
output
Or port with P (P
immediate data then
output
1100 0101
I
3I2I1I0P3P2P1P0
1100 0100
I
3I2I1I0P3P2P1P0
22[P (P
I3to I
22[P (P
I3to I
to P0) ←
3
to P0)]
3
0
to P0) ←
3
to P0)]
3
0
immediate data t
Take the logical AND of P (P
) and the immediate data
to P
0
I3I2I1I0and output the result
to P0).
to P (P
3
Take the logical OR of P (P
) and the immediate data ZF
to P
0
I3I2I1I0and output the result
to P0).
to P (P
3
bits
Continued on next page.
No. 5489-26/28
Page 27
Continued from preceding page.
LC66P5316
MnemonicOperationDescriptionstatus Note
Instruction codeAffected
D
7D6D5D4D3D2D1D0
Number of
cycles
Number of
bytes
[Timer control instructions]
WTTM0 Write timer 01100 1010 1 2
WTTM1 Write timer 1
1100 1111
1111 0100
22TIMER1 ← (E), (AC) into the timer 1 reload
RTIM0Read timer 01100 1011 1 2
RTIM1Read timer 1
START0 Start timer 0
START1 Start timer 1
STOP0Stop timer 0
STOP1Stop timer 1
1100 1111
1111 0101timer 1 counter into E, AC.
1100 1111
1110 0110
1100 1111
1110 0111
1100 1111
1111 0110
1100 1111
1111 0111
22E, AC ← (TIMER1)
22Start timer 0 counter Start the timer 0 counter.
22Start timer 1 counter Start the timer 1 counter.
22Stop timer 0 counter Stop the timer 0 counter.
22Stop timer 1 counter Stop the timer 1 counter.
TIMER0 ← [M2 (HL)],
(AC)
M2 (HL),
AC ← (TIMER0)
Write the contents of M2 (HL),
AC into the timer 0 reload
register.
Write the contents of E, AC
register A.
Read out the contents of the
timer 0 counter into M2 (HL),
AC.
Read out the contents of the
[Interrupt control instructions]
MSET
MRESET
Set interrupt master1100 1101
enable flag0101 0000enable flag to one.
Reset interrupt 1100 1101
master enable flag1001 0000enable flag to zero.
EIH i4Enable interrupt high
EIL i4Enable interrupt low
DIH i4Disable interrupt high
DIL i4Disable interrupt low
WTSPWrite SP
RSPRead SP
22MSE ← 1
22MSE ← 0
1100 1101
0101 I
3I2I1I0
1100 1101
0100 I
3I2I1I0
1100 1101
1001 I3I2I1I
1100 1101
1000 I3I2I1I
1100 1111
1101 1010AC to SP.
1100 1111
1101 1011to E, AC.
22EDIH ← (EDIH) i4
22EDIL ← (EDIL) i4
22EDIH ← (EDIH) i4
0
22EDIL ← (EDIL) i4
0
22SP ← (E), (AC)
22E, AC ← (SP)
Set the interrupt master
Clear the interrupt master
Set the interrupt enable flag
to one.
Set the interrupt enable flag
to one.
Clear the interrupt enable
flag to zero.
Clear the interrupt enable
flag to zero.
Transfer the contents of E,
Transfer the contents of SP
[Standby control instructions]
HALTHALT
HOLDHOLD
1100 1111
1101 1110
1100 1111
1101 1111
22HALTEnter halt mode.
22HOLDEnter hold mode.
[Serial I/O control instructions]
STARTS Start serial I O
WTSIOWrite serial I O
RSIORead serial I O
1100 1111
1110 1110
1100 1111
1110 1111AC to SIO.
1100 1111
1111 1111into E, AC.
22START SI OStart SIO operation.
22SIO ← (E), (AC)
22E, AC ← (SIO)
Write the contents of E,
Read out the contents of SIO
[Other instructions]
Consume one machine cycle
NOPNo operation0000 0000 1 1 No operationwithout performing any
operation.
SB i2Select bank
1100 1111
1100 00I
1I0
22PC13, PC12 ← I
Specify the memory bank.
1I0
bits
ZF
ZF
No. 5489-27/28
Page 28
LC66P5316
■ 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.
■ 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.
■ 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.
This catalog provides information as of February, 1997. Specifications and information herein are subject to
change without notice.
No. 5489-28/28
Loading...
+ hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.