ST62T18C Microcontr 8 Bit
ST62T18C Microcontr 8 Bit
Rev. 2.5
82
2/82
2
Table of Contents Document
Page
4 ON-CHIP PERIPHERALS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
4.1 I/O PORTS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
4.1.1 Operating Modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
4.1.2 Safe I/O State Switching Sequence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
4.1.3 ARTimer alternate functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
4.1.4 UART alternate functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
4.1.5 I/O Port Option Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
4.1.6 I/O Port Data Direction Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
4.1.7 I/O Port Data Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
4.2 TIMER . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
4.2.1 Timer Operating Modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
4.2.2 Timer Interrupt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
4.2.3 Application Notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
4.2.4 Timer Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
4.3 AUTO-RELOAD TIMER . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
4.3.1 AR Timer Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
4.3.2 Timer Operating Modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
4.3.3 AR Timer Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
4.4 A/D CONVERTER (ADC) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
4.4.1 Application Notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
4.5 U. A. R. T. (UNIVERSAL ASYNCHRONOUS RECEIVER/TRANSMITTER) . . . . . . . . . . . 53
4.5.1 Ports Interfacing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
4.5.2 Clock Generation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
4.5.3 Data Transmission . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
4.5.4 Data Reception . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
4.5.5 Interrupt Capabilities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
4.5.6 Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
5 SOFTWARE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
5.1 ST6 ARCHITECTURE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
5.2 ADDRESSING MODES . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
5.3 INSTRUCTION SET . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
6 ELECTRICAL CHARACTERISTICS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
6.1 ABSOLUTE MAXIMUM RATINGS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
6.2 RECOMMENDED OPERATING CONDITIONS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
6.3 DC ELECTRICAL CHARACTERISTICS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
6.4 AC ELECTRICAL CHARACTERISTICS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
6.5 A/D CONVERTER CHARACTERISTICS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
6.6 TIMER CHARACTERISTICS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
6.7 SPI CHARACTERISTICS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
6.8 ARTIMER ELECTRICAL CHARACTERISTICS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
7 GENERAL INFORMATION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
7.1 PACKAGE MECHANICAL DATA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
7.2 ORDERING INFORMATION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
3/82
3
Table of Contents Document
Page
ST62P18C . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
1 GENERAL DESCRIPTION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
1.1 INTRODUCTION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
1.2 ORDERING INFORMATION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
1.2.1 Transfer of Customer Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
1.2.2 Listing Generation and Verification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
ST6218C . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
1 GENERAL DESCRIPTION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
1.1 INTRODUCTION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
7.3 ROM READOUT PROTECTION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
7.4 ORDERING INFORMATION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82
7.4.1 Transfer of Customer Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82
7.4.2 Listing Generation and Verification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82
82
4/82
4
ST62T18C/E18C
1 GENERAL DESCRIPTION
1.1 INTRODUCTION
The ST62T18C and ST62E18C devices are low common core is surrounded by a number of on-
cost members of the ST62xx 8-bit HCMOS family chip peripherals.
of microcontrollers, which are targeted at low to
medium complexity applications. All ST62xx de- The ST62E18C is the erasable EPROM version of
vices are based on a building block approach: a the ST62T18C device, which may be used to em-
ulate the ST62T18C device, as well as the respec-
tive ST6218C ROM devices.
Figure 1. Block Diagram
PA1 / 20 mA Sink
8-BIT PORT A PA2/ARTIMout / 20 mA Sink
PA3/ARTIMin/ 20 mA Sink
A/D CONVERTER PA4..PA 5/20 mA Sink
TEST/VPP TEST
PORT B PB4..PB6/Ain
NMI INTERRUPT
DATA ROM
USER PD4/Ain/RXD1
SELECTABLE PD5/Ain/TXD1
PORT D
PROGRAM PD6,PD7/Ain
Memory DATA RAM
7948 bytes 192 Bytes
UART
AUTORELOAD
TIMER
PC
5/82
5
ST62T18C/E18C
INTRODUCTION (Cont’d)
OTP and EPROM devices are functionally identi- Figure 2. ST62T18C/E18C Pin Configuration
cal. The ROM based versions offer the same func-
tionality selecting as ROM options the options de- These compact low-cost devices feature a Timer
fined in the programmable option byte of the OTP/
EPROM versions.OTP devices offer all the advan- VDD 1 20 VSS
tages of user programmability at low cost, which TIMER 2 19 PA1*
make them the ideal choice in a wide range of ap- OSCin 3 18 PA2/ARTIMout*
plications where frequent code changes, multiple
OSCout 4 17 PA3/ARTIMin*
code versions or last minute programmability are
required. NMI 5 16 PA4*
TEST/VPP(1) 6 15 PA5*
RESET 7 14 PD4/Ain/RXD1
Ain/PB6 8 13 PD5/Ain/TXD1
Ain/PB5 9 12 PD6/Ain
Ain/PB4 10 11 PD7/Ain
6/82
6
ST62T18C/E18C
VDD and VSS. Power is supplied to the MCU via PA3/ARTIMout and PA4/ARTIMin can be used re-
these two pins. VDD is the power connection and spectively as output and input pins for the embed-
VSS is the ground connection. ded 8-bit Auto-Reload Timer.
OSCin and OSCout. These pins are internally In addition, PA1-PA5 can sink 20mA for direct LED
connected to the on-chip oscillator circuit. A quartz or TRIAC drive.
crystal, a ceramic resonator or an external clock
signal can be connected between these two pins. PB4...PB6. These 3 lines are organised as one I/O
The OSCin pin is the input pin, the OSCout pin is port (B). Each line may be configured under soft-
the output pin. ware control as inputs with or without internal pull-
up resistors, input with interrupt generation and
RESET. The active-low RESET pin is used to re- pull-up resistor, open-drain or push-pull outputs,
start the microcontroller. analog inputs for the A/D converter.
TEST/VPP. The TEST must be held at VSS for nor- PD4...PD7. These 4 lines are organised as one I/O
mal operation. If TEST pin is connected to a port (portD). Each line may be configured under
+12.5V level during the reset phase, the EPROM/ software control as input with or without internal
OTP programming Mode is entered. pull-up resistor, input with interrupt generation and
NMI. The NMI pin provides the capability for asyn- pull-up resistor, analog input open-drain or push-
chronous interruption, by applying an external non pull output. In addition, the pins PD5/TXD1 and
maskable interrupt to the MCU. The NMI input is PD4/RXD1 can be used as UART output (PD5/
falling edge sensitive with Schmitt trigger charac- TXD1) or UART input (PD4/RXD1).
teristics. The user can select as option the availa-
TIMER. This is the TIMER 1 I/O pin. In input mode,
bility of an on-chip pull-up at this pin.
it is connected to the prescaler and acts as ex-
PA1-PA5. These 5 lines are organised as one I/O ternal timer clock or as control gate for the internal
port (A). Each line may be configured under soft- timer clock. In output mode, the TIMER pin outputs
ware control as inputs with or without internal pull- the data bit when a time-out occurs.The user can
up resistors, input with interrupt generation and select as option the availability of an on-chip pull-
pull-up resistor, open-drain or push-pull outputs. up at this pin.
7/82
7
ST62T18C/E18C
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
8/82
8
ST62T18C/E18C
Care is required when handling the PRPR register In the EPROM parts, READOUT PROTECTION
as it is write only. For this reason, it is not allowed option can be disactivated only by U.V. erasure
to change the PRPR contents while executing in- that also results into the whole EPROM context
terrupt service routine, as the service routine erasure.
cannot save and then restore its previous content.
Note: Once the Readout Protection is activated, it
This operation may be necessary if common rou-
is no longer possible, even for STMicroelectronics,
tines and interrupt service routines take more than
to gain access to the Program memory contents.
2K bytes; in this case it could be necessary to di- Returned parts with a protection set can therefore
vide the interrupt service routine into a (minor) part not be accepted.
in the static page (start and end) and to a second
(major) part in one of the dynamic pages. If it is im-
possible to avoid the writing of this register in inter-
rupt service routines, an image of this register
must be saved in a RAM location, and each time
the program writes to the PRPR it must write also
to the image register. The image register must be
written before PRPR, so if an interrupt occurs be-
tween the two instructions the PRPR is not af-
fected.
9/82
9
ST62T18C/E18C
10/82
10
ST62T18C/E18C
Example:
DWR=28h 0 1 0 1 0 0 0
DATA SPACE ADDRESS
0 1 0 1 1 0 0 1 59h
ROM
0 1 0 1 0 0 0 0 1 1 0 0 1
ADDRESS:A19h
VR01573A
11/82
11
ST62T18C/E18C
12/82
12
ST62T18C/E18C
13/82
13
ST62T18C/E18C
INTERRUPTS
CONTROLLER
DATA SPACE
CONTROL
FLAG SIGNALS DATA
OPCODE VALUES ADDRESS /READ LINE
2 RAM/EEPR OM
PROGRAM
DATA
ROM/EPRO M ADDRESS 256
DECODER ROM/EPROM
A-DATA B-DATA
DEDICAT IONS
ACCUMULATOR
Program Counter
12 and FLAGS
6 LAYER STACK ALU
RESULTS TO DATA SPACE (WRITE LINE)
VR01811
14/82
14
ST62T18C/E18C
15/82
15
ST62T18C/E18C
NC
16/82
16
ST62T18C/E18C
17/82
17
ST62T18C/E18C
(1)
(2)
(3)
(4)
Main
Oscillator
Emergency
Oscillator
Internal
Frequency
VR001933
18/82
18
ST62T18C/E18C
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 85°C)
4 2
3
fOSG Min (at 125°C)
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.
19/82
19
ST62T18C/E18C
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?
20/82
20
ST62T18C/E18C
RESETS (Cont’d)
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 start’s 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
21/82
21
ST62T18C/E18C
RESETS (Cont’d)
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
22/82
22
ST62T18C/E18C
RESETS (Cont’d)
Table 6. Register Reset Status
Register Address(es) Status Comment
Port Data Registers 0C0h, 0C1h, 0C3h I/O are Input with or without pull-up
Port Direction Register 0C4h, 0C5h, 0C7h depending on PORT PULL option
Port Option Register 0CCh, 0CDh, 0CFh
Interrupt Option Register 0C8h Interrupt disabled
TIMER Status/Control 0D4h 00h TIMER disabled
23/82
23
ST62T18C/E18C
24/82
24
ST62T18C/E18C
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 384µs to 24.576ms). VR02068A
25/82
25
ST62T18C/E18C
26/82
26
ST62T18C/E18C
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
27/82
27
ST62T18C/E18C
3.4 IINTERRUPTS
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-
28/82
28
ST62T18C/E18C
INTERRUPTS (Cont’d)
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
29/82
29
ST62T18C/E18C
INTERRUPTS (Cont’d)
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 ST62E18C/
T18C are summarized in the Table 10 with associ-
Bit 6 = LES: Level/Edge Selection bit. ated mask bit to enable/disable the interrupt re-
When this bit is set to one, the interrupt source #1 quest.
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 source
GENERAL IOR C8h GEN All Interrupts, excluding NMI All
TIMER TSCR1 D4h ETI TMZ: TIMER Overflow source 4
A/D CONVERTER ADCR D1h EAI EOC: End of Conversion source 4
RXIEN RXRDY: Byte received
UART UARTCR D7h source 4
TXIEN TXMT: Byte sent
OVIE OVF: ARTIMER Overflow
ARTIMER ARMC E5h CPIE CPF: Successful compare source 3
EIE EF: Active edge on ARTIMin
SPI SIDR DCh ALL End of Transmission source 1
Port PAn ORPA-DRPA C0h-C4h ORPAn-DRPAn PAn pin source 1
Port PBn ORPB-DRPB C1h-C5h ORPBn-DRPBn PBn pin source 2
Port PDn ORPD-DRPD C3h-C7h ORPDn-DRPDn PDn pin source 2
30/82
30
ST62T18C/E18C
INTERRUPTS (Cont’d)
Interrupt Polarity Register (IPR) generates interrupt on rising edge. At reset, IPR is
cleared and all port interrupts are not inverted (e.g.
Address: DAh — Read/Write Port C generates interrupts on falling edges).
7 0 Bit 7 - Bit 4 = Unused.
- - - - PortD - PortA PortB Bit 3 = Port D Interrupt Polarity.
Bit 2 = Unused.
In conjunction with I/O register ESB bit, the polarity Bit 1= Port A Interrupt Polarity.
of I/O pins triggered interrupts can be selected by
setting accordingly the Interrupt Polarity Register Bit 0 = Port B Interrupt Polarity.
(IPR). If a bit in IPR is set to one the corresponding
port interrupt is inverted (e.g. IPR bit 2 = A; port C
Tables 11. I/O Interrupts selections according to IPR, IOR programming
Interrupt
GEN IPR3 IPR0 IOR5 Port B occurrence Port D occurrence
source
1 0 0 0 falling edge falling edge
1 0 0 1 rising edge rising edge
1 0 1 0 rising edge falling edge
1 0 1 1 falling edge rising edge
1 1 0 0 falling edge rising edge 2
1 1 0 1 rising edge falling edge
1 1 1 0 rising edge rising edge
1 1 1 1 falling edge falling edge
0 X X X Disabled Disabled
Interrupt
GEN IPR1 IOR6 Port A occurrence
source
1 0 0 falling edge
1 0 1 low level
1 1 0 rising edge 1
1 1 1 high level
0 X X Disabled
31/82
31
ST62T18C/E18C
INTERRUPTS (Cont’d)
Figure 21. Interrupt Block Diagram
FF
NMI INT #0 NMI (FFC,D))
CLK Q
CLR
FROM REGIST ER PORT A,B,D
SINGLE BIT ENABLE I0 Start
PBE
VDD
IPR Bit 1
FF
PORT A CLK Q 0
Bits CLR
MUX INT #1 (FF6,7)
I1 Start
I2 Start
IOR bit 5 (ESB)
IPR Bit 3
PORT D PBE
Bits
OVF
OVIE
EF
EIE
TMZ
ETI
TIMER 1
EAI INT #4 (FF0,1)
EOC
RXRDY
RXIEN
UART
TXMT IOR bit 4(GEN)
TXIEN
32/82
32
ST62T18C/E18C
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 product’s 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 MCU’s behaviour depends on the state fore executing the first instruction.
33/82
33
ST62T18C/E18C
34/82
34
ST62T18C/E18C
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
35/82
35
ST62T18C/E18C
36/82
36
ST62T18C/E18C
Interrupt Input
pull-up 010* 011 Analog
Input
pull-up (Reset 000 001 Input
state)
37/82
37
ST62T18C/E18C
PA1-PA5
Input
PB4-PB6
(Reset state if PORT
PULL option disabled) Data in
PD4-PD7
Interrupt
Input PA1-PA5
with pull up PB4-PB6
(Reset state if PORT Data in
PULL option enabled) PD4-PD7
Interrupt
PA1-PA5
Input
PB4-PB6
with pull up
Data in
with interrupt
PD4-PD7
Interrupt
PA4-PA5
PB4-PB6
Analog Input
ADC
PD4-PD7
38/82
38
ST62T18C/E18C
39/82
39
ST62T18C/E18C
VDD
PID
RXD
PD4/RXD1 DR
UART
IARTOE
PID
0 DR
PD5/TXD1 MUX
1 TXD
PID
ARTIMin
PA3/ARTIMin DR
ARTIMER
PID
OR
PWMOE
PA2/ARTIMout 1 ARTI Mout
MUX
0 DR
VR01661I
40/82
40
ST62T18C/E18C
Px7 Px6 Px5 Px4 Px3 Px2 Px1 Px0 Px7 Px6 Px5 Px4 Px3 Px2 Px1 Px0
Bit 7-0 = Px7 - Px0: Port A, B, and D Option Reg- Bit 7-0 = Px7 - Px0: Port A, B, and D Data Regis-
ister bits. ters bits.
4.1.6 I/O Port Data Direction Registers
DDRA/B/D (C4h PA, C5h PB, C7h PD)
Read/Write
7 0
41/82
41
ST62T18C/E18C
4.2 TIMER
The MCU features an on-chip Timer peripheral, The prescaler input can be the internal frequency
consisting of an 8-bit counter with a 7-bit program- fINT divided by 12 or an external clock applied to
mable prescaler, giving a maximum count of 215. the TIMER pin. The prescaler decrements on the
The peripheral may be configured in three different rising edge. Depending on the division factor pro-
operating modes. grammed by PS2, PS1 and PS0 bits in the TSCR.
Figure 1 shows the Timer Block Diagram. The ex- The clock input of the timer/counter register is mul-
ternal TIMER pin is available to the user. The con- tiplexed to different sources. For division factor 1,
tent of the 8-bit counter can be read/written in the the clock input of the prescaler is also that of timer/
Timer/Counter register, TCR, while the state of the counter; for factor 2, bit 0 of the prescaler register
7-bit prescaler can be read in the PSC register. is connected to the clock input of TCR. This bit
The control logic device is managed in the TSCR changes its state at half the frequency of the pres-
register as described in the following paragraphs. caler input clock. For factor 4, bit 1 of the PSC is
connected to the clock input of TCR, and so forth.
The 8-bit counter is decremented by the output The prescaler initialize bit, PSI, in the TSCR regis-
(rising edge) coming from the 7-bit prescaler and ter must be set to “1” to allow the prescaler (and
can be loaded and read under program control. hence the counter) to start. If it is cleared to “0”, all
When it decrements to zero then the TMZ (Timer the prescaler bits are set to “1” and the counter is
Zero) bit in the TSCR is set to “1”. If the ETI (Ena- inhibited from counting. The prescaler can be
ble Timer Interrupt) bit in the TSCR is also set to loaded with any value between 0 and 7Fh, if bit
“1”, an interrupt request is generated as described PSI is set to “1”. The prescaler tap is selected by
in the Interrupt Chapter. The Timer interrupt can means of the PS2/PS1/PS0 bits in the control reg-
be used to exit the MCU from WAIT mode. ister.
Figure 2 illustrates the Timer’s working principle.
Figure 25. Timer Block Diagram
DATABUS 8
8
8 8
6 b5 b1 b0
b7 b6 b4 b3 b2
5 8-BIT
COUNTER STATUS/CONTROL
4 SELECT
PSC 3 REGISTER
1 OF 7 TMZ ETI TOUT DOUT PSI PS2 PS1 PS0
2
1
0
TIMER
INTERRUPT
LINE
SYNCHRONIZATION LATCH
LOGIC
fOSC :12
VA00009
42/82
42
ST62T18C/E18C
TIMER (Cont’d)
4.2.1 Timer Operating Modes The user can select the desired prescaler division
There are three operating modes, which are se- ratio through the PS2, PS1, PS0 bits. When the
lected by the TOUT and DOUT bits (see TSCR TCR count reaches 0, it sets the TMZ bit in the
register). These three modes correspond to the TSCR. The TMZ bit can be tested under program
two clocks which can be connected to the 7-bit control to perform a timer function whenever it
prescaler (fINT ÷ 12 or TIMER pin signal), and to goes high. The low-to-high TMZ bit transition is
the output mode. used to latch the DOUT bit of the TSCR and trans-
fer it to the TIMER pin. This operating mode allows
4.2.1.1 Gated Mode external signal generation on the TIMER pin.
(TOUT = “0”, DOUT = “1”)
Table 14. Timer Operating Modes
In this mode the prescaler is decremented by the
Timer clock input (f INT ÷ 12), but ONLY when the TOUT DOUT Timer Pin Timer Function
signal on the TIMER pin is held high (allowing 0 0 Input Event Counter
pulse width measurement). This mode is selected 0 1 Input Gated Input
by clearing the TOUT bit in the TSCR register to 1 0 Output Output “0”
“0” (i.e. as input) and setting the DOUT bit to “1”.
1 1 Output Output “1”
4.2.1.2 Event Counter Mode
(TOUT = “0”, DOUT = “0”) 4.2.2 Timer Interrupt
In this mode, the TIMER pin is the input clock of When the counter register decrements to zero with
the prescaler which is decremented on the rising the ETI (Enable Timer Interrupt) bit set to one, an
edge. interrupt request is generated as described in the
4.2.1.3 Output Mode Interrupt Chapter. When the counter decrements
(TOUT = “1”, DOUT = data out) to zero, the TMZ bit in the TSCR register is set to
one.
The TIMER pin is connected to the DOUT latch,
hence the Timer prescaler is clocked by the pres-
caler clock input (fINT ÷ 12).
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
43/82
43
ST62T18C/E18C
TIMER (Cont’d)
4.2.3 Application Notes Bit 4 = DOUT: Data Output
TMZ is set when the counter reaches zero; howev- Data sent to the timer output when TMZ is set high
er, it may also be set by writing 00h in the TCR (output mode only). Input mode selection (input
register or by setting bit 7 of the TSCR register. mode only).
The TMZ bit must be cleared by user software Bit 3 = PSI: Prescaler Initialize Bit
when servicing the timer interrupt to avoid unde- Used to initialize the prescaler and inhibit its count-
sired interrupts when leaving the interrupt service ing. When PSI=“0” the prescaler is set to 7Fh and
routine. After reset, the 8-bit counter register is the counter is inhibited. When PSI=“1” the prescal-
loaded with 0FFh, while the 7-bit prescaler is load- er is enabled to count downwards. As long as
ed with 07Fh, and the TSCR register is cleared. PSI=“0” both counter and prescaler are not run-
This means that the Timer is stopped (PSI=“0”) ning.
and the timer interrupt is disabled. Bit 2, 1, 0 = PS2, PS1, PS0: Prescaler Mux. Se-
If the Timer is programmed in output mode, the lect. These bits select the division ratio of the pres-
DOUT bit is transferred to the TIMER pin when caler register.
TMZ is set to one (by software or due to counter
decrement). When TMZ is high, the latch is trans- Table 15. Prescaler Division Factors
parent and DOUT is copied to the timer pin. When PS2 PS1 PS0 Divided by
TMZ goes low, DOUT is latched. 0 0 0 1
A write to the TCR register will predominate over 0 0 1 2
the 8-bit counter decrement to 00h function, i.e. if a 0 1 0 4
write and a TCR register decrement to 00h occur
simultaneously, the write will take precedence, 0 1 1 8
and the TMZ bit is not set until the 8-bit counter 1 0 0 16
reaches 00h again. The values of the TCR and the 1 0 1 32
PSC registers can be read accurately at any time. 1 1 0 64
4.2.4 Timer Registers 1 1 1 128
Timer Status Control Register (TSCR)
Address: 0D4h — Read/Write
Timer Counter Register TCR
7 0
Address: 0D3h — Read/Write
TMZ ETI TOUT DOUT PSI PS2 PS1 PS0
7 0
D7 D6 D5 D4 D3 D2 D1 D0
Bit 7 = TMZ: Timer Zero bit
A low-to-high transition indicates that the timer
count register has decrement to zero. This bit must Bit 7-0 = D7-D0: Counter Bits.
be cleared by user software before starting a new
count.
Prescaler Register PSC
Bit 6 = ETI: Enable Timer Interrupt
Address: 0D2h — Read/Write
When set, enables the timer interrupt request. If
ETI=0 the timer interrupt is disabled. If ETI=1 and 7 0
TMZ=1 an interrupt request is generated.
Bit 5 = TOUT: Timers Output Control D7 D6 D5 D4 D3 D2 D1 D0
When low, this bit selects the input mode for the
TIMER pin. When high the output mode is select- Bit 7 = D7: Always read as “0”.
ed.
Bit 6-0 = D6-D0: Prescaler Bits.
44/82
44
ST62T18C/E18C
45/82
45
ST62T18C/E18C
DRA2
AR COMPARE
REGISTER
8
PA2/
ARTIMout
CPF
COMPARE R
S
8
PWMOE
8 8
PA3/
ARTIMin
SL0-SL1
AR AR
EF
SYNCHRO RELOAD/CAPTURE LOAD
REGISTER REGISTER
8 8
DATA BUS
VR01660B
46/82
46
ST62T18C/E18C
255
COMPARE
VALUE
RELOAD
REGISTER
000
t
PWM OUTPUT
t
VR001852
47/82
47
ST62T18C/E18C
48/82
48
ST62T18C/E18C
49/82
49
ST62T18C/E18C
50/82
50
ST62T18C/E18C
51/82
51
ST62T18C/E18C
52/82
52
ST62T18C/E18C
The UART provides the basic hardware for asyn- 4.5.1 Ports Interfacing
chronous serial communication which, combined RXD reception line and TXD emission line are
with an appropriate software routine, gives a serial sharing the same external pins as two I/O lines.
interface providing communication with common Therefore, UART configuration requires to set
baud rates (up to 76,800 Baud with an 8MHz ex- these two I/O lines through the relevant ports reg-
ternal oscillator) and flexible character formats. isters. The I/O line common with RXD line must be
Operating in Half-Duplex mode only, the UART defined as input mode (with or without pull-up)
uses a 10-bit frame or a 11-bit frame according to while the I/O line common with TXD line must be
the choosen MCU option. Automatic parity bit gen- defined as output mode (Push-pull or open drain).
eration is software selectable in the 10-bit charac- In the 11-bit character format option, the transmit-
ter format allowing either 7 data bit + 1 parity bit, or ted data is inverted and can therefore use a single
8 data bit transmission. Transmitted data is sent di- transistor buffering stage. Defined as input, the
rectly, while received data is buffered allowing fur- RXD line can be read at any time as an I/O line
ther data characters to be received while the data during the UART operation. The TXD pin follows I/
is being read out of the receive buffer register. Data O port registers value when UARTOE bit is
transmit has priority over data being received. cleared, which means when no serial transmission
The UART is supplied with an MCU internal clock is in progress. As a consequence, a permanent
that isalso available in WAIT mode of the processor. high level has to be written onto the I/O port in or-
der to achieve a proper stop condition on the TXD
line when no transmission is active.
Figure 30. UART Block Diagram
START RXD1
DETECTOR
UARTOE
TXD
DIN DATA SHIFT DOUT 1
READ
TO CORE
RECEIV E BUFFER
REGISTER
D8
CONTROL REGIST ER
BAUD RATE
RX and TX
INTE RRUPTS
fOSC PROGRAMMABLE
DIVIDE R
BAUD RATE x 8
VR02009
53/82
53
ST62T18C/E18C
U. A. R. T (Cont’d)
4.5.2 Clock Generation LSB D0 at first.. The output is then set to 1 for a
The UART contains a built-in divider of the MCU period of one bit time to generate a Stop bit, and
internal clock for most common Baud Rates as then the UARTOE signal returns the TXD1 line to
shown in Table 19. Other baud rate values can be its alternate I/O function. The end of transmission
calculated from the chosen oscillator frequency di- is flagged by setting TXMT to 1 and an interrupt is
vided by the Divisor value shown. generated if enabled. The TXMT flag is reset by
writing a 0 to the bit position, it is also cleared au-
The divided clock provides a frequency that is 8 tomatically when a new character is written to the
times the desired baud rate. This allows the Data Data Register. TXMT can be set to 1 by software
reception mechanism to provide a 2 to 1 majority to generate a software interrupt so care must be
voting system to determine the logic state of the taken in manipulating the Control Register.
asynchronous incoming serial logic bit by taking 3
timed samples within the 8 time states. 4.5.3.1 Character Format
The bits not sampled provide a buffer to compen- Once the MCU option is set as 10-bit or 11-bit
sate for frequency offsets between sender and re- frame, the frame length is fixed. Within these 8 or 9
ceiver. remaining bit, any format can be used as shown in
the Table 18. Only the even parity automatic com-
4.5.3 Data Transmission putation in the 10-bit frame is available. Any other
Whatever the format selected as MCU option, 10- parity bit can however be software computed and
bit or 11-bit frame, the start and stop bit are auto- processed as a data bit
matically generated by the UART. Only the re-
maining 8 (Resp. 9) bit in the 10-bit (Resp. 11-bit) Table 18. Character Options
frame are under control of the user. 10 bit frame
Transmission is started by writing the Data Regis- Start Bit 8 Data No Parity 1 Stop
ter, after having previously set the transmission Start Bit 7 Data 1 Even Parity (Auto) 1 Stop
software options, the baudrate and the parity ena-
Start Bit 7 Data 1 Software Parity 1 Stop
ble. In case of 11-bit frame, the 9th bit must then
11 bit frame
be set before into the LSB of the UART Control
Register. Bit 9 remains in the state programmed Start Bit 8 Data 1 Software Parity 1 Stop
for consecutive transmissions until changed by the Start Bit 9 Data No Parity 1 Stop
user or until a character is received when the state Start Bit 8 Data No Parity 2 Stop
of this bit is changed to that of the incoming bit 9. Start Bit 7 Data 1 Software Parity 2 Stop
The UARTOE signal switches the output multi-
plexer to the UART output and a start bit is sent (a
0 for one bit time) followed by the data bit with the
Figure 31. 11-bit Character Format Example Figure 32. UART Data Output
UARTOE
START STOP
BIT BIT
TXD
1
D0 D1 D7 D8
MUX TXD1
BIT 2 8 9 PORT DATA
1 10 0
POSSIBLE OUTPU T
POSITION
NEXT
VR02011
CHARACTER
START OF DATA START
VR02012
54/82
54
ST62T18C/E18C
U. A. R. T (Cont’d)
4.5.4 Data Reception If a transmission is started during the course of a
The UART continuously looks for a falling edge on reception, the transmission takes priority and the
the input pin whenever a transmission is not ac- reception is stopped to free the resources for the
tive. Once an edge is detected it waits 1 bit time (8 transmission. This implies that a handshaking sys-
states) to accommodate the Start bit, and then as- tem must be implemented, as polling of the UART
sembles the following serial data stream into the to detect reception is not available.
data register. First 8 bit are stored into the UART 4.5.5 Interrupt Capabilities
Data Register, while the additionnal 9th bit is Both reception and transmission processes can in-
stored into the LSB of the UART Control Register duce interrupt to the core as defined in the inter-
in case of the 11-bit frame MCU option has been rupt section. These interrupts are enabled by set-
selected. When the 10-bit frame option is selected, ting TXIEN and RXIEN bit in the UARTCR register,
the parity of the 8 received bit is automatically writ- and TXMT and RXRDY flags are set accordingly
ten into the LSB of the UART Control Register to the interrupt source.
(PTYEN bit).
4.5.6 Registers
After all bit have been received, the Receiver waits
for the duration of one bit (for the Stop bit) and UART Data Register (UARTDR)
then transfers the received data into the buffer reg- Address: D6h, Read/Write
ister, allowing a following character to be received. 7 0
The interrupt flag RXRDY is set to 1 as the data is
transferred to the buffer register and, if enabled, D7 D6 D5 D4 D3 D2 D1 D0
will generate an interrupt.
Figure 33. Data Sampling Points Bit7-Bit0. UART data bits. A write to this register
loads the data into the transmit shift register and
triggers the start of transmission. In addition this
1 BIT resets the transmit interrupt flag TXMT. A read of
this register returns the data from the Receive
buffer. If the automatic even parity computation is
set (Bit PTYEN set), D7 must be cleared to 0 be-
fore transmission. Only the 7 LSB D0..D6 contain
the data to be sent.
Warning. No Read/Write Instructions may be
0 1 2 3 4 5 6 7 8 used with this register as both transmit and receive
SAMPLES share the same address
VR02010
55/82
55
ST62T18C/E18C
U. A. R. T (Cont’d)
UART Control Register (UARTCR) Bit 4 = TXIEN. Transmit Interrupt Enable. When
Address: D7h, Read/Write this bit is set to 1, the transmit interrupt is enabled.
Writing to TXIEN does not affect the status of the
7 0 interrupt flag TXRDY.
RXRDY TXMT RXIEN TXIE N BR2 BR1 BR0 PTYEN Bit 3-1= BR2..BR0. Baudrate select. These bits
select the operating baud rate of the UART, de-
Bit 7 = RXRDY. Receiver Ready. This flag be- pending on the frequency of fOSC. Care should be
comes active as soon as a complete byte has taken not to change these bits during communica-
been received and copied into the receive buffer. It tion as writing to these bits has an immediate ef-
may be cleared by writing a zero to it. Writing a fect.
one is possible. If the interrupt enable bit RXIEN is Bit 0 = PTYEN. Parity/Data Bit 8. The function of
set to one, a software interrupt will be generated. this bit depens on the MCU option set. In 11-bit
Bit 6 = TXMT. Transmitter Empty. This flag be- frame mode, it is the 9th bit of the trasmitted/re-
comes active as soon as a complete byte has ceived character. In 10-bit frame mode, writing a 1
been sent. It may be cleared by writing a zero to it. enables the automatic even parity computation,
It is automatically cleared by the action of writing a while a read instruction after reception gives the
data value into the UART data register. parity of the whole 8 bit word received. For the
even parity, a 0 value means no parity error.
Bit 5 = RXIEN. Receive Interrupt Enable . When
this bit is set to 1, the receive interrupt is enabled. Note: As the PTYEN bit is modified in reception, it
Writing to RXIEN does not affect the status of the must be to set to 1 before transmission if a recep-
interrupt flag RXRDY. tion occured in between.
56/82
56
ST62T18C/E18C
5 SOFTWARE
57/82
57
ST62T18C/E18C
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 20. 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
58/82
58
ST62T18C/E18C
59/82
59
ST62T18C/E18C
60/82
60
ST62T18C/E18C
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
61/82
61
ST62T18C/E18C
62/82
62
ST62T18C/E18C
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.
63/82
63
ST62T18C/E18C
Figure 34. Maximum Operating FREQUENCY (Fmax) Versus SUPPLY VOLTAGE (VDD)
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.
64/82
64
ST62T18C/E18C
Notes:
(1) Hysteresis voltage between switching levels
(2) All peripherals running
(3) All peripherals in stand-by
65/82
65
ST62T18C/E18C
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 = +10µA 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 = +10µA 0.1 V
Low Level Output Voltage VDD= 5.0V; IOL = +10mA 0.8
20 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 = -10µA 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.
66/82
66
ST62T18C/E18C
Notes:
1. Noise at VDD, VSS <10mV
2. With oscillator frequencies less than 1MHz, the A/D Converter accuracy is decreased.
67/82
ST62T18C/E18C
10
R=47K
Frequency
] R=100K
+ 1
0 R=470K
0.1
3 3.5 4 4.5 5 5.5 6
VDD (volts)
68/82
ST62T18C/E18C
Figure 37. Idd WAIT versus Vcc at 8 Mhz for OTP devices
1.2
Idd WAIT (mA)
1 T = -40°C
0.8
T = 25°C
0.6
0.4 T = 95°C
0.2 T = 125°C
0
3V 4V 5V 6V
Vdd
This curves represents typical variations and is given for guidance only
8
Idd WAIT (µA)
6 T = -40°C
4 T = 25°C
2 T = 95°C
0 T = 125°C
-2
3V 4V 5V 6V
Vdd
This curves represents typical variations and is given for guidance only
2
Idd STOP (µA)
1.5
T = -40°C
1 T = 25°C
0.5 T = 95°C
T = 125°C
0
-0.5
3V 4V 5V 6V
Vdd
This curves represents typical variations and is given for guidance only
69/82
69
ST62T18C/E18C
Figure 40. Idd WAIT versus Vcc at 8Mhz for ROM devices
0.8
Idd WAIT (mA)
0.6 T= -40°C
T= 25°C
0.4
T= 95°C
0.2
T= 125°C
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 = -40°C
T = 25°C
4
T = 95°C
T = 125°C
2
0
3V 4V 5V 6V
Vdd
This curves represents typical variations and is given for guidance only
6 T = -40°C
Vol (V)
T = 25°C
4
T = 95°C
2 T = 125°C
0
0 10 20 30 40
Iol (mA)
This curves represents typical variations and is given for guidance only
70/82
70
ST62T18C/E18C
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 44. Vol versus Iol for High sink (20mA) I/Oports at T=25°C
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)
Figure 45. Vol versus Iol for High sink (20mA) I/O ports at Vdd=5V
5
4
T= -40°C
Vol (V)
3 T= 25°C
2 T= 95°C
T= 125°C
1
0
0 10 20 30 40
Iol (mA)
This curves represents typical variations and is given for guidance only
71/82
71
ST62T18C/E18C
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)
4 T= -40°C
Voh (V)
T= 25°C
2
T= 95°C
0 T= 125°C
-2
0 10 20 30 40
Ioh (mA)
This curves represents typical variations and is given for guidance only
72/82
72
ST62T18C/E18C
7 GENERAL INFORMATION
mm inches
Dim.
Min Typ Max Min Typ Max
A 5.33 0.210
A2 2.92 3.30 4.95 0.115 0.130 0.195
b 0.36 0.46 0.56 0.014 0.018 0.022
b2 1.14 1.52 1.78 0.045 0.060 0.070
c 0.20 0.25 0.36 0.008 0.010 0.014
D 24.89 26.92 0.980 1.060
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
PDIP20
N 20
mm inches
Dim.
Min Typ Max Min Typ Max
A 3.63 0.143
A1 0.38 0.015
B 3.56 0.46 0.56 0.140 0.018 0.022
B1 1.14 12.70 1.78 0.045 0.500 0.070
C 0.20 0.25 0.36 0.008 0.010 0.014
D 24.89 25.40 25.91 0.980 1.000 1.020
D1 22.86 0.900
E1 6.99 7.49 8.00 0.275 0.295 0.315
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.14 0.045
L 2.92 3.30 3.81 0.115 0.130 0.150
S 12.70 0.500
Ø 4.22 0.166
CDIP20W Number of Pins
N 20
73/82
73
ST62T18C/E18C
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.0130 0.0200
C 0.32 0.0125
D 4.98 13.00 0.1961 0.5118
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
G 0.10 0.004
SO20 Number of Pins
N 20
THERMAL CHARACTERISTIC
Value
Symbol Parameter Test Conditions Unit
Min. Typ. Max.
PDIP20 70
RthJA Thermal Resistance °C/W
PSO20 70
74/82
74
ST62P18C
8-BIT MCUs WITH A/D CONVERTER, AUTO-RELOAD
TIMER, UART, OSG, SAFE RESET AND 20-PIN PACKAGE
Rev. 2.5
1 GENERAL DESCRIPTION
1.1 INTRODUCTION from it. This listing refers exactly to the ROM con-
tents and options which will be used to produce
The ST62P18C are the Factory Advanced Service
the specified MCU. The listing is then returned to
Technique ROM (FASTROM) versions of the customer who must thoroughly check, com-
ST62T18C OTP devices.
plete, sign and return it to STMicroelectronics. The
They offer the same functionality as OTP devices, signed listing forms a part of the contractual agree-
selecting as FASTROM options the options de- ment for the production of the specific customer
fined in the programmable option byte of the OTP MCU.
version. The STMicroelectronics Sales Organization will be
pleased to provide detailed information on con-
1.2 ORDERING INFORMATION
tractual points.
The following section deals with the procedure for
transfer of customer codes to STMicroelectronics. Table 1. ROM Memory Map for ST62P18C
1.2.1 Transfer of Customer Code ROM Page Device Address Description
Customer code is made up of the ROM contents 0000h-007Fh Reserved
and the list of the selected FASTROM options. Page 0
0080h-07FFh User ROM
The ROM contents are to be sent on diskette, or
by electronic means, with the hexadecimal file 0800h-0F9Fh User ROM
0FA0h-0FEFh Reserved
generated by the development tool. All unused
Page 1 0FF0h-0FF7h Interrupt Vectors
bytes must be set to FFh. “STATIC” 0FF8h-0FFBh Reserved
The selected options are communicated to STMi- 0FFCh-0FFDh NMI Vector
croelectronics using the correctly filled OPTION 0FFEh-0FFFh Reset Vector
LIST appended. 0000h-000Fh Reserved
Page 2
1.2.2 Listing Generation and Verification 0010h-07FFh User ROM
When STMicroelectronics receives the user’s Page 3
0000h-000Fh Reserved
ROM contents, a computer listing is generated 0010h-07FFh User ROM
76/82
76
ST62P18C
STMicroelectronics references
Device: [ ] ST62P18C
Package: [ ] Dual in Line Plastic [ ] Small Outline Plastic
[ ] Tape & Reel [ ] Stick (Default)
Temperature Range: [ ] 0°C to + 70°C [ ] - 40°C to + 85°C [ ] - 40°C to + 125°C
Special Marking: [ ] No [ ] Yes ”_ _ _ _ _ _ _ _ _ _ _ ”
Authorized characters are letters, digits, ’.’, ’-’, ’/’ and spaces only.
Maximum character count: PDIP20: 10
PSO20: 8
Oscillator Source Selection: [ ] Crystal Quartz/Ceramic resonator
[ ] RC Network
Watchdog Selection: [ ] Software Activation
[ ] Hardware Activation
Ports Pull-Up: [ ] Enabled [ ] Disabled
NMI Pull-Up: [ ] Enabled [ ] Disabled
Timer Pull-Up: [ ] Enabled [ ] Disabled
External STOP Mode Control: [ ] Enabled [ ] Disabled
OSG: [ ] Enabled [ ] Disabled
ADC SYNCHRO [ ] Enabled [ ] Disabled
UART Frame [ ] 10-bits [ ] 11-bits
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.
Comments :
Supply Operating Range in the application:
Oscillator Fequency in the application:
Notes .. .. . .... . ... .. .. ... ... . .
Signature
Date
77/82
77
ST62P18C
Notes:
78/82
78
ST6218C
8-BIT MCUs WITH A/D CONVERTER, AUTO-RELOAD
TIMER, UART, OSG, SAFE RESET AND 20-PIN PACKAGE
Rev. 2.5
1 GENERAL DESCRIPTION
0.5s min
TEST
5V 47mF
15
14V typ
10 100nF
5
VSS
VDD
TEST
150 µs typ
PROTECT
80/82
80
ST6218C
STMicroelectronics references
Device: [ ] ST6218C
Package: [ ] Dual in Line Plastic [ ] Small Outline Plastic
[ ] Tape & Reel [ ] Stick (Default)
Temperature Range: [ ] 0°C to + 70°C [ ] - 40°C to + 85°C [ ] - 40°C to + 125°C
Special Marking: [ ] No [ ] Yes ”_ _ _ _ _ _ _ _ _ _ _ ”
Authorized characters are letters, digits, ’.’, ’-’, ’/’ and spaces only.
Maximum character count: PDIP20: 10
PSO20: 8
Oscillator Source Selection: [ ] Crystal Quartz/Ceramic resonator
[ ] RC Network
Watchdog Selection: [ ] Software Activation
[ ] Hardware Activation
Ports Pull-Up: [ ] Enabled [ ] Disabled
NMI Pull-Up: [ ] Enabled [ ] Disabled
Timer Pull-Up: [ ] Enabled [ ] Disabled
External STOP Mode Control: [ ] Enabled [ ] Disabled
OSG: [ ] Enabled [ ] Disabled
ADC SYNCHRO [ ] Enabled [ ] Disabled
UART Frame [ ] 10-bits [ ] 11-bits
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.
Comments :
Supply Operating Range in the application:
Oscillator Fequency in the application:
Notes .. .. . .... . ... .. .. ... ... . .
Signature
Date
81/82
81
ST6218C
The following section deals with the procedure for part of the contractual agreement for the creation
transfer of customer codes to STMicroelectronics. of the specific customer mask.
7.4.1 Transfer of Customer Code The STMicroelectronics Sales Organization will be
Customer code is made up of the ROM contents pleased to provide detailed information on con-
and the list of the selected mask options. The tractual points.
ROM contents are to be sent on diskette, or by
electronic means, with the hexadecimal file gener-
ated by the development tool. All unused bytes Table 1. ROM Memory Map for ST6218C
must be set to FFh.
ROM Page Device Address Description
The selected mask options are communicated to
STMicroelectronics using the correctly filled OP- 0000h-007Fh Reserved
Page 0
0080h-07FFh User ROM
TION LIST appended.
7.4.2 Listing Generation and Verification 0800h-0F9Fh User ROM
0FA0h-0FEFh Reserved
When STMicroelectronics receives the user’s Page 1 0FF0h-0FF7h Interrupt Vectors
ROM contents, a computer listing is generated “STATIC” 0FF8h-0FFBh Reserved
0FFCh-0FFDh NMI Vector
from it. This listing refers exactly to the mask which
0FFEh-0FFFh Reset Vector
will be used to produce the specified MCU. The
listing is then returned to the customer who must Page 2
0000h-000Fh Reserved
thoroughly check, complete, sign and return it to 0010h-07FFh User ROM
STMicroelectronics. The signed listing forms a 0000h-000Fh Reserved
Page 3
0010h-07FFh User ROM
Table 2. ROM version Ordering Information
Sales Type ROM I/O Temperature Range Package
ST6218CB1/XXX 0 to +70°C
ST6218CB6/XXX -40 to 85°C PDIP20
ST6218CB3/XXX -40 to + 125°C
7948 12
ST6218CM1/XXX 0 to +70°C
ST6218CM6/XXX -40 to 85°C PSO20
ST6218CM3/XXX -40 to + 125°C
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
82/82
82