ST 62T62C
ST 62T62C
ST 62T62C
ST62T62C/E62C
8-BIT OTP/EPROM MCUs WITH A/D CONVERTER,
SAFE RESET, AUTO-RELOAD TIMER AND EEPROM
DEVICE SUMMARY
EPROM OTP
DEVICE EEPROM
(Bytes) (Bytes)
ST62T52C 1836 -
ST62T62C 1836 64
ST62E62C 1836 64
Rev. 2.7
2/78
2
Table of Contents Document
Page
4 ON-CHIP PERIPHERALS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
4.1 I/O PORTS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
4.1.1 Operating Modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
4.1.2 Safe I/O State Switching Sequence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
4.1.3 ARTimer alternate functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
4.2 TIMER . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
4.2.1 Timer Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
4.2.2 Timer Interrupt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
4.2.3 Application Notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
4.2.4 Timer Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
4.3 AUTO-RELOAD TIMER . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
4.3.1 AR Timer Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
4.3.2 Timer Operating Modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
4.3.3 AR Timer Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
4.4 A/D CONVERTER (ADC) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
4.4.1 Application Notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
5 SOFTWARE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
5.1 ST6 ARCHITECTURE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
5.2 ADDRESSING MODES . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
5.3 INSTRUCTION SET . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
6 ELECTRICAL CHARACTERISTICS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
6.1 ABSOLUTE MAXIMUM RATINGS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
6.2 RECOMMENDED OPERATING CONDITIONS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
6.3 DC ELECTRICAL CHARACTERISTICS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
6.4 AC ELECTRICAL CHARACTERISTICS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
6.5 A/D CONVERTER CHARACTERISTICS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
6.6 TIMER CHARACTERISTICS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
6.7 SPI CHARACTERISTICS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
6.8 ARTIMER ELECTRICAL CHARACTERISTICS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
7 GENERAL INFORMATION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
7.1 PACKAGE MECHANICAL DATA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
7.2 ORDERING INFORMATION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
ST62P52C/ST62P62C . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
1 GENERAL DESCRIPTION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
1.1 INTRODUCTION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
1.2 ORDERING INFORMATION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
1.2.1 Transfer of Customer Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
1.2.2 Listing Generation and Verification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
3/78
3
Table of Contents Document
Page
ST6252C/ST6262B . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
1 GENERAL DESCRIPTION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
1.1 INTRODUCTION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
1.2 ROM READOUT PROTECTION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
1.3 ORDERING INFORMATION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
1.3.1 Transfer of Customer Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
1.3.2 Listing Generation and Verification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
78
4/78
1
ST62T52C ST62T62C/E62C
1 GENERAL DESCRIPTION
1.1 INTRODUCTION
The ST62T52C and ST62T62C devices is low cost fined in the programmable option byte of the
members of the ST62xx 8-bit HCMOS family of mi- OTP/EPROM versions.
crocontrollers, which is targeted at low to medium
complexity applications. All ST62xx devices are OTP devices offer all the advantages of user pro-
based on a building block approach: a common grammability at low cost, which make them the
core is surrounded by a number of on-chip periph- ideal choice in a wide range of applications where
erals. frequent code changes, multiple code versions or
last minute programmability are required.
The ST62E62C is the erasable EPROM version of
the ST62T62C device, which may be used to em- These compact low-cost devices feature a Timer
ulate the ST62T52C and ST62T62C devices as comprising an 8-bit counter and a 7-bit program-
well as the ST6252C and ST6262B ROM devices. mable prescaler, an 8-bit Auto-Reload Timer,
EEPROM data capability (except ST62T52C), an
OTP and EPROM devices are functionally identi- 8-bit A/D Converter with 4 analog inputs and a Dig-
cal. The ROM based versions offer the same func- ital Watchdog timer, making them well suited for a
tionality selecting as ROM options the options de- wide range of automotive, appliance and industrial
applications.
Figure 1. Block Diagram
8-BIT
PORT A PA4..PA 5 / Ain
A/D CONVERTER
TEST/VPP TEST
PB0, PB2..PB3 / 30 mA Sink
PORT B PB6 / ARTimin / 20 mA Sink
PB7 / ARTimout / 20 mA Sink
NMI INTERRUPT
DATA ROM
USER PORT C PC2..PC3 / Ain
SELECTABLE
PROGRAM
MEMORY
DATA RAM AUTORELOAD
1836 byte s OTP 128 Bytes
(ST62T52C, T62C) TIMER
1836 byte s EPROM
(ST62E62C)
DATA EEPROM
64 Bytes TIMER
(ST62T62C/E6 2C)
PC
STACK LEVEL 1
STACK LEVEL 2 DIGITAL
STACK LEVEL 3 8 BIT CORE WATCHD OG
STACK LEVEL 4
STACK LEVEL 5
STACK LEVEL 6
5/78
4
ST62T52C ST62T62C/E62C
VDD and VSS. Power is supplied to the MCU via Mout are either Port B I/O bits or the Input and
these two pins. VDD is the power connection and Output pins of the ARTimer.
VSS is the ground connection. Reset state of PB2-PB3 pins can be defined by op-
tion either with pull-up or high impedance.
OSCin and OSCout. These pins are internally
connected to the on-chip oscillator circuit. A quartz PB0, PB2-PB3, PB6-PB7 scan also sink 30mA for
crystal, a ceramic resonator or an external clock direct LED driving.
signal can be connected between these two pins.
The OSCin pin is the input pin, the OSCout pin is PC2-PC3. These 2 lines are organized as one I/O
the output pin. port (C). Each line may be configured under soft-
ware control as input with or without internal pull-
RESET. The active-low RESET pin is used to re- up resistor, interrupt generating input with pull-up
start the microcontroller. resistor, analog input for the A/D converter, open-
drain or push-pull output.
TEST/VPP. The TEST must be held at VSS for nor-
mal operation. If TEST pin is connected to a Figure 2. ST62T52C, E62C and T62C Pin
+12.5V level during the reset phase, the
Configuration
EPROM/OTP programming Mode is entered.
NMI. The NMI pin provides the capability for asyn-
chronous interruption, by applying an external non PB0 1 16 PC2/Ain
maskable interrupt to the MCU. The NMI input is
falling edge sensitive. It is provided with an on-chip VPP/TEST 2 15 PC3/Ain
pullup resistor (if option has been enabled), and
Schmitt trigger characteristics. PB2 3 14 NMI
6/78
5
ST62T52C ST62T62C/E62C
0000h 000h
RAM / EEPROM
BANKING AREA
0-63 03Fh
040h
DATA READ-ONLY
PROGRAM MEMORY WINDOW
MEMORY 07Fh
080h X REGISTER
081h Y REGISTER
082h V REGISTER
083h W REGISTER
084h
RAM
7/78
6
ST62T52C ST62T62C/E62C
USER
PROGRAM MEMORY
1836 BYTES
(OTP/EPROM)
0F9Fh
0FA0h
0FEFh
RESERVED *
0FF0h
0FF7h INTERRUPT VECTORS
0FF8h
RESERVED
0FFBh
0FFCh
NMI VECTOR
0FFDh
0FFEh USER RESET VECTOR
0FFFh
8/78
7
ST62T52C ST62T62C/E62C
9/78
8
ST62T52C ST62T62C/E62C
Example:
DWR=28h 1 0 1 0 0 0
DATA SPACE ADDRESS
:
0 1 0 1 1 0 0 1 59h
ROM
1 0 1 0 0 0 0 1 1 0 0 1
ADDRESS:A19h
VR01573C
10/78
9
ST62T52C ST62T62C/E62C
11/78
10
ST62T52C ST62T62C/E62C
Note: The EEPROM is disabled as soon as STOP instruction is executed in order to achieve the lowest
power-consumption.
12/78
11
ST62T52C ST62T62C/E62C
13/78
12
ST62T52C ST62T62C/E62C
14/78
13
ST62T52C ST62T62C/E62C
15/78
14
ST62T52C ST62T62C/E62C
INTERRUPTS
CONTROLLER
DATA SPACE
CONTROL
FLAG SIGNALS DATA
OPCODE VALUES ADDRESS /READ LINE
2 RAM/EEPR OM
PROGRAM
DATA
ROM/EPRO M ADDRESS
256 ROM/EPROM
DECODER
A-DATA B-DATA
DEDICAT IONS
ACCUMULATOR
Program Counter
12 and FLAGS
6 LAYER STACK ALU
RESULTS TO DATA SPACE (WRITE LINE)
VR01811
16/78
15
ST62T52C ST62T62C/E62C
17/78
16
ST62T52C ST62T62C/E62C
NC
18/78
17
ST62T52C ST62T62C/E62C
19/78
18
ST62T52C ST62T62C/E62C
(1)
(2)
(3)
(4)
Main
Oscillator
Emergency
Oscillator
Internal
Frequency
VR001933
20/78
19
ST62T52C ST62T62C/E62C
POR
: 13 Core
OSG
TIMER 1
LFAO
:1
Figure 12. Maximum Operating Frequency (fMAX) versus Supply Voltage (VDD)
7 4
FUNCTIONALITY IS NOT
3
6
fOSG
GUARANTEED
IN THIS AREA
5
fOSG Min (at 85C)
4 2
3
fOSG Min (at 125C)
2
1
1
2.5 3 3.6 4 4.5 5 5.5 6
Notes:
1. In this area, operation is guaranteed at the area is guaranteed at the quartz crystal frequency.
quartz crystal frequency. When the OSG is enabled, access to this area is
2. When the OSG is disabled, operation in this prevented. The internal frequency is kept a fOSG.
area is guaranteed at the crystal frequency. When 4. When the OSG is disabled, operation in this
the OSG is enabled, operation in this area is guar- area is not guaranteed
anteed at a frequency of at least fOSG Min. When the OSG is enabled, access to this area is
3. When the OSG is disabled, operation in this prevented. The internal frequency is kept at fOSG.
21/78
20
ST62T52C ST62T62C/E62C
3.2 RESETS
The MCU can be reset in four ways: is executed immediately following the internal de-
by the external Reset input being pulled low; lay.
by Power-on Reset; To ensure correct start-up, the user should take
care that the VDD Supply is stabilized at a suffi-
by the digital Watchdog peripheral timing out. cient level for the chosen frequency (see recom-
by Low Voltage Detection (LVD) mended operation) before the reset signal is re-
3.2.1 RESET Input leased. In addition, supply rising must start from
0V.
The RESET pin may be connected to a device of
the application board in order to reset the MCU if As a consequence, the POR does not allow to su-
required. The RESET pin may be pulled low in pervise static, slowly rising, or falling, or noisy
RUN, WAIT or STOP mode. This input can be (presenting oscillation) VDD supplies.
used to reset the MCU internal state and ensure a An external RC network connected to the RESET
correct start-up procedure. The pin is active low pin, or the LVD reset can be used instead to get
and features a Schmitt trigger input. The internal the best performances.
Reset signal is generated by adding a delay to the
external signal. Therefore even short pulses on Figure 13. Reset and Interrupt Processing
the RESET pin are acceptable, provided VDD has
completed its rising phase and that the oscillator is RESET
running correctly (normal RUN or WAIT modes).
The MCU is kept in the Reset state as long as the
RESET pin is held low.
NMI MASK SET
If RESET activation occurs in the RUN or WAIT INT LATCH CLEARED
( IF PRESENT )
modes, processing of the user program is stopped
(RUN mode only), the Inputs and Outputs are con-
figured as inputs with pull-up resistors and the
main Oscillator is restarted. When the level on the SELECT
NMI MODE FLAGS
RESET pin then goes high, the initialization se-
quence is executed following expiry of the internal
delay period.
If RESET pin activation occurs in the STOP mode, PUT FFEH
ON ADDRESS BUS
the oscillator starts up and all Inputs and Outputs
are configured as inputs with pull-up resistors.
When the level of the RESET pin then goes high,
the initialization sequence is executed following
expiry of the internal delay period. YES
IS RESET STILL
3.2.2 Power-on Reset PRESENT?
22/78
21
ST62T52C ST62T62C/E62C
RESETS (Contd)
3.2.3 Watchdog Reset ues, allowing hysteresis effect. Reference value in
The MCU provides a Watchdog timer function in case of voltage drop has been set lower than the
order to ensure graceful recovery from software reference value for power-on in order to avoid any
upsets. If the Watchdog register is not refreshed parasitic Reset when MCU starts running and
before an end-of-count condition is reached, the sinking current on the supply.
internal reset will be activated. This, amongst oth- As long as the supply voltage is below the refer-
er things, resets the watchdog counter. ence value, there is a internal and static RESET
command. The MCU can start only when the sup-
The MCU restarts just as though the Reset had ply voltage rises over the reference value. There-
been generated by the RESET pin, including the fore, only two operating mode exist for the MCU:
built-in stabilisation delay period. RESET active below the voltage reference, and
3.2.4 LVD Reset running mode over the voltage reference as
shown on the Figure 14., that represents a power-
The on-chip Low Voltage Detector, selectable as up, power-down sequence.
user option, features static Reset when supply
voltage is below a reference value. Thanks to this Note: When the RESET state is controlled by one
feature, external reset circuit can be removed of the internal RESET sources (Low Voltage De-
while keeping the application safety. This SAFE tector, Watchdog, Power on Reset), the RESET
RESET is effective as well in Power-on phase as pin is tied to low logic level.
in power supply drop with different reference val-
Figure 14. LVD Reset on Power-on and Power-down (Brown-out)
VDD
VUp
Vdn
RESET
RESET
time
VR02106A
23/78
22
ST62T52C ST62T62C/E62C
RESETS (Contd)
3.2.6 MCU Initialization Sequence Figure 15. Reset and Interrupt Processing
When a reset occurs the stack is reset, the PC is
RESET
loaded with the address of the Reset Vector (locat-
ed in program ROM starting at address 0FFEh). A
jump to the beginning of the user program must be
coded at this address. Following a Reset, the In- JP JP:2 BYTES/4 CYCLES
terrupt flag is automatically set, so that the CPU is RESET
in Non Maskable Interrupt mode; this prevents the VECTOR
VDD
ST6
fOSC CK INTERNA L
RESET
RPU COUNTER
AND. Wired
RESD1)
RESET RESET
RESET
POWER ON RESET
WATCHD OG RESET
LVD RESET
VR02107A
24/78
23
ST62T52C ST62T62C/E62C
RESETS (Contd)
Table 6. Register Reset Status
Register Address(es) Status Comment
Oscillator Control Register 0DCh fINT = fOSC; user must set bit3 to 1
EEPROM Control Register 0EAh EEPROM enabled (if available)
Port Data Registers 0C0h to 0C2h I/O are Input with pull-up
Port Direction Register 0C4h to 0C6h I/O are Input with pull-up
Port Option Register 0CCh to 0CEh I/O are Input with pull-up
Interrupt Option Register 0C8h Interrupt disabled
TIMER Status/Control 0D4h 00h TIMER disabled
25/78
24
ST62T52C ST62T62C/E62C
26/78
25
ST62T52C ST62T62C/E62C
WATCHDOG COUNTER
RESET
bit must be set to 1, since it is this bit which gen- D2 T5
erates the Reset signal when it changes to 0;
clearing this bit would generate an immediate Re-
set. D3 T4
It should be noted that the order of the bits in the
DWDR register is inverted with respect to the as-
sociated bits in the down counter: bit 7 of the D4 T3
DWDR register corresponds, in fact, to T0 and bit
2 to T5. The user should bear in mind the fact that
these bits are inverted and shifted with respect to D5 T2
the physical counter bits when writing to this regis-
ter. The relationship between the DWDR register
bits and the physical implementation of the Watch- D6 T1
dog timer downcounter is illustrated in Figure 17..
Only the 6 most significant bits may be used to de- D7 T0
fine the time period, since it is bit 6 which triggers
the Reset when it changes to 0. This offers the
user a choice of 64 timed periods ranging from
3,072 to 196,608 clock cycles (with an oscillator 28 OSC 12
frequency of 8MHz, this is equivalent to timer peri-
ods ranging from 384s to 24.576ms). VR02068A
27/78
26
ST62T52C ST62T62C/E62C
28/78
27
ST62T52C ST62T62C/E62C
VR02002
RESET
Q
RSFF -27 -2 8 -12
S R DB 1.7 LOAD SET SET
OSCILLATOR
8 CLOCK
DB0
WRITE
RESET
DATA BUS
VA00010
29/78
28
ST62T52C ST62T62C/E62C
3.4 INTERRUPTS
The CPU can manage four Maskable Interrupt ically reset by the core at the beginning of the non-
sources, in addition to a Non Maskable Interrupt maskable interrupt service routine.
source (top priority interrupt). Each source is asso- Interrupt request from source #1 can be config-
ciated with a specific Interrupt Vector which con- ured either as edge or level sensitive by setting ac-
tains a Jump instruction to the associated interrupt cordingly the LES bit of the Interrupt Option Regis-
service routine. These vectors are located in Pro- ter (IOR).
gram space (see Table 8 ).
Interrupt request from source #2 are always edge
When an interrupt source generates an interrupt sensitive. The edge polarity can be configured by
request, and interrupt processing is enabled, the setting accordingly the ESB bit of the Interrupt Op-
PC register is loaded with the address of the inter- tion Register (IOR).
rupt vector (i.e. of the Jump instruction), which
then causes a Jump to the relevant interrupt serv- Interrupt request from sources #3 & #4 are level
ice routine, thus servicing the interrupt. sensitive.
Interrupt sources are linked to events either on ex- In edge sensitive mode, a latch is set when a edge
ternal pins, or on chip peripherals. Several events occurs on the interrupt source line and is cleared
can be ORed on the same interrupt source, and when the associated interrupt routine is started.
relevant flags are available to determine which So, the occurrence of an interrupt can be stored,
event triggered the interrupt. until completion of the running interrupt routine be-
fore being processed. If several interrupt requests
The Non Maskable Interrupt request has the high- occurs before completion of the running interrupt
est priority and can interrupt any interrupt routine routine, only the first request is stored.
at any time; the other four interrupts cannot inter-
rupt each other. If more than one interrupt request Storage of interrupt requests is not available in lev-
is pending, these are processed by the processor el sensitive mode. To be taken into account, the
core according to their priority level: source #1 has low level must be present on the interrupt pin when
the higher priority while source #4 the lower. The the MCU samples the line after instruction execu-
priority of each interrupt source is fixed. tion.
At the end of every instruction, the MCU tests the
Table 8. Interrupt Vector Map interrupt lines: if there is an interrupt request the
Interrupt Source Priority Vector Address next instruction is not executed and the appropri-
ate interrupt service routine is executed instead.
Interrupt source #0 1 (FFCh-FFDh)
Interrupt source #1 2 (FF6h-FF7h) Table 9. Interrupt Option Register Description
Interrupt source #2 3 (FF4h-FF5h)
SET Enable all interrupts
Interrupt source #3 4 (FF2h-FF3h) GEN
CLEARED Disable all interrupts
Interrupt source #4 5 (FF0h-FF1h)
Rising edge mode on inter-
SET
rupt source #2
3.4.1 Interrupt request ESB
Falling edge mode on inter-
CLEARED
All interrupt sources but the Non Maskable Inter- rupt source #2
rupt source can be disabled by setting accordingly Level-sensitive mode on in-
SET
the GEN bit of the Interrupt Option Register (IOR). terrupt source #1
LES
This GEN bit also defines if an interrupt source, in- Falling edge mode on inter-
cluding the Non Maskable Interrupt source, can re- CLEARED
rupt source #1
start the MCU from STOP/WAIT modes. OTHERS NOT USED
Interrupt request from the Non Maskable Interrupt
source #0 is latched by a flip flop which is automat-
30/78
29
ST62T52C ST62T62C/E62C
INTERRUPTS (Contd)
3.4.2 Interrupt Procedure MCU
The interrupt procedure is very similar to a call pro- Automatically the MCU switches back to the nor-
cedure, indeed the user can consider the interrupt mal flag set (or the interrupt flag set) and pops
as an asynchronous call procedure. As this is an the previous PC value from the stack.
asynchronous event, the user cannot know the The interrupt routine usually begins by the identify-
context and the time at which it occurred. As a re- ing the device which generated the interrupt re-
sult, the user should save all Data space registers quest (by polling). The user should save the regis-
which may be used within the interrupt routines. ters which are used within the interrupt routine in a
There are separate sets of processor flags for nor- software stack. After the RETI instruction is exe-
mal, interrupt and non-maskable interrupt modes, cuted, the MCU returns to the main routine.
which are automatically switched and so do not
need to be saved. Figure 20. Interrupt Processing Flow Chart
The following list summarizes the interrupt proce- INS TRU CTION
dure:
MCU
FETCH
The interrupt is detected. INS TRU CTION
User
User selected registers are saved within the in- POP
THE STACK ED PC
terrupt service routine (normally on a software
stack).
The source of the interrupt is found by polling the NO C HEC K IF THER E IS
AN IN TER RUP T R EQUEST
?
interrupt flags (if more than one source is associ- AN D INTE RRU PT MASK
31/78
30
ST62T52C ST62T62C/E62C
INTERRUPTS (Contd)
3.4.3 Interrupt Option Register (IOR) Bit 5 = ESB: Edge Selection bit.
The Interrupt Option Register (IOR) is used to en- The bit ESB selects the polarity of the interrupt
able/disable the individual interrupt sources and to source #2.
select the operating mode of the external interrupt Bit 4 = GEN: Global Enable Interrupt. When this bit
inputs. This register is write-only and cannot be is set to one, all interrupts are enabled. When this
accessed by single-bit operations. bit is cleared to zero all the interrupts (excluding
Address: 0C8h Write Only NMI) are disabled.
Reset status: 00h When the GEN bit is low, the NMI interrupt is ac-
tive but cannot cause a wake up from STOP/WAIT
7 0 modes.
- LES ESB GEN - - - - This register is cleared on reset.
3.4.4 Interrupt Sources
Bit 7, Bits 3-0 = Unused. Interrupt sources available on the
ST62E62C/T62C are summarized in the Table 10
Bit 6 = LES: Level/Edge Selection bit. with associated mask bit to enable/disable the in-
When this bit is set to one, the interrupt source #1 terrupt request.
is level sensitive. When cleared to zero the edge
sensitive mode for interrupt request is selected.
Table 10. Interrupt Requests and Mask Bits
Address Interrupt
Peripheral Register Mask bit Masked Interrupt Source
Register vector
GENERAL IOR C8h GEN All Interrupts, excluding NMI
TIMER TSCR1 D4h ETI TMZ: TIMER Overflow Vector 4
A/D CONVERTER ADCR D1h EAI EOC: End of Conversion Vector 4
OVIE OVF: AR TIMER Overflow
AR TIMER ARMC D5h CPIE CPF: Successful compare Vector 3
EIE EF: Active edge on ARTIMin
Port PAn ORPA-DRPA C0h-C4h ORPAn-DRPAn PAn pin Vector 1
Port PBn ORPB-DRPB C1h-C5h ORPBn-DRPBn PBn pin Vector 1
Port PCn ORPC-DRPC C2h-C6h ORPCn-DRPCn PCn pin Vector 2
32/78
31
ST62T52C ST62T62C/E62C
INTERRUPTS (Contd)
Figure 21. Interrupt Block Diagram
PBE
V DD
PORT A FF
CLK Q 0
PORT B PBE
CLR
Bits
INT #1 (FF6,7)
I Start MUX
1
RESTART FROM
IOR REG. C8H, bit 6 STOP/WAIT
PORT C FF
PBE CLK Q INT #2 (FF4,5)
Bits
CLR
SPIDIV Register
I 2 Start
SPINT bit IOR REG. C8H, bit 5
SPIE bit
OVF
SPIMOD Register OVIE
CPF INT #3 (FF2,3)
AR TIMER
CPIE
EF
EIE
TMZ
TIMER1 INT #4 (FF0,1)
VDD ETI
EOC
ADC EAI
FF NMI (FFC,D)
NMI CLK Q
CLR
I 0 Start
VA0426K
33/78
32
ST62T52C ST62T62C/E62C
The WAIT and STOP modes have been imple- of the processor core prior to the WAIT instruction,
mented in the ST62xx family of MCUs in order to but also on the kind of interrupt request which is
reduce the products electrical consumption during generated. This is described in the following para-
idle periods. These two power saving modes are graphs. The processor core does not generate a
described in the following paragraphs. delay following the occurrence of the interrupt, be-
3.5.1 WAIT Mode cause the oscillator clock is still available and no
stabilisation period is necessary.
The MCU goes into WAIT mode as soon as the 3.5.2 STOP Mode
WAIT instruction is executed. The microcontroller
can be considered as being in a software frozen If the Watchdog is disabled, STOP mode is availa-
state where the core stops processing the pro- ble. When in STOP mode, the MCU is placed in
gram instructions, the RAM contents and peripher- the lowest power consumption mode. In this oper-
al registers are preserved as long as the power ating mode, the microcontroller can be considered
supply voltage is higher than the RAM retention as being frozen, no instruction is executed, the
voltage. In this mode the peripherals are still ac- oscillator is stopped, the RAM contents and pe-
tive. ripheral registers are preserved as long as the
power supply voltage is higher than the RAM re-
WAIT mode can be used when the user wants to tention voltage, and the ST62xx core waits for the
reduce the MCU power consumption during idle occurrence of an external interrupt request or a
periods, while not losing track of time or the capa- Reset to exit the STOP state.
bility of monitoring external events. The active os-
cillator is not stopped in order to provide a clock If the STOP state is exited due to a Reset (by acti-
signal to the peripherals. Timer counting may be vating the external pin) the MCU will enter a nor-
enabled as well as the Timer interrupt, before en- mal reset procedure. Behaviour in response to in-
tering the WAIT mode: this allows the WAIT mode terrupts depends on the state of the processor
to be exited when a Timer interrupt occurs. The core prior to issuing the STOP instruction, and
same applies to other peripherals which use the also on the kind of interrupt request that is gener-
clock signal. ated.
If the WAIT mode is exited due to a Reset (either This case will be described in the following para-
by activating the external pin or generated by the graphs. The processor core generates a delay af-
Watchdog), the MCU enters a normal reset proce- ter occurrence of the interrupt request, in order to
dure. If an interrupt is generated during WAIT wait for complete stabilisation of the oscillator, be-
mode, the MCUs behaviour depends on the state fore executing the first instruction.
34/78
33
ST62T52C ST62T62C/E62C
35/78
34
ST62T52C ST62T62C/E62C
4 ON-CHIP PERIPHERALS
RESET VDD
SIN CONTROLS
DATA VDD
DIRECTION
REGISTE R
INPUT /OUTPUT
DATA
REGISTE R
SHIFT
REGIST ER
OPTION
REGISTE R
SOUT
TO INTERRU PT
TO ADC
VA00413
36/78
35
ST62T52C ST62T62C/E62C
37/78
36
ST62T52C ST62T62C/E62C
Interrupt Input
pull-up 010* 011 Analog
Input
pull-up (Reset 000 001 Input
state)
38/78
37
ST62T52C ST62T62C/E62C
Input
PA4-PA5
Reset state(
PB0, PB6-PB7
PC2-PC3
Data in
Reset state if PULL-UP PB2-PB3,
option disabled Interrupt
Input PA4-PA5
Reset state PB0,,PB6-PB7
PC2-PC3
Data in
Reset state if PULL-UP
option enabled PB2-PB3 Interrupt
Input PA4-PA5
with pull up PB0, PB2-PB3,PB6-PB7
Data in
with interrupt PC2-PC3
Interrupt
PA4-PA5
Analog Input
PC2-PC3 ADC
PA4-PA5
Open drain output
PC2-PC3
5mA
Data out
Open drain output
PB0, PB2-PB3,PB6-PB7
30mA
PA4-PA5
Push-pull output
PC2-PC3
5mA
Data out
Push-pull output
PB0, PB2-PB3,PB6-PB7
30mA
39/78
38
ST62T52C ST62T62C/E62C
PID
ARTIMin
ARTIMin DR
AR TIMER
PID
OR
PWMOE
1 ARTIMout
ARTIMout MUX
0 DR
VR01661G
40/78
39
ST62T52C ST62T62C/E62C
4.2 TIMER
The MCU features an on-chip Timer peripheral, The prescaler input is the internal frequency (fINT)
consisting of an 8-bit counter with a 7-bit program- divided by 12. The prescaler decrements on the
mable prescaler, giving a maximum count of 215. rising edge. Depending on the division factor pro-
Figure 25. shows the Timer Block Diagram. The grammed by PS2, PS1 and PS0 bits in the TSCR
content of the 8-bit counter can be read/written in (see Table 13.), the clock input of the timer/coun-
the Timer/Counter register, TCR, which can be ad- ter register is multiplexed to different sources. For
dressed in Data space as a RAM location at ad- division factor 1, the clock input of the prescaler is
dress 0D3h. The state of the 7-bit prescaler can be also that of timer/counter; for factor 2, bit 0 of the
read in the PSC register at address 0D2h. The prescaler register is connected to the clock input of
control logic device is managed in the TSCR reg- TCR. This bit changes its state at half the frequen-
ister as described in the following paragraphs. cy of the prescaler input clock. For factor 4, bit 1 of
the PSC is connected to the clock input of TCR,
The 8-bit counter is decrement by the output (ris- and so forth. The prescaler initialize bit, PSI, in the
ing edge) coming from the 7-bit prescaler and can TSCR register must be set to allow the prescaler
be loaded and read under program control. When (and hence the counter) to start. If it is cleared, all
it decrements to zero then the TMZ (Timer Zero)bit the prescaler bits are set and the counter is inhib-
in the TSCR is set. If the ETI (Enable Timer Inter- ited from counting. The prescaler can be loaded
rupt) bit in the TSCR is also set, an interrupt re- with any value between 0 and 7Fh, if bit PSI is set.
quest is generated. The Timer interrupt can be The prescaler tap is selected by means of the
used to exit the MCU from WAIT mode. PS2/PS1/PS0 bits in the control register.
Figure 26. illustrates the Timers working principle.
Figure 25. Timer Block Diagram
DATA BUS
8 8 8
6 8-BIT b7 b6 b5 b4 b3 b2 b1 b0
5
COUNTER
4 STATUS/CONTROL
PSC SELECT
3 REGISTER
2 1 OF 7
fINT 1 TMZ ETI D5 D4 PSI PS2 PS1 PS0
12
0
3
INTERRUPT
LINE
VR02070A
41/78
40
ST62T52C ST62T62C/E62C
TIMER (Contd)
4.2.1 Timer Operation zero, the TMZ bit in the TSCR register is set to
The Timer prescaler is clocked by the prescaler one.
clock input (fINT 12). 4.2.3 Application Notes
The user can select the desired prescaler division TMZ is set when the counter reaches zero; howev-
ratio through the PS2, PS1, PS0 bits. When the er, it may also be set by writing 00h in the TCR
TCR count reaches 0, it sets the TMZ bit in the register or by setting bit 7 of the TSCR register.
TSCR. The TMZ bit can be tested under program The TMZ bit must be cleared by user software
control to perform a timer function whenever it when servicing the timer interrupt to avoid unde-
goes high. sired interrupts when leaving the interrupt service
4.2.2 Timer Interrupt routine. After reset, the 8-bit counter register is
loaded with 0FFh, while the 7-bit prescaler is load-
When the counter register decrements to zero with ed with 07Fh, and the TSCR register is cleared.
the ETI (Enable Timer Interrupt) bit set to one, an This means that the Timer is stopped (PSI=0)
interrupt request associated with Interrupt Vector and the timer interrupt is disabled.
#3 is generated. When the counter decrements to
Figure 26. Timer Working Principle
7-BIT PRESCALER
0 1 2 3 4 5 6 7 PS0
8-1 MULTIPLEXER PS1
PS2
8-BIT COUNTER
VA00186
42/78
41
ST62T52C ST62T62C/E62C
TIMER (Contd)
A write to the TCR register will predominate over PSI=0 both counter and prescaler are not run-
the 8-bit counter decrement to 00h function, i.e. if a ning.
write and a TCR register decrement to 00h occur Bit 2, 1, 0 = PS2, PS1, PS0: Prescaler Mux. Se-
simultaneously, the write will take precedence, lect. These bits select the division ratio of the pres-
and the TMZ bit is not set until the 8-bit counter caler register.
reaches 00h again. The values of the TCR and the
PSC registers can be read accurately at any time. Table 13. Prescaler Division Factors
PS2 PS1 PS0 Divided by
4.2.4 Timer Registers 0 0 0 1
Timer Status Control Register (TSCR) 0 0 1 2
Address: 0D4h Read/Write 0 1 0 4
0 1 1 8
7 0
1 0 0 16
TMZ ETI D5 D4 PSI PS2 PS1 PS0 1 0 1 32
1 1 0 64
1 1 1 128
Bit 7 = TMZ: Timer Zero bit
A low-to-high transition indicates that the timer
count register has decrement to zero. This bit Timer Counter Register (TCR)
must be cleared by user software before starting a Address: 0D3h Read/Write
new count.
7 0
Bit 6 = ETI: Enable Timer Interrup
When set, enables the timer interrupt request D7 D6 D5 D4 D3 D2 D1 D0
(vector #3). If ETI=0 the timer interrupt is disabled.
If ETI=1 and TMZ=1 an interrupt request is gener-
ated. Bit 7-0 = D7-D0: Counter Bits.
Bit 5 = D5: Reserved
Must be set to 1. Prescaler Register PSC
Bit 4 = D4 Address: 0D2h Read/Write
Do not care. 7 0
Bit 3 = PSI: Prescaler Initialize Bit
D7 D6 D5 D4 D3 D2 D1 D0
Used to initialize the prescaler and inhibit its count-
ing. When PSI=0 the prescaler is set to 7Fh and
the counter is inhibited. When PSI=1 the prescal- Bit 7 = D7: Always read as 0.
er is enabled to count downwards. As long as Bit 6-0 = D6-D0: Prescaler Bits.
43/78
42
ST62T52C ST62T62C/E62C
44/78
43
ST62T52C ST62T62C/E62C
DRB7
AR COMPARE
REGISTER
8
PB7/
ARTIMout
CPF
COMPARE R
S
8
PWMOE
8 8
PB6/
ARTIMin
SL0-SL1
AR AR
EF
SYNCHRO RELOAD/CAPTURE LOAD
REGISTER REGISTER
8 8
DATA BUS
VR01660A
45/78
44
ST62T52C ST62T62C/E62C
COUNTER
255
COMPARE
VALUE
RELOAD
REGISTER
000
t
PWM OUTPUT
t
VR001852
46/78
45
ST62T52C ST62T62C/E62C
47/78
46
ST62T52C ST62T62C/E62C
48/78
47
ST62T52C ST62T62C/E62C
49/78
48
ST62T52C ST62T62C/E62C
50/78
49
ST62T52C ST62T62C/E62C
51/78
50
ST62T52C ST62T62C/E62C
5 SOFTWARE
52/78
51
ST62T52C ST62T62C/E62C
The ST6 core offers a set of 40 basic instructions Load & Store. These instructions use one, two or
which, when combined with nine addressing three bytes in relation with the addressing mode.
modes, yield 244 usable opcodes. They can be di- One operand is the Accumulator for LOAD and the
vided into six different types: load/store, arithme- other operand is obtained from data memory using
tic/logic, conditional branch, control instructions, one of the addressing modes.
jump/call, and bit manipulation. The following par-
agraphs describe the different types. For Load Immediate one operand can be any of
the 256 data space bytes while the other is always
All the instructions belonging to a given type are immediate data.
presented in individual tables.
Table 16. Load & Store Instructions
Flags
Instruction Addressing Mode Bytes Cycles
Z C
LD A, X Short Direct 1 4 *
LD A, Y Short Direct 1 4 *
LD A, V Short Direct 1 4 *
LD A, W Short Direct 1 4 *
LD X, A Short Direct 1 4 *
LD Y, A Short Direct 1 4 *
LD V, A Short Direct 1 4 *
LD W, A Short Direct 1 4 *
LD A, rr Direct 2 4 *
LD rr, A Direct 2 4 *
LD A, (X) Indirect 1 4 *
LD A, (Y) Indirect 1 4 *
LD (X), A Indirect 1 4 *
LD (Y), A Indirect 1 4 *
LDI A, #N Immediate 2 4 *
LDI rr, #N Immediate 3 4 * *
Notes:
X,Y. Indirect Register Pointers, V & W Short Direct Registers
# . Immediate data (stored in ROM memory)
rr. Data space register
. Affected
* . Not Affected
53/78
52
ST62T52C ST62T62C/E62C
54/78
53
ST62T52C ST62T62C/E62C
55/78
54
ST62T52C ST62T62C/E62C
Opcode Map Summary. The following table contains an opcode map for the instructions used by the ST6
LOW LOW
0 1 2 3 4 5 6 7
0000 0001 0010 0011 0100 0101 0110 0111
HI HI
2 JRNZ 4 CALL 2 JRNC 5 JRR 2 JRZ 2 JRC 4 LD
0 e abc e b0,rr,ee e # e a,(x) 0
0000 0000
1 pcr 2 ext 1 pcr 3 bt 1 pcr 1 prc 1 ind
2 JRNZ 4 CALL 2 JRNC 5 JRS 2 JRZ 4 INC 2 JRC 4 LDI
1 e abc e b0,rr,ee e x e a,nn 1
0001 0001
1 pcr 2 ext 1 pcr 3 bt 1 pcr 1 sd 1 prc 2 imm
2 JRNZ 4 CALL 2 JRNC 5 JRR 2 JRZ 2 JRC 4 CP
2 e abc e b4,rr,ee e # e a,(x) 2
0010 0010
1 pcr 2 ext 1 pcr 3 bt 1 pcr 1 prc 1 ind
2 JRNZ 4 CALL 2 JRNC 5 JRS 2 JRZ 4 LD 2 JRC 4 CPI
3 e abc e b4,rr,ee e a,x e a,nn 3
0011 0011
1 pcr 2 ext 1 pcr 3 bt 1 pcr 1 sd 1 prc 2 imm
2 JRNZ 4 CALL 2 JRNC 5 JRR 2 JRZ 2 JRC 4 ADD
4 e abc e b2,rr,ee e # e a,(x) 4
0100 0100
1 pcr 2 ext 1 pcr 3 bt 1 pcr 1 prc 1 ind
2 JRNZ 4 CALL 2 JRNC 5 JRS 2 JRZ 4 INC 2 JRC 4 ADDI
5 e abc e b2,rr,ee e y e a,nn 5
0101 0101
1 pcr 2 ext 1 pcr 3 bt 1 pcr 1 sd 1 prc 2 imm
2 JRNZ 4 CALL 2 JRNC 5 JRR 2 JRZ 2 JRC 4 INC
6 e abc e b6,rr,ee e # e (x) 6
0110 0110
1 pcr 2 ext 1 pcr 3 bt 1 pcr 1 prc 1 ind
2 JRNZ 4 CALL 2 JRNC 5 JRS 2 JRZ 4 LD 2 JRC
7 e abc e b6,rr,ee e a,y e # 7
0111 0111
1 pcr 2 ext 1 pcr 3 bt 1 pcr 1 sd 1 prc
2 JRNZ 4 CALL 2 JRNC 5 JRR 2 JRZ 2 JRC 4 LD
8 e abc e b1,rr,ee e # e (x),a 8
1000 1000
1 pcr 2 ext 1 pcr 3 bt 1 pcr 1 prc 1 ind
2 RNZ 4 CALL 2 JRNC 5 JRS 2 JRZ 4 INC 2 JRC
9 e abc e b1,rr,ee e v e # 9
1001 1001
1 pcr 2 ext 1 pcr 3 bt 1 pcr 1 sd 1 prc
2 JRNZ 4 CALL 2 JRNC 5 JRR 2 JRZ 2 JRC 4 AND
A e abc e b5,rr,ee e # e a,(x) A
1010 1010
1 pcr 2 ext 1 pcr 3 bt 1 pcr 1 prc 1 ind
2 JRNZ 4 CALL 2 JRNC 5 JRS 2 JRZ 4 LD 2 JRC 4 ANDI
B e abc e b5,rr,ee e a,v e a,nn B
1011 1011
1 pcr 2 ext 1 pcr 3 bt 1 pcr 1 sd 1 prc 2 imm
2 JRNZ 4 CALL 2 JRNC 5 JRR 2 JRZ 2 JRC 4 SUB
C e abc e b3,rr,ee e # e a,(x) C
1100 1100
1 pcr 2 ext 1 pcr 3 bt 1 pcr 1 prc 1 ind
2 JRNZ 4 CALL 2 JRNC 5 JRS 2 JRZ 4 INC 2 JRC 4 SUBI
D e abc e b3,rr,ee e w e a,nn D
1101 1101
1 pcr 2 ext 1 pcr 3 bt 1 pcr 1 sd 1 prc 2 imm
2 JRNZ 4 CALL 2 JRNC 5 JRR 2 JRZ 2 JRC 4 DEC
E e abc e b7,rr,ee e # e (x) E
1110 1110
1 pcr 2 ext 1 pcr 3 bt 1 pcr 1 prc 1 ind
2 JRNZ 4 CALL 2 JRNC 5 JRS 2 JRZ 4 LD 2 JRC
F e abc e b7,rr,ee e a,w e # F
1111 1111
1 pcr 2 ext 1 pcr 3 bt 1 pcr 1 sd 1 prc
56/78
55
ST62T52C ST62T62C/E62C
57/78
56
ST62T52C ST62T62C/E62C
6 ELECTRICAL CHARACTERISTICS
Notes:
- Stresses above those listed as absolute maximum ratings may cause permanent damage to the device. This is a stress rating only and
functional operation of the device at these conditions is not implied. Exposure to maximum rating conditions for extended periods may
affect device reliability.
- (1) Within these limits, clamping diodes are guarantee to be not conductive. Voltages outside these limits are authorised as long as injection
current is kept within the specification.
58/78
57
ST62T52C ST62T62C/E62C
Figure 30. Maximum Operating FREQUENCY (Fmax) Versus SUPPLY VOLTAGE (VDD)
4
3 Suffix version
3
1
2.5 3 3.6 4 4.5 5 5.5 6
The shaded area is outside the recommended operating range; device functionality is not guaranteed under these conditions.
59/78
58
ST62T52C ST62T62C/E62C
Notes:
(1) Hysteresis voltage between switching levels
(2) All peripherals running
(3) All peripherals in stand-by
60/78
59
ST62T52C ST62T62C/E62C
Value
Symbol Parameter Test Conditions Unit
Min. Typ. Max.
Vup LVD Threshold in power-on Vdn +50 mV 4.1 4.3 V
V dn LVD threshold in powerdown 3.6 3.8 Vup -50 mV V
VDD= 5.0V; IOL = +10A 0.1
Low Level Output Voltage
VDD= 5.0V; IOL = + 5mA 0.8
All Output pins
VDD= 5.0V; IOL = + 10mAv 1.2
VOL VDD= 5.0V; IOL = +10A 0.1 V
Low Level Output Voltage VDD= 5.0V; IOL = +10mA 0.8
30 mA Sink I/O pins VDD= 5.0V; IOL = +20mA 1.3
VDD= 5.0V; IOL = +30mA 2.0
High Level Output Voltage VDD= 5.0V; IOH = -10A 4.9
VOH V
All Output pins VDD= 5.0V; IOH = -5.0mA 3.5
Supply Current in STOP ILOAD=0mA
IDD 10 A
Mode, with LVD disabled(*) VDD=5.0V
Note:
(*) All Peripherals in stand-by.
Notes:
1. Period for which VDD has to be connected at 0V to allow internal Reset function at next power-up.
2 An oscillator frequency above 1MHz is recommended for reliable A/D results.
3. Measure performed with OSCin pin soldered on PCB, with an around 2pF equivalent capacitance.
61/78
60
ST62T52C ST62T62C/E62C
Notes:
1. Noise at VDD, VSS <10mV
2. With oscillator frequencies less than 1MHz, the A/D Converter accuracy is decreased.
62/78
ST62T52C ST62T62C/E62C
6 T = -40C
Vol (V)
T = 25C
4
T = 95C
2 T = 125C
0
0 10 20 30 40
Iol (mA)
This curves represents typical variations and is given for guidance only
8
6 Vdd = 3.0V
Vol (V)
Vdd = 4.0V
4
Vdd = 5.0V
2 Vdd = 6.0V
0
0 10 20 30 40
Iol (mA)
This curves represents typical variations and is given for guidance only
Figure 33. Vol versus Iol for High sink (30mA) I/Oports at T=25C
5
4
Vdd = 3.0V
Vol (V)
3 Vdd = 4.0V
2 Vdd = 5.0V
1 Vdd = 6.0V
0
0 10 20 30 40
Iol (mA)
This curves represents typical variations and is given for guidance only
63/78
62
ST62T52C ST62T62C/E62C
Figure 34. Vol versus Iol for High sink (30mA) I/O ports at Vdd=5V
5
4
T= -40C
Vol (V)
3 T= 25C
2 T= 95C
T= 125C
1
0
0 10 20 30 40
Iol (mA)
This curves represents typical variations and is given for guidance only
6
4 Vdd = 3.0V
Voh (V)
Vdd = 4.0V
2
Vdd = 5.0V
0 Vdd = 6.0V
-2
0 10 20 30 40
Ioh (mA)
This curves represents typical variations and is given for guidance only
4 T= -40C
Voh (V)
T= 25C
2
T= 95C
0 T= 125C
-2
0 10 20 30 40
Ioh (mA)
This curves represents typical variations and is given for guidance only
64/78
63
ST62T52C ST62T62C/E62C
Figure 37. Idd WAIT versus Vcc at 8 Mhz for OTP devices
2.5
Idd WAIT (mA)
2 T = -40C
1.5 T = 25C
1 T = 95C
0.5 T = 125C
0
3V 4V 5V 6V
Vdd
This curves represents typical variations and is given for guidance only
8
Idd STOP (A)
6 T= -40C
4 T= 25C
2 T= 95C
0 T= 125C
-2
3V 4V 5V 6V
Vdd
This curves represents typical variations and is given for guidance only
1.5
Idd STOP (A)
T = -40C
1
T = 25C
0.5 T = 95C
T = 125C
0
-0.5
3V 4V 5V 6V
Vdd
This curves represents typical variations and is given for guidance only
65/78
64
ST62T52C ST62T62C/E62C
Figure 40. Idd WAIT versus Vcc at 8Mhz for ROM devices
2.5
Idd WAIT (mA)
2 T = -40C
1.5 T = 25C
1 T = 95C
0.5 T = 125C
0
3V 4V 5V 6V
Vdd
This curves represents typical variations and is given for guidance only
Figure 41. Idd RUN versus Vcc at 8 Mhz for ROM and OTP devices
6
Idd RUN (mA)
T = -40C
T = 25C
4
T = 95C
T = 125C
2
0
3V 4V 5V 6V
Vdd
This curves represents typical variations and is given for guidance only
4.2
4.1
Vthresh.
4
Vup
Vdn
3.9
3.8
3.7
-40C 25C 95C 125C
Temp
This curves represents typical variations and is given for guidance only
66/78
65
ST62T52C ST62T62C/E62C
10
Frequency
MHz
R=10K
1
R=27K
R=100K
0.1
3 3.5 4 4.5 5 5.5 6
VDD (volts)
This curves represents typical variations and is given for guidance only
Figure 44. RC frequency versus Vcc (Except for ST626xB ROM devices)
10
Frequency
R=47K
MHz
1 R=100K
R=470K
0.1
3 3.5 4 4.5 5 5.5 6
VDD (volts)
This curves represents typical variations and is given for guidance only
67/78
66
ST62T52C ST62T62C/E62C
7 GENERAL INFORMATION
mm inches
Dim.
Min Typ Max Min Typ Max
A 5.33 0.210
A1 0.38 0.015
A2 2.92 3.30 4.95 0.115 0.130 0.195
b 0.36 0.56 0.014 0.022
b2 1.52 1.78 0.060 0.070
c 0.20 0.25 0.36 0.008 0.010 0.014
D 18.67 19.18 19.69 0.735 0.755 0.775
e 2.54 0.100
E1 6.10 6.35 7.11 0.240 0.250 0.280
L 2.92 3.30 3.81 0.115 0.130 0.150
Number of Pins
PDIP16
N 16
mm inches
Dim.
Min Typ Max Min Typ Max
A 3.78 0.149
A1 0.38 0.015
B 0.36 0.46 0.56 0.014 0.018 0.022
B1 1.14 1.37 1.78 0.045 0.054 0.070
C 0.20 0.25 0.36 0.008 0.010 0.014
D 19.86 20.32 20.78 0.782 0.800 0.818
D1 17.78 0.700
E1 7.04 7.49 7.95 0.277 0.295 0.313
e 2.54 0.100
G 6.35 6.60 6.86 0.250 0.260 0.270
G1 9.47 9.73 9.98 0.373 0.383 0.393
G2 1.02 0.040
L 2.92 3.30 3.81 0.115 0.130 0.150
S 1.27 0.050
CDIP16W
4.22 0.166
Number of Pins
N 16
68/78
67
ST62T52C ST62T62C/E62C
mm inches
Dim.
Min Typ Max Min Typ Max
A 2.35 2.65 0.0926 0.1043
A1 0.10 0.0040
B 0.33 0.51 0.013 0.020
C 0.32 0.0125
D 10.10 10.50 0.3977 0.4133
E 7.40 7.60 0.2914 0.2992
e 1.27 0.050
H 10.01 10.64 0.394 0.419
h 0.25 0.74 0.010 0.029
K 0 8 0 8
L 0.41 1.27 0.016 0.050
mm inches
Dim.
Min Typ Max Min Typ Max
A 1.73 1.86 1.99 0.068 0.073 0.078
A1 0.05 0.13 0.21 0.002 0.005 0.008
B 0.25 0.38 0.010 0.015
C 0.09 0.20 0.004 0.008
D 6.07 6.20 6.33 0.239 0.244 0.249
E 7.65 7.80 7.90 0.301 0.307 0.311
E1 5.20 5.30 5.38 0.205 0.209 0.212
e 0.65 0.026
G 0.076 0.003
K 0 4 8 0 4 8
L 0.63 0.75 0.95 0.025 0.030 0.037
THERMAL CHARACTERISTIC
Value
Symbol Parameter Test Conditions Unit
Min. Typ. Max.
PDIP16 55
RthJA Thermal Resistance C/W
PSO16 75
69/78
68
ST62T52C ST62T62C/E62C
70/78
69
ST62P52C
ST62P62C
8-BIT FASTROM MCUs WITH A/D CONVERTER,
SAFE RESET, AUTO-RELOAD TIMER AND EEPROM
DEVICE SUMMARY
ROM
DEVICE EEPROM
(Bytes)
ST62P52C 1836 -
ST62P62C 1836 64
Rev. 2.7
1 GENERAL DESCRIPTION
1.1 INTRODUCTION 1.2.2 Listing Generation and Verification
The ST62P52C and ST62P62C are the Factory When STMicroelectronics receives the users
Advanced Service Technique ROM (FASTROM) ROM contents, a computer listing is generated
version of ST62T52C and ST62T62C OTP devic- from it. This listing refers exactly to the ROM con-
es. tents and options which will be used to produce
They offer the same functionality as OTP devices, the specified MCU. The listing is then returned to
selecting as FASTROM options the options de- the customer who must thoroughly check, com-
fined in the programmable option byte of the OTP plete, sign and return it to STMicroelectronics. The
version. signed listing forms a part of the contractual agree-
ment for the production of the specific customer
1.2 ORDERING INFORMATION MCU.
The following section deals with the procedure for The STMicroelectronics Sales Organization will be
transfer of customer codes to STMicroelectronics. pleased to provide detailed information on con-
tractual points.
1.2.1 Transfer of Customer Code
Customer code is made up of the ROM contents
and the list of the selected FASTROM options. Table 1. ROM Memory Map for ST62P52C/P62C
The ROM contents are to be sent on diskette, or
by electronic means, with the hexadecimal file Device Address Description
generated by the development tool. All unused 0000h-087Fh Reserved
bytes must be set to FFh. 0880h-0F9Fh User ROM
0FA0h-0FEFh Reserved
The selected options are communicated to STMi- 0FF0h-0FF7h Interrupt Vectors
croelectronics using the correctly filled OPTION 0FF8h-0FFBh Reserved
LIST appended. 0FFCh-0FFDh NMI Interrupt Vector
0FFEh-0FFFh Reset Vector
Table 2. FASTROM version Ordering Information
Sales Type ROM EEPROM (Bytes) Temperature Range Package
ST62P52CM1/XXX 0 to +70C
ST62P52CM6/XXX 1836 Bytes None -40 to + 85C
ST62P52CM3/XXX (*) -40 to + 125C
PSO16
ST62P62CM1/XXX 0 to +70C
ST62P62CM6/XXX 1836 Bytes 64 -40 to + 85C
ST62P62CM3/XXX (*) -40 to + 125C
ST62P52CB1/XXX 0 to +70C
ST62P52CB6/XXX 1836 Bytes None -40 to + 85C
ST62P52CB3/XXX (*) -40 to + 125C
PDIP16
ST62P62CB1/XXX 0 to +70C
ST62P62CB6/XXX 1836 Bytes 64 -40 to + 85C
ST62P62CB3/XXX (*) -40 to + 125C
ST62P52CN1/XXX 0 to +70C
ST62P52CN6/XXX 1836 Bytes None -40 to + 85C
ST62P52CN3/XXX (*) -40 to + 125C
SSOP16
ST62P62CN1/XXX 0 to +70C
ST62P62CN6/XXX 1836 Bytes 64 -40 to + 85C
ST62P62CN3/XXX (*) -40 to + 125C
72/78
71
ST62P52C ST62P62C
STMicroelectronics references
Device: [ ] ST62P52C [ ] ST62P62C
Package: [ ] Dual in Line Plastic [ ] Small Outline Plastic with condionning:
[ ] Standard (Stick)
[ ] Tape & Reel
[ ] Shrink Small Outline Plastic
Temperature Range: [ ] 0C to + 70C [ ] - 40C to + 85C [ ] - 40C to + 125C
73/78
72
ST62P52C ST62P62C
Notes:
74/78
73
ST6252C
ST6262B
8-BIT ROM MCUs WITH A/D CONVERTER,
SAFE RESET AUTO-RELOAD TIMER, ROM AND EEPROM
DEVICE SUMMARY
ROM
DEVICE EEPROM LVD & OSG
(Bytes)
Rev. 2.7
1 GENERAL DESCRIPTION
1.1 INTRODUCTION 1.2 ROM READOUT PROTECTION
The ST6252C and ST6262B are mask pro- If the ROM READOUT PROTECTION option is
grammed ROM version of ST62T52C and selected, a protection fuse can be blown to pre-
ST62T62C OTP devices. vent any access to the program memory content.
They offer the same functionality as OTP devices, In case the user wants to blow this fuse, high volt-
selecting as ROM options the options defined in age must be applied on the TEST pin.
the programmable option byte of the OTP version,
except the LVD & OSG options that are not availa-
ble on the ST6262B ROM device. Figure 2. Programming Circuit
0.5s min
TEST
5V 47mF
15 100nF
14V typ
10
VSS
5
VDD
TEST PROTECT
150 s typ
TEST 14V
100nF
100mA ZPD15
max 15V
VR02003
4mA typ
t
VR02001
Note: ZPD15 is used for overvoltage protection
76/78
75
ST6252C ST6262B
STMicroelectronics references
Device: [ ] ST6252C [ ] ST6262B
Package: [ ] Dual in Line Plastic [ ] Small Outline Plastic with condionning:
[ ] Standard (Stick)
[ ] Tape & Reel
[ ] Shrink Small Outline Plastic
Temperature Range: [ ] 0C to + 70C [ ] - 40C to + 85C [ ] - 40C to + 125C
Special Marking: [ ] No [ ] Yes _ _ _ _ _ _ _ _ _ _ _
Authorized characters are letters, digits, ., -, / and spaces only.
Maximum character count: DIP16: 9
SO16: 5
Oscillator Source Selection: [ ] Crystal Quartz/Ceramic resonator
[ ] RC Network
Watchdog Selection: [ ] Software Activation
[ ] Hardware Activation
Power on Reset Delay [ ] 32768 cycle delay
[ ] 2048 cycle delay
ROM Readout Protection: [ ] Disabled (Fuse cannot be blown)
[ ] Enabled (Fuse can be blown by the customer)
Note: No part is delivered with protected ROM.
The fuse must be blown for protection to be effective.
External STOP Mode Control [ ] Enabled [ ] Disabled
PB2-PB3 Pull-Up at RESET [ ] Enabled [ ] Disabled
LVD Reset* [ ] Enabled [ ] Disabled
ADC Synchro* [ ] Enabled [ ] Disabled
Oscillator Safe Guard* [ ] Enabled [ ] Disabled
*ST6252C only
77/78
76
ST6252C ST6262B
1.3 ORDERING INFORMATION from it. This listing refers exactly to the mask which
will be used to produce the specified MCU. The
The following section deals with the procedure for listing is then returned to the customer who must
transfer of customer codes to STMicroelectronics. thoroughly check, complete, sign and return it to
1.3.1 Transfer of Customer Code STMicroelectronics. The signed listing forms a
part of the contractual agreement for the creation
Customer code is made up of the ROM contents of the specific customer mask.
and the list of the selected mask options. The
ROM contents are to be sent on diskette, or by The STMicroelectronics Sales Organization will be
electronic means, with the hexadecimal file gener- pleased to provide detailed information on con-
ated by the development tool. All unused bytes tractual points.
must be set to FFh.
Table 1. ROM Memory Map for ST6252C/62B
The selected mask options are communicated to
Device Address Description
STMicroelectronics using the correctly filled OP-
TION LIST appended. 0000h-087Fh Reserved
0880h-0F9Fh User ROM
1.3.2 Listing Generation and Verification 0FA0h-0FEFh Reserved
0FF0h-0FF7h Interrupt Vectors
When STMicroelectronics receives the users
0FF8h-0FFBh Reserved
ROM contents, a computer listing is generated
0FFCh-0FFDh NMI Interrupt Vector
0FFEh-0FFFh Reset Vector
Table 2. ROM version Ordering Information
Sales Type ROM EEPROM (Bytes) Temperature Range Package
ST6252CB1/XXX 0 to +70C
ST6252CB6/XXX -40 to + 85C PDIP16
ST6252CB3/XXX -40 to + 125C
1836 Bytes None
ST6252CM1/XXX 0 to +70C
ST6252CM6/XXX -40 to + 85C PSO16
ST6252CM3/XXX -40 to + 125C
ST6252CN1/XXX 0 to +70C
ST6252CN6/XXX -40 to + 85C SSOP16
ST6252CN3/XXX -40 to + 125C
ST6262BB1/XXX 0 to +70C
ST6262BB6/XXX -40 to + 85C PDIP16
ST6262BB3/XXX -40 to + 125C
1836 Bytes 64
ST6262BM1/XXX 0 to +70C
ST6262BM6/XXX -40 to + 85C PSO16
ST6262BM3/XXX -40 to + 125C
ST6262BN1/XXX 0 to +70C
ST6262BN6/XXX -40 to + 85C SSOP16
ST6262BN3/XXX -40 to + 125C
Information furnished is believed to be accurate and reliable. However, STMicroelectronics assumes no responsibility for the consequences
of use of such information nor for any infringement of patents or other rights of third parties which may result from its use. No license is granted
by implication or otherwise under any patent or patent rights of STMicroelectronics. Specifications mentioned in this publication are subject
to change without notice. This publication supersedes and replaces all information previously supplied. STMicroelectronics products are not
authorized for use as critical components in life support devices or systems without the express written approval of STMicroelectronics.
The ST logo is a registered trademark of STMicroelectronics
1999 STMicroelectronics - All Rights Reserved.
Purchase of I2 C Components by STMicroelectronics conveys a license under the Philips I2C Patent. Rights to use these components in an
I2C system is granted provided that the system conforms to the I2C Standard Specification as defined by Philips.
STMicroelectronics Group of Companies
Australia - Brazil - China - Finland - France - Germany - Hong Kong - India - Italy - Japan - Malaysia - Malta - Morocco - Singapore - Spain
Sweden - Switzerland - United Kingdom - U.S.A.
http:// www.st.com
78/78