SGS Thomson Microelectronics ST62T46BB6, ST62E46BF1, ST6246BB6, ST6246BB1, ST6246B Datasheet

September 1998 1/72
Rev. 2.5
ST62T46B/E46B
8-BIT OTP/EPROM MCU WITH LCD DRIVER,
EEPROM AND A/D CONVERTER
3.0 to 6.0V Supply Operating Range
8 MHz Maximum Clock Frequency
-40 to +85°C Operating Temperature Range
Run, Wait and Stop Modes
5 Interrupt Vectors
Look-up Table capability in Program Memory
Data Storage in Program Memory: User selectable size
Data RAM: 128 bytes
Data EEPROM: 128 bytes
User Programmable Options
20 I/O pins, fully programmable as:
– Input with pull-up resistor – Input without pull-up resistor – Input with interrupt generation – Open-drain or push-pull output – Analog Input – LCD segments (8 combiport lines)
4 I/O lines can sink up to 20mA to drive LEDs or TRIACs directly
Two 8-bit Timer/Counter with 7-bit
programmable prescaler
Digital Watchdog
8-bit A/D Converter with 8 analog inputs
8-bit Synchronous Peripheral Interface (SPI)
LCD driver with 27 segment outputs, 4
backplane outputs and selectable multiplexing ratio.
32kHz oscillator forstand-by LCD operation
Power Supply Supervisor (PSS)
On-chip Clock oscillator can be driven byQuartz Crystal or Ceramic resonator
One external Non-Maskable Interrupt
ST6240-EMU2 Emulation and Development
System (connects to an MS-DOS PC via a parallel port).
DEVICE SUMMARY
(See end of Datasheet for Ordering Information)
PSDIP56
CSDIP56W
DEVICE
OTP
(Bytes)
EPROM
(Bytes)
I/O Pins
ST62T46B 3884 - 12 to 20 ST62E46B 3884 12 to 20
337
2/72
Table of Contents
72
Document
Page
338
ST62T46B/E46B . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1
1 GENERAL DESCRIPTION . . . . . . . ...............................................5
1.1 INTRODUCTION .........................................................5
1.2 PIN DESCRIPTIONS . . . . . . . . . . ............................................7
1.3 MEMORYMAP ..........................................................8
1.3.1 Introduction . . . . . . . . ................................................8
1.3.2 Program Space . . . . . . . . . . . . . . . . . . . . . . . . . . . ..........................9
1.3.3 Data Space . . . . . . . . ...............................................10
1.3.4 Stack Space . . . . . . . . . . . . . . . . . ......................................10
1.3.5 Data Window Register (DWR) . . . . . . . . . . . . . . . . . . . . .....................11
1.3.6 Data RAM/EEPROM Bank Register (DRBR)..............................12
1.3.7 EEPROM Description ...............................................13
1.4 PROGRAMMING MODES .................................................15
1.4.1 Option Byte . . . . . . . . ...............................................15
1.4.2 Program Memory . . . . ...............................................15
1.4.3 EEPROM Data Memory . . . . . . . . . . . . ..................................15
1.4.4 EPROMErasing....................................................15
2 CENTRAL PROCESSING UNIT .................................................16
2.1 INTRODUCTION ........................................................16
2.2 CPU REGISTERS . . . . . . . . ...............................................16
3 CLOCKS, RESET, INTERRUPTS AND POWER SAVING MODES . . . . . . . ..............18
3.1 CLOCKSYSTEM........................................................18
3.1.1 Main Oscillator . . . . . . . . . . ...........................................18
3.1.2 32 KHz STAND-BY OSCILLATOR . . . . . . . . . . ...........................19
3.2 RESETS...............................................................20
3.2.1 RESET Input ......................................................20
3.2.2 Power-on Reset . . . . . . . . . . . . . . . .....................................20
3.2.3 Watchdog Reset . . . . ...............................................21
3.2.4 Application Notes . . . . ...............................................21
3.2.5 MCU Initialization Sequence ..........................................21
3.3 DIGITAL WATCHDOG . . . . . . . . . . . . . . . .....................................23
3.3.1 Digital Watchdog Register (DWDR) . . . ..................................25
3.3.2 Application Notes . . . . ...............................................25
3.4 INTERRUPTS . . . . ......................................................27
3.4.1 Interrupt request . . . . . . . . . . . . . . . .....................................27
3.4.2 Interrupt Procedure . . . ..............................................28
3.4.3 Interrupt Option Register (IOR) . . . . ....................................29
3.4.4 Interrupt Sources . . . . ...............................................29
3.5 POWER SAVING MODES .................................................31
3.5.1 WAIT Mode . . . . . . . . ...............................................31
3.5.2 STOPMode.......................................................31
3.5.3 Exit from WAIT and STOP Modes . . . ...................................32
3/72
Table of Contents
Document
Page
339
4 ON-CHIP PERIPHERALS . . . ...................................................33
4.1 I/OPORTS.............................................................33
4.1.1 Operating Modes . . . . ...............................................34
4.1.2 Safe I/O State Switching Sequence . . . ..................................35
4.1.3 LCD alternate functions (combiports) ...................................37
4.1.4 SPI alternate functions . . . ............................................37
4.1.5 I/O Port Option Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ................38
4.1.6 I/O Port Data Direction Registers. . . ....................................38
4.1.7 I/O Port Data Registers . . . . ..........................................38
4.2 TIMER1&2............................................................39
4.2.1 TIMER 1 & 2 Operating Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . . . . . . .....41
4.2.2 Timer Interrupt . . . . . . . . . . ...........................................41
4.2.3 Application Notes . . . . ...............................................41
4.2.4 TIMER 1 Registers . .................................................42
4.2.5 TIMER 2 Registers . .................................................43
4.3 A/D CONVERTER (ADC) . . . ..............................................44
4.3.1 Application Notes . . . . ...............................................44
4.4 SERIAL PERIPHERAL INTERFACE (SPI) . . . . . . . . . . . . ........................46
4.5 LCD CONTROLLER-DRIVER . . . . ..........................................48
4.5.1 Multiplexing ratio and frame frequency setting . . . . ........................49
4.5.2 Segment and common plates driving. . ..................................49
4.5.3 LCDRAM.........................................................50
4.5.4 Stand by or STOP operation mode . . . . . . . . . . ...........................51
4.5.5 LCD Mode Control Register (LCDCR) . . . . .............................51
4.6 POWERSUPPLY SUPERVISOR DEVICE (PSS) ...............................52
4.6.1 PSS Operating Mode Description ......................................53
4.6.2 PSS Register . . . ...................................................54
5SOFTWARE ................................................................55
5.1 ST6 ARCHITECTURE . . . . . . . . . . . . . . . .....................................55
5.2 ADDRESSING MODES . . . . ...............................................55
5.3 INSTRUCTION SET . . . ...................................................56
6 ELECTRICAL CHARACTERISTICS. . . . . . . . . . . . ..................................61
6.1 ABSOLUTE MAXIMUM RATINGS. ..........................................61
6.2 RECOMMENDED OPERATING CONDITIONS. . . ..............................62
6.3 DC ELECTRICAL CHARACTERISTICS ......................................63
6.4 AC ELECTRICAL CHARACTERISTICS ......................................64
6.5 A/D CONVERTER CHARACTERISTICS. . . ...................................64
6.6 TIMER CHARACTERISTICS . . . ............................................65
6.7 SPI CHARACTERISTICS . . . ..............................................65
6.8 LCD ELECTRICAL CHARACTERISTICS . . . . . . . . . . ...........................65
6.9 PSS ELECTRICAL CHARACTERISTICS (WHEN AVAILABLE). . . . . . . . . . . . . . . .....65
7 GENERAL INFORMATION . . . . . . . . . . ...........................................66
7.1 PACKAGE MECHANICAL DATA. . . . ........................................66
7.2 PACKAGE THERMAL CHARACTERISTIC . . ..................................67
7.3 .ORDERING INFORMATION. . . ............................................67
4/72
Table of Contents
72
Document
Page
340
ST6246B . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .69
1 GENERAL DESCRIPTION. . . ...................................................70
1.1 INTRODUCTION . . . . . . . . . . ...............................................70
1.2 ROM READOUT PROTECTION . . . ..........................................70
1.3 ORDERING INFORMATION . . . . . . . . ........................................72
1.3.1 Transfer of Customer Code . ..........................................72
1.3.2 Listing Generation and Verification . . . . . . . . . . ...........................72
5/72
ST62T46B/E46B
1 GENERAL DESCRIPTION
1.1 INTRODUCTION
The ST62T46B and ST62E46B devices are low cost members of the ST62xx 8-bit HCMOS family of microcontrollers, which are targeted at low to medium complexity applications. All ST62xx de­vices are based on a building block approach: a
common core is surrounded by a number of on­chip peripherals.
The ST62E46B is the erasable EPROM version of the ST62T46B device, which may be used to em­ulate the ST62T46B device, as well as the respec­tive ST6246B ROM devices.
Figure 1. Block Diagram
TEST
NMI INTERRUPT
PROGRAM
PC
STACK LEVEL 1 STACK LEVEL 2 STACK LEVEL 3 STACK LEVEL 4 STACK LEVEL 5 STACK LEVEL 6
POWER SUPPLY
OSCILLATOR
RESET
DATA ROM
USER
SELECTABLE
DATA RAM
PORT A
PORT B
TIMER 1 DIGITAL
8 BIT CORE
TEST/V
PP
8-BIT
A/D CONVERTER
PA4..PA7/Ain
V
DDVSS
OSCin OSCout RESET
WATCHDOG
Memory
PORT C
SPI (SERIAL
PERIPHERAL
INTERFACE)
128 Bytes
3884 bytes
DATA EEPROM
128 Bytes
PB0..PB3/Ain
PC0..PC7/S33..S40
S9..S16, S25..S32, S41..S43 COM1..COM4
(V
PP
on EPROM/OTP versions only)
PB4/20mA Sink PB5/Scl/20mASink PB6/Sin/20mA Sink PB7/Sout/20mA Sink
VLCD VLCD1/3 VLCD2/3
OSC 32kHz
TIMER 2
OSC32in OSC32out
PSS
LCD DRIVER
POWER SUPPLY
SUPERVISOR
341
6/72
ST62T46B/E46B
INTRODUCTION (Cont’d)
OTP and EPROM devices are functionally identi­cal. The ROM based versions offer the same func­tionality selecting as ROM options the options de­fined in the programmable option byte of the OTP/EPROM versions.OTP devices offer all the advantages of user programmability at low cost, which make them the ideal choice in a wide range of applications where frequent code changes, mul­tiple code versions or last minute programmability are required.
These compact low-cost devices feature two Tim­ers comprising an 8-bit counter and a 7-bit pro­grammable prescaler, EEPROM data capability, a serial synchronous port interface (SPI), an 8-bit A/D Converter with 8 analog inputs, a Digital Watchdog timer, and a complete LCD controller driver, making them well suited for a wide range of automotive, appliance and industrial applications.
Figure 2. 56 Pin SDIP Package
15 16 17 18 19 20 21 22 23 24 25 26 27
28
29
30
31
32
33
34
VLCD Ain/PA7 Ain/PA6
Ain/PA5 Ain/PA4
OSCout
OSCin
TEST/V
PP
(1)
V
DD
V
SS
S13 S12
S11 S10 S9
PB1/Ain PB2/Ain PB3/Ain PB4*
PB5/Scl*
42 41 40 39 38 37 36 35
RESET
NMI
PB7/Sout*
PB6/Sin*
PSS OSC32in OSC32out PB0/Ain
(1) VPPon EPROM/OTP only
1 2 3 4 5 6 7 8 9 10 11 12 13
14
43
44
45
46
47
48
PC3/S36 PC4/S37
PC5/S38 PC6/S39 PC7/S40
COM3 COM2
S41 S42 S43
PC2/S35 PC1/S34
PC0/S33 S32 S31
S26 S25 S16 S15
S14
56 55 54 53 52 51 50 49
COM4
COM1
VLCD1/3
VLCD2/3
S30 S29 S28 S27
*20mA sink
342
7/72
ST62T46B/E46B
1.2 PIN DESCRIPTIONS VDDand V
SS
. Power is supplied to the MCU via these two pins. VDDis the power connection and VSSis the ground connection.
OSCin and OSCout. These pins are internally connected to the on-chip oscillator circuit. A quartz crystal, a ceramic resonator or an external clock signal can be connected between these two pins. The OSCin pin is the input pin, the OSCout pin is the output pin.
RESET
. The active-low RESET pin is used to re-
start the microcontroller. TEST/VPP. The TEST must be held at VSSfor nor-
mal operation (an internal pull-down resistor se­lects normal operating mode if TEST pin is not connected). If TEST pin is connected to a +12.5V level during the reset phase, the EPROM/OTP programming Mode is entered.
NMI. The NMI pin provides the capability for asyn­chronous interruption, by applying an external non maskable interrupt to the MCU.The NMI input is falling edge sensitive withSchmitt trigger charac­teristics. The user can select as option the availa­bility of an on-chip pull-up at this pin.
PA4-PA7. These 4 lines are organised as one I/O port (A). Each line may be configured under soft­ware control as inputs with or without internal pull­up resistors, input with interrupt generation and pull-up resistor, open-drain or push-pull outputs, or as analog inputs for the A/D converter.
PB0...PB7.
These 8 lines are organised as one I/O port (B). Each line may be configured under soft­ware control as inputs with or without internal pull­up resistors, input with interrupt generation and pull-up resistor, open-drain or push-pull outputs, analog inputs for the A/D converter. PB0..PB3 can be used as analog inputs for the A/D converter , while PB7/Sout, PB6/Sin and PB5/Scl can be used respectively as data out, data in and Clock pins for
the on-chip SPI. In addition, PB4..PB7 can sink 20mA for direct LED or TRIAC drive.
PC0-PC7. These 8 lines are organised as one I/O port (C). Each line may be configured under soft­ware control as input with or without internal pull­up resistor, input with interrupt generation and pull-up resistor, open-drain or push-pull output, or as LCD segment output S33..S40.
COM1-COM4
. These four pins are the LCD pe­ripheral common outputs. They are the outputs of the on-chip backplane voltage generator which is used for multiplexing the 45 LCD lines allowing up to 180 segments to be driven.
S9..S16, S25..S43. These pins are the 27 LCD pe­ripheral segment outputs. S33..S40 are alternate functions of the Port C I/O pins. (Combiports fea­ture)
VLCD. Display voltage supply. It determines the high voltage level on COM1-COM4 and S4-S48 pins.
VLCD1/3, VLCD2/3
. Display supply voltage inputs for determining the display voltage levels on COM1-COM4 and S4-S48 pins during multiplex operation.
PSS
. This is the Power Supply Supervisor sensing pin. When the voltage applied to this pin is falling below a software programmed value the highest priority (NMI) interrupt can be generated. This pin has to be connected to the voltage to be super­vised.
OSC32in and OSC32out. These pins are inter­nally connected with the on-chip 32kHz oscillator circuit. A 32.768kHz quartz crystal can be con­nected between these two pins if it is necessary to provide theLCD stand-by clock and real time inter­rupt. OSC32in is the input pin, OSC32out is the output pin.
343
8/72
ST62T46B/E46B
1.3 MEMORY MAP
1.3.1 Introduction
The MCU operates in three separate memory spaces: Program space, Data space, and Stack space. Operation in these three memory spaces is described in the following paragraphs.
Briefly, Program space contains user program code in Program memory and user vectors; Data space contains user data in RAM and in Program memory, and Stack space accommodates six lev­els of stack for subroutine and interrupt service routine nesting.
Figure 3. Memory Addressing Diagram
PROGRAM SPACE
PROGRAM
INTERRUPT &
RESET VECTORS
ACCUMULATOR
DATA RAM
BANK SELECT
WINDOW SELECT
RAM
X REGISTER Y REGISTER V REGISTER
W REGISTER
DATA READ-ONLY
WINDOW
RAM / EEPROM BANKING AREA
000h
03Fh 040h
07Fh 080h 081h 082h 083h 084h
0C0h
0FFh
0-63
DATA SPACE
0000h
0FF0h
0FFFh
MEMORY
MEMORY
DATA READ-ONLY
MEMORY
VR01568
344
9/72
ST62T46B/E46B
MEMORY MAP (Cont’d)
1.3.2 Program Space
Program Space comprises the instructions to be executed, the data required for immediate ad­dressing mode instructions, the reserved factory test area and the user vectors. Program Space is addressed via the 12-bit Program Counter register (PC register).
1.3.2.1 Program Memory Protection
The Program Memory in OTP or EPROM devices can be protected against external readout of mem­ory by selecting the READOUT PROTECTION op­tion in the option byte.
In the EPROM parts, READOUT PROTECTION option can be disactivated only by U.V. erasure that also results into the whole EPROM context erasure.
Note:
Once the Readout Protection is activated, it is no longer possible, even for STMicroelectronics, to gain access to the Program memory contents. Returned parts with a protection set can therefore not be accepted.
Figure 4. ST62E46B/T46B Program
Memory Map
0000h
RESERVED
*
USER
PROGRAM MEMORY
(OTP/EPROM)
3872 BYTES
0F9Fh 0FA0h 0FEFh 0FF0h 0FF7h 0FF8h 0FFBh 0FFCh 0FFDh 0FFEh 0FFFh
RESERVED
*
RESERVED
INTERRUPT VECTORS
NMI VECTOR
USER RESET VECTOR
0080h
(*) Reserved areas should be filled with 0FFh
007Fh
345
10/72
ST62T46B/E46B
MEMORY MAP (Cont’d)
1.3.3 Data Space
Data Space accommodates all the data necessary for processing the user program. This space com­prises the RAM resource, the processor core and peripheral registers, as well as read-only data such as constants and look-up tables in Program memory.
1.3.3.1 Data ROM
All read-only data is physically stored in program memory, which also accommodates the Program Space. The program memory consequently con­tains the program code to be executed, as well as the constants and look-up tables required by the application.
The Data Space locations in which the different constants and look-up tables are addressed by the processor core may be thought of as a 64-byte window through which it is possible to access the read-only data stored in Program memory.
1.3.3.2 Data RAM/EEPROM
In ST62T46B and ST62E46B devices, the data space includes 60 bytes of RAM, the accumulator (A), the indirect registers (X), (Y), the short direct registers (V), (W), the I/O port registers, the pe­ripheral data and control registers, the interrupt option register and the DataROM Window register (DRW register).
Additional RAM and EEPROM pages can also be addressed using banks of 64 bytes located be­tween addresses 00h and 3Fh.
1.3.4 Stack Space
Stack space consists of six 12-bit registers which are used to stack subroutine and interrupt return addresses, as well as the current program counter contents.
Table 1. Additional RAM/EEPROM Banks.
Table 2. ST62T46B/E46B Data Memory Space
Device RAM EEPROM
ST62T46B/E46B 1 x 64 bytes 2 x 64 bytes
DATAand EEPROM
000h 03Fh
DATAROM WINDOW AREA
040h
07Fh X REGISTER 080h Y REGISTER 081h V REGISTER 082h
W REGISTER 083h
DATARAM
084h
0BFh PORT A DATAREGISTER 0C0h PORT B DATAREGISTER 0C1h
SPI INTERRUPT DISABLE REGISTER 0C2h
PORT C DATAREGISTER 0C3h
PORT A DIRECTION REGISTER 0C4h PORT B DIRECTION REGISTER 0C5h PORT C DIRECTION REGISTER 0C6h
RESERVED 0C7h INTERRUPT OPTION REGISTER 0C8h* DATAROM WINDOWREGISTER 0C9h*
RESERVED 0CAh*
RAM/EEPROMBANK SELECT REGISTER 0CBh*
PORT A OPTION REGISTER 0CCh
RESERVED 0CDh
PORT B OPTION REGISTER 0CEh PORT C OPTION REGISTER 0CFh
A/D DATAREGISTER 0D0h
A/D CONTROL REGISTER 0D1h
TIMER 1 PRESCALER REGISTER 0D2h
TIMER 1 COUNTER REGISTER 0D3h
TIMER 1 STATUS/CONTROLREGISTER 0D4h
TIMER 2 PRESCALER REGISTER 0D5h
TIMER 2 COUNTER REGISTER 0D6h
TIMER 2 STATUS/CONTROLREGISTER 0D7h
WATCHDOG REGISTER 0D8h
RESERVED 0D9h
PSS STATUS/CONTROLREGISTER 0DAh
32kHz OSCILLATORCONTROL REGISTER 0DBh
LCD MODE CONTROL REGISTER 0DCh
SPI DATAREGISTER 0DDh
RESERVED 0DEh
EEPROM CONTROL REGISTER 0DFh
LCD RAM
0E0h
0F7h
DATA RAM
0F8h
0FEh
ACCUMULATOR OFFh
* WRITEONLY REGISTER
346
11/72
ST62T46B/E46B
MEMORY MAP (Cont’d)
1.3.5 Data Window Register (DWR)
The Dataread-only memory window is located from address 0040h to address 007Fh in Data space. It allows direct reading of64 consecutive bytes locat­ed anywhere in program memory, between ad­dress 0000h and 1FFFh (top memory address de­pends on the specific device). All the program memory can therefore be used to store either in­structions or read-only data. Indeed, the window can be moved in steps of 64 bytes along the pro­grammemory by writing theappropriate code inthe Data Window Register (DWR).
The DWR can beaddressed like any RAM location in the Data Space, it is however a write-only regis­ter and therefore cannot be accessed using single­bit operations. This register is used to position the 64-byte read-only data window (from address 40h to address 7Fh of the Data space) in program memory in 64-byte steps. The effective address of the byte to be read as data in program memory is obtained by concatenating the 6 least significant bits of the register address given in the instruction (as least significant bits) and the content of the DWR register (as most significant bits), as illustrat­ed inFigure 5 below. For instance, when address­ing location 0040h of the Data Space, with 0 load­ed in the DWR register, the physical location ad­dressed in program memory is 00h. The DWR reg­ister is not cleared on reset, therefore it must be written to prior to the first access to the Data read­only memory window area.
Data Window Register (DWR)
Address: 0C9h — Write Only
Bits 6, 7 = Not used. Bit 5-0 =
DWR5-DWR0:
Data read-only memory
Window Register Bits.
These are the Data read­only memory Window bits that correspond to the upper bits of the data read-only memory space.
Caution:
This register is undefined on reset. Nei­ther read nor single bit instructions may be used to address this register.
Note:
Care is required when handling the DWR register as it is write only. For this reason, the DWR contents should not be changed while exe­cuting an interrupt service routine, as the service routine cannot save and then restore the register’s previous contents. If it is impossible to avoid writ­ing to the DWR during the interrupt serviceroutine, an image of the register must be saved in a RAM location, and each time the program writes to the DWR, it must also write to the image register. The image register must be written first so that, if an in­terrupt occurs between the two instructions, the DWR is not affected.
Figure 5. Data read-only memory Window Memory Addressing
70
- - DWR5 DWR4 DWR3 DWR2 DWR1 DWR0
DATA ROM
WINDOW REGISTER
CONTENTS
DATA SPACE ADDRESS
40h-7Fh
IN INSTRUCTION
PROGRAM SPACE ADDRESS
765432 0
543210
543210
READ
1
67891011
01
VR01573C
12
1
0
DATA SPACE ADDRESS
:
:
59h
000
0
1
00
1
11
Example:
(DWR)
DWR=28h
1100000001
ROM
ADDRESS:A19h
11
13
01
347
12/72
ST62T46B/E46B
MEMORY MAP (Cont’d)
1.3.6 Data RAM/EEPROM Bank Register (DRBR)
Address: CBh — Write only
Bit 7-5 = These bits are not used Bit 4 - DRBR4. This bit, when set, selects RAM
Page 2. Bit 3 - DRBR3. This bit, when set, selects RAM
Page 1. Bit2. These bits are not used. Bit 1 - DRBR1. This bit, when set, selects
EEPROM Page 1. Bit 0 - DRBR0. This bit, when set, selects
EEPROM Page 0. The selection of the bank is made by programming
the Data RAM Bank Switch register (DRBR regis­ter) located at address CBh of the Data Space ac­cording to Table 1. No more than one bank should be set at a time.
The DRBR register can be addressed like a RAM Data Space at the address CBh; nevertheless it is a write only register that cannot be accessed with single-bit operations. This register is used to select the desired 64-byte RAM/EEPROM bank of the Data Space. The number of banks has to be load­ed in the DRBR register and the instruction has to point to the selected location as if it was in bank 0 (from 00h address to 3Fh address).
This register is not cleared during the MCU initiali­zation, therefore it must be written before the first access to the Data Space bank region. Refer to the Data Space description for additional informa­tion. The DRBR register is not modified when an interrupt or a subroutine occurs.
Notes : Care is required when handling theDRBR register
as it is write only. For this reason, it is not allowed to change the DRBR contents while executing in­terrupt service routine, as the service routine can­not save and then restore its previous content. If it is impossible to avoid the writing of this register in interrupt service routine, an image of this register must be saved in a RAM location, and each time the program writes to DRBR it must write also to the image register. The image register must be written first, so if an interrupt occurs between the two instructions the DRBR is not affected.
In DRBR Register, only 1 bit must be set. Other­wise two or more pages are enabled in parallel, producing errors.
Table 3. Data RAM Bank Register Set-up
70
- - - DRBR4 DRBR3 - DRBR1 DRBR0
DRBR ST62T46B/E46B
00h None 01h EEPROM Page 0 02h EEPROM Page 1 08h Not available 10h RAM Page 2
other Reserved
348
13/72
ST62T46B/E46B
MEMORY MAP (Cont’d)
1.3.7 EEPROM Description
EEPROM memory is located in 64-byte pages in data space. This memory may be used by the user program for non-volatile data storage.
Data space from 00h to3Fh is paged as described in Table 4. EEPROM locations are accessed di­rectly by addressing these paged sections of data space.
The EEPROM does not require dedicated instruc­tions forread orwrite access.Onceselected via the Data RAM Bank Register, the active EEPROM page is controlled by the EEPROM Control Regis­ter (EECTL), which is described below.
BitE20FF ofthe EECTL register mustbe resetprior to any write or read access to the EEPROM. If no bank has been selected, orif E2OFF is set, any ac­cess is meaningless.
Programming must be enabled by setting the E2ENA bit of the EECTL register.
The E2BUSY bit of the EECTL register is set when the EEPROM is performing a programming cycle. Any access to the EEPROM when E2BUSY is set is meaningless.
Provided E2OFF and E2BUSY are reset, an EEP­ROM location is read just like any other data loca­tion, also in terms of access time.
Writing to the EEPROM may be carried out in two modes: Byte Mode (BMODE) and Parallel Mode
(PMODE). In BMODE, one byte is accessed at a time, while in PMODE up to 8 bytes in the same row are programmed simultaneously (with conse­quent speed and power consumption advantages, the latter being particularly important in battery powered circuits).
General Notes: Data should be written directly to the intended ad-
dress in EEPROM space. There is no buffer mem­ory between data RAM and the EEPROM space.
When the EEPROM is busy (E2BUSY = “1”) EECTL cannot be accessed in write mode, it is only possible to read the status of E2BUSY. This implies that as long as the EEPROM is busy, it is not possible to change the status of the EEPROM Control Register. EECTL bits 4 and 5 are reserved and must never be set.
Care is required when dealing with the EECTL reg­ister, as some bits are write only. For this reason, the EECTL contents must not be altered while ex­ecuting an interrupt service routine.
If it is impossible to avoid writing to this register within an interrupt service routine, an image of the register must be saved in a RAM location, and each time the program writes to EECTL it must also write to the imageregister. The image register must be written to first so that, if an interrupt oc­curs between the two instructions, the EECTL will not be affected.
Table 4. Row Arrangement for Parallel Writing of EEPROM Locations
Dataspace addresses. Banks 0 and 1.
Byte 01234567 ROW7 38h-3Fh ROW6 30h-37h ROW5 28h-2Fh ROW4 20h-27h ROW3 18h-1Fh ROW2 10h-17h ROW1 08h-0Fh ROW0 00h-07h
Up to 8 bytes in each row may be programmed simultaneously in Parallel Write mode.
The number of available 64-byte banks (1 or 2) is device dependent.
349
14/72
ST62T46B/E46B
MEMORY MAP (Cont’d) Additional Notes on Parallel Mode:
If the user wishes to perform parallel program­ming, the first step should be to set the E2PAR2 bit. From this time on, the EEPROM will be ad­dressed in write mode, the ROW address will be latched and it will be possible to change it only at the end of the programming cycle, or by resetting E2PAR2 without programming the EEPROM. Af­ter the ROW address is latched, the MCU can only “see” the selected EEPROM row and any attempt to write or read other rows will produce errors.
The EEPROM should not be read while E2PAR2 is set.
As soon as the E2PAR2 bit is set, the 8 volatile ROW latches are cleared. From this moment on, the user can load data in all or in part ofthe ROW. Setting E2PAR1 will modify the EEPROM regis­ters corresponding to the ROW latches accessed after E2PAR2. For example, if the software sets E2PAR2 and accesses the EEPROM by writing to addresses 18h, 1Ah and 1Bh, and then sets E2PAR1, these three registers will be modified si­multaneously; the remaining bytes in the row will be unaffected.
Note that E2PAR2 is internally reset at the end of the programming cycle. This implies that the user must set the E2PAR2 bit between two parallel pro­gramming cycles. Note that if the user tries to set E2PAR1 while E2PAR2 is not set, there will be no programming cycle and the E2PAR1 bit will be un­affected. Consequently, the E2PAR1 bit cannot be set if E2ENA is low. The E2PAR1 bit can be set by the user, only if the E2ENA and E2PAR2 bits are also set.
EEPROM Control Register (EECTL)
Address: DFh — Read/Write Reset status: 00h
Bit 7 = D7:
Unused.
Bit6 =E2OFF:
Stand-by Enable Bit.
WRITE ONLY. Ifthisbitis settheEEPROMis disabled(anyaccess willbe meaningless) andthepowerconsumption of the EEPROM is reduced to its lowest value.
Bit 5-4 =
D5-D4
:
Reserved.
MUST be kept reset.
Bit 3 =
E2PAR1
:
Parallel Start Bit.
WRITE ONLY. OnceinParallel Mode,assoonasthe usersoftware sets the E2PAR1 bit, parallel writing of the 8 adja­cent registers will start. This bit is internally reset at the end of the programming procedure. Note that less than 8 bytes can be written if required, the un­defined bytes being unaffected by the parallel pro­gramming cycle;thisis explained in greater detail in the Additional Notes on Parallel Mode overleaf.
Bit 2 = E2PAR2:
Parallel Mode En. Bit.
WRITE ONLY. This bit must be set by the user program in order to perform parallel programming. If E2PAR2 is set and the parallel start bit (E2PAR1) is reset, up to 8 adjacent bytes can be written simultane­ously. These 8 adjacent bytes are considered as a row, whose address lines A7, A6, A5, A4, A3 are fixed while A2, A1and A0 are the changing bits, as illustrated in Table 4. E2PAR2 is automatically re­set at the end of any parallel programming proce­dure. It can be reset by the user software before starting the programming procedure, thus leaving the EEPROM registers unchanged.
Bit 1 =
E2BUSY
:
EEPROM Busy Bit.
READ ON­LY. This bit is automatically set by the EEPROM control logic when the EEPROM is in program­ming mode. The user program should test itbefore any EEPROM read or write operation; any attempt to access the EEPROM while the busy bit is set will be aborted and the writing procedure in progress will be completed.
Bit 0 = E2ENA:
EEPROM Enable Bit.
WRITE ON­LY. This bit enables programming of the EEPROM cells. It must be set before any write to the EEP­ROM register. Any attempt to write to the EEP­ROM when E2ENA is low is meaningless and will not trigger a write cycle.
Caution:
This register is undefined on reset. Nei­ther read nor single bit instructions may be used to address this register.
70
D7 E2OFF D5 D4 E2PAR1 E2PAR2 E2BUSY E2ENA
350
15/72
ST62T46B/E46B
1.4 PROGRAMMING MODES
1.4.1 Option Byte
The Option Byte allows configuration capability to the MCUs. Option byte’s content is automatically read, and the selected options enabled, when the chip reset is activated.
It can only be accessed during the programming mode. This access is made either automatically (copy from a master device) or by selecting the OPTION BYTE PROGRAMMING mode of the pro­grammer.
The option byte is located in a non-user map. No address has to be specified.
EPROM Code Option Byte
Bit 7. Reserved. Bit 6 =
NMI PULL..
This bit must be set high to re­move the NMI pin pull up resistor when it is low, a pull up is provided.
Bit 5 =
PROTECT
. This bit allows the protection of the software contents against piracy. When the bit PROTECT is set high, readout of the OTP con­tents is prevented by hardware. No programming equipment is able to gain access to the user pro­gram. When this bit is low, the user program can be read.
Bit 4. Reserved. Bit 3 =
WDACT
. This bit controls the watchdog ac­tivation. When it is high, hardware activation is se­lected. The software activation is selected when WDACT is low.
Bit 2 = Reserved.Must be set to 1. Bit 1-0 = Reserved. The Option byte is written during programming ei-
ther by using the PC menu (PC driven Mode) or automatically (stand-alone mode)
1.4.2 Program Memory
EPROM/OTP programming mode is set by a +12.5V voltage applied to the TEST/VPPpin. The programming flow of the ST62T46B/E46B is de­scribed in the User Manual of the EPROM Pro­gramming Board.
The MCUs can be programmed with the ST62E4xB EPROM programming tools available from STMicroelectronics.
1.4.3 EEPROM Data Memory
EEPROM data pages are supplied in the virgin state FFh. Partial or total programming of EEP­ROM data memory can be performed either through the application software, or through an ex­ternal programmer. Any STMicroelectronics tool used for the program memory (OTP/EPROM) can also be used to program the EEPROM data mem­ory.
1.4.4 EPROM Erasing
The EPROM of the windowed package of the MCUs may be erased by exposure to Ultra Violet light. The erasure characteristic of the MCUs is such that erasure begins when the memory is ex­posed to light with a wave lengths shorter than ap­proximately 4000Å. It should be noted that sun­lights and some types of fluorescent lamps have wavelengths in the range 3000-4000Å.
It is thus recommended that the window of the MCUs packages be covered by an opaque label to prevent unintentional erasure problems when test­ing the application in such an environment.
The recommended erasure procedure of the MCUs EPROM is the exposure to short wave ul­traviolet light which have a wave-length 2537A. The integrated dose (i.e. U.V. intensity x exposure time) for erasure should be a minimum of 15W­sec/cm2. The erasure time with this dosage is ap­proximately 15 to 20 minutes using an ultraviolet lamp with 12000µW/cm2power rating. The ST62E46B should be placed within 2.5cm (1Inch) of the lamp tubes during erasure.
70
-
NMI
PULL
PRO­TECT
- WDACT - - -
351
16/72
ST62T46B/E46B
2 CENTRAL PROCESSING UNIT
2.1 INTRODUCTION
The CPUCore of ST6devices is independent ofthe I/O or Memory configuration. As such, it may be thought of as an independent central processor communicating with on-chip I/O, Memory and Pe­ripherals via internal address, data, and control buses. In-core communication is arranged as shown in Figure 6; the controller being externally linked to both the Reset and Oscillator circuits, while the core islinked to the dedicated on-chip pe­ripherals via the serial data bus and indirectly, for interrupt purposes, through the control registers.
2.2 CPU REGISTERS
TheST6Family CPUcorefeaturessixregisters and three pairs of flags available to the programmer. These are described in the following paragraphs.
Accumulator (A). The accumulator is an 8-bit general purpose register used in all arithmetic cal­culations, logical operations, and data manipula­tions. The accumulator can be addressed in Data space as a RAM location at address FFh. Thus the ST6 can manipulate the accumulator just like any other register in Data space.
Indirect Registers (X, Y).These two indirect reg­isters are used as pointers to memory locations in Data space. They are used in the register-indirect addressing mode. These registers can be ad­dressed in the data space as RAM locations at ad­dresses 80h (X) and 81h (Y). They can also be ac­cessed with the direct, short direct, or bit direct ad­dressing modes. Accordingly, the ST6 instruction set can use the indirect registers as any other reg­ister of the data space.
Short Direct Registers (V, W). These two regis­ters are used to save a byte in short direct ad­dressing mode. They can be addressed in Data space as RAM locations at addresses 82h (V) and 83h (W). They can also be accessed using the di­rect and bit direct addressing modes. Thus, the ST6 instruction set can use the short direct regis­ters as any other register of the data space.
Program Counter (PC). The program counter is a 12-bit register which contains the address of the next ROM location to be processed by the core. This ROM location may be an opcode, an oper­and, or the address of an operand. The 12-bit length allows the direct addressing of 4096 bytes in Program space.
Figure 6. ST6 Core Block Diagram
PROGRAM
RESET
OPCODE
FLAG
VALUES
2
CONTROLLER
FLAGS
ALU
A-DATA
B-DATA
ADDRESS/READ LINE
DATA SPACE
INTERRUPTS
DATA
RAM/EEPROM
DATA
ROM/EPROM
RESULTS TO DATA SPACE (WRITE LINE)
ROM/EPROM
DEDICATIONS
ACCUMULATOR
CONTROL
SIGNALS
OSCin
OSCout
ADDRESS
DECODER
256
12
Program Counter
and
6 LAYER STACK
0,01 TO 8MHz
VR01811
352
17/72
ST62T46B/E46B
CPU REGISTERS (Cont’d)
However, if the program space contains more than 4096 bytes, the additional memory in program space can be addressed by using the Program Bank Switch register.
The PC value is incremented after reading the ad­dress of the current instruction. To execute relative jumps, the PC and the offset are shifted through the ALU, where they are added; the result is then shifted back into the PC. The program counter can be changed in the following ways:
- JP (Jump) instructionPC=Jump address
- CALL instructionPC= Call address
- Relative Branch Instruction.PC= PC +/- offset
- Interrupt PC=Interrupt vector
- Reset PC= Reset vector
- RET & RETI instructionsPC= Pop (stack)
- Normal instructionPC= PC + 1
Flags (C, Z). The ST6 CPU includes three pairs of flags (Carry and Zero), each pair being associated with one of the three normal modes of operation: Normal mode, Interrupt mode and Non Maskable Interrupt mode. Each pair consists of a CARRY flag and a ZERO flag. One pair (CN, ZN) is used during Normal operation, another pair is used dur­ing Interrupt mode (CI, ZI), and a third pair is used in the Non Maskable Interrupt mode (CNMI, ZN­MI).
The ST6 CPU uses the pair of flags associated with the current mode: as soon as an interrupt (or a Non Maskable Interrupt) is generated, the ST6 CPU uses the Interrupt flags (resp. the NMI flags) instead of the Normal flags. When the RETI in­struction is executed, the previously used set of flags is restored. It should be noted that each flag set can only be addressed in its own context (Non Maskable Interrupt, Normal Interrupt or Main rou­tine). The flags are not cleared during context switching and thus retain their status.
The Carry flag is set when a carry or a borrow oc­curs during arithmetic operations; otherwise it is cleared. The Carry flag is also set to the value of the bit tested in a bit test instruction; it also partici­pates in the rotate left instruction.
The Zero flag is set if the result of the last arithme­tic or logical operation was equal to zero; other­wise it is cleared.
Switching between the three sets of flags is per­formed automatically when an NMI, an interrupt or a RETI instructions occurs. As the NMI mode is
automatically selected after the reset of the MCU, the ST6 core uses at first the NMI flags.
Stack. The ST6 CPU includes a true LIFO hard­ware stack which eliminates the need for a stack pointer. The stack consists of six separate 12-bit RAM locations that do not belong to the data space RAM area. When a subroutine call (or inter­rupt request) occurs, the contents of each level are shifted into the next higher level, while the content of the PC is shifted into the first level (the original contents of the sixth stack level are lost). When a subroutine or interrupt return occurs (RET or RETI instructions), the first level register is shifted back into the PC and the value of each level is popped back into the previous level. Since the accumula­tor, in common with all other data space registers, is not stored in this stack, management of these registers should be performed within the subrou­tine. The stack will remain in its “deepest” position if more than 6 nested calls or interrupts are execut­ed, and consequently the last return address will be lost. It will also remain in its highest position if the stack is empty and a RET or RETI is executed. In this case the next instruction will be executed.
Figure 7. ST6 CPU Programming Mode
l
SHORT
DIRECT
ADDRESSING
MODE
V REGISTER
WREGISTER
PROGRAM COUNTER
SIX LEVELS
STACK REGISTER
CZNORMAL FLAGS
INTERRUPTFLAGS
NMI FLAGS
INDEX
REGISTER
VA000423
b7
b7
b7
b7
b7
b0
b0
b0
b0
b0
b0b11
ACCUMULATOR
YREG.POINTER
XREG.POINTER
CZ
CZ
353
18/72
ST62T46B/E46B
3 CLOCKS, RESET, INTERRUPTS AND POWER SAVING MODES
3.1 CLOCK SYSTEM
3.1.1 Main Oscillator
The MCU features a Main Oscillator which can be driven by an external clock, or used in conjunction with an AT-cut parallel resonant crystal or a suita­ble ceramic resonator.
Figure 8 illustrates various possible oscillator con­figurations using anexternal crystalorceramic res­onator, an external clock input. CL1an CL2should have a capacitance in the range 12 to 22 pF for an oscillator frequency in the 4-8 MHz range.
The internal MCU clock Frequency (F
INT
) is divid­ed by 13 to drive the CPU core and by 12 to drive the A/D converter and the watchdog timer, while clock used to drive on-chip peripherals depends on the peripheral as shown in the clock circuit block diagram.
With an 8MHz oscillator frequency, the fastest ma­chine cycle is therefore 1.625µs.
A machine cycleis the smallest unit oftime needed toexecute any operation (forinstance, toincrement the Program Counter). An instruction may require two, four, or five machine cycles for execution.
Figure 8. Oscillator Configurations
Figure 9. Clock Circuit Block Diagram
OSC
in
OSC
out
C
L1n
C
L2
ST6xxx
CRYSTAL/RESONATOR CLOCK
OSC
in
OSC
out
ST6xxx
EXTERNAL CLOCK
NC
VA0016
VA0015A
MAIN
OSCILLATOR
Core
:13
:12
Timer 1 & 2
Watchdog
POR
f
INT
ADC
OSCin
OSCout
f
OSC
f
INT
OSC32in
OSC32out
32kHz
OSCILLATOR
MUX
LCD CONTROLLER DRIVER
EOCR bit 5
(START/STOP)
354
19/72
ST62T46B/E46B
CLOCK SYSTEM (Cont’d)
3.1.2 32 KHz STAND-BY OSCILLATOR
An additional 32KHz stand-by on chip oscillator al­lows to generate real time interrupts and to supply the clock to the LCD driver with the main oscillator stopped. This enables the MCU to perform real time functions with the LCD display running while keeping advantages of low power consumption. Figure 10 shows the 32KHz oscillator block dia­gram.
A 32.768KHz quartz crystal must be connected to the OSC32in and OSC32out pins to perform the real time clock operation. Two external capacitors of 15-22pF each must be connected between the oscillator pins and ground. The 32KHz oscillator is managed by the dedicated status/control register 32OCR.
As long as the 32KHz stand-by oscillator is ena­bled, 32KHz internal clock is available to drive LCD controller driver. This clock is divide by 214to generate interrupt request every 500ms . The peri­odic interrupt request serves as reference time­base for real time functions.
Note
: When the 32KHz stand-by oscillator is stopped (bit 5 of the Status/Control register cleared) the divider chain is supplied with a clock signal synchronous with machine cycle (f
INT
/13),
this produces an interrupt request every 13x2
14
clock cycle (i.e. 26.624ms) with an 8MHz quartz crystal.
32KHz Oscillator Register (32OCR)
Address: DBh - Read/Write
Bit 7 =EOSCI.
Enable Oscillator Interrupt
. This bit, when set, enables the 32KHz oscillator interrupt request.
Bit 6 = OSCEOC.
Oscillator Interrupt Flag
. This bit indicates when the 32KHz oscillator has measured a 500ms elapsed time (providing a
32.768KHzquartz crystal is connected to the 32KHz oscillator dedicated pins). An interrupt re­quest can be generated in relation to the state of EOSCI bit. This bit must be cleared by the user program before leaving the interrupt service rou­tine.
Bit 5 =
START/STOP
.O
scillator Start/Stop bit
. This bit, when set, enables the 32KHz stand-by oscillator and the free running divider chain is sup­plied by the 32KHz oscillator signal. When this bit is cleared to zero the divider chain is supplied with f
INT
/13.
This register is cleared during reset.
Note
:
To achieve minimum power consumption in STOP mode (no system clock), the stand-by oscillator must be switched off (real time function not availa­ble) by clearing the Start/Stop bit in the oscillator status/control register.
Figure 10. 32KHz Oscillator Block Diagram
70
EOSCI OSCEOC S/S D4 D3 D2 D1 D0
OSC32KHz
EOSCI OSCEOC
START
STOP
XX XXX
INT
OSC32IN
OSC32OUT
2x15...22pF
32.768KHz Crystal
f
INT
/13
OSC32KHz MUX
1 0
DIV 2
14
355
20/72
ST62T46B/E46B
3.2 RESETS
The MCU can be reset in three ways: – by the external Reset input being pulled low; – by Power-on Reset; – by the digital Watchdog peripheral timing out.
3.2.1 RESET Input
The RESET pin may be connected to a device of the application board in order to reset the MCU if required. The RESET pin may be pulled low in RUN, WAIT or STOP mode. This input can be used to reset the MCU internal state and ensure a correct start-up procedure. The pin is active low and features a Schmitt trigger input. The internal Reset signal is generated by adding a delay to the external signal. Therefore even short pulses on the RESET pin are acceptable, provided VDDhas completed its rising phase and that the oscillator is running correctly (normal RUN or WAIT modes). The MCU is kept in the Reset state as long as the RESET pin is held low.
If RESET activation occurs in the RUN or WAIT 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 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, the oscillator starts up and all Inputs and Outputs are configured as inputs with pull-up resistors. When the level of theRESET pin then goes high, the initialization sequence is executed following expiry of the internal delay period.
3.2.2 Power-on Reset
The function of the POR circuit consists in waking up the MCU at an appropriate stage during the power-on sequence. At the beginning of this se­quence, the MCU is configured in the Reset state: all I/O ports are configured as inputs with pull-up resistors and no instruction is executed. When the power supply voltage rises to a sufficient level, the oscillator starts to operate, whereupon an internal delay is initiated, in order to allow the oscillator to fully stabilize before executing the first instruction. The initialization sequence is executed immediate­ly following the internal delay.
The internal delay is generated by an on-chip coun­ter.The internal reset line is released 2048internal clock cycles after release of the external reset.
Notes:
To ensure correct start-up, the user should take care that the reset signal is not released before the VDDlevel is sufficient to allow MCU operation at the chosen frequency (see Recommended Oper­ating Conditions).
A proper reset signal for a slow rising VDDsupply can generally be provided by an external RC net­work connected to theRESET pin.
Figure 11.Reset and Interrupt Processing
INT LATCH CLEARED
NMI MASK SET
RESET
( IF PRESENT )
SELECT
NMI MODE FLAGS
IS RESET STILL
PRESENT?
YES
PUT FFEH
ON ADDRESS BUS
FROM RESET LOCATIONS
FFE/FFF
NO
FETCH INSTRUCTION
LOAD PC
VA000427
356
21/72
ST62T46B/E46B
RESETS (Cont’d)
3.2.3 Watchdog Reset
The MCU provides a Watchdog timer function in order to ensure graceful recovery from software upsets. If the Watchdog register is not refreshed before an end-of-count condition is reached, the internal reset will be activated. This, amongst oth­er things, resets the watchdog counter.
The MCU restarts just as though the Reset had been generated by the RESET pin, including the built-in stabilisation delay period.
3.2.4 Application Notes
No external resistor is required between VDDand the Reset pin, thanks to the built-in pull-up device.
The POR circuit operates dynamically, in that it triggers MCU initialization on detecting the rising edge of VDD. The typical threshold is in the region of 2 volts, but the actual value of the detected threshold depends on the way in which VDDrises.
The POR circuit is
NOT
designed to supervise
static, or slowly rising or falling VDD.
3.2.5 MCU Initialization Sequence
When a reset occurs the stack is reset, the PC is 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­terrupt flag is automatically set, so that the CPU is in Non Maskable Interrupt mode; this prevents the
initialisation routine from being interrupted. The in­itialisation routine should therefore be terminated by a RETI instruction, in order to revert to normal mode and enable interrupts. If no pending interrupt is present at the end of the initialisation routine, the MCU will continue by processing the instruction immediately following the RETI instruction. If, how­ever, a pending interrupt is present, it will be serv­iced.
Figure 12.Reset and Interrupt Processing
Figure 13. Reset Block Diagram
RESET
RESET
VECTOR
JP
JP:2 BYTES/4 CYCLES
RETI
RETI: 1 BYTE/2 CYCLES
INITIALIZATION
ROUTINE
VA00181
V
DD
RESET
300k
2.8k
POWER
WATCHDOG RESET
CK
COUNTER
RESET
ST6 INTERNAL RESET
f
OSC
RESET
ON RESET
VA0200B
357
22/72
ST62T46B/E46B
RESETS (Cont’d) Table 5. Register Reset Status
Register Address(es) Status Comment
EEPROM Control Register Port Data Registers Port A,B Direction Register Port A,B Option Register Interrupt Option Register
SPI Registers LCD Mode Control Register 32kHz Oscillator Register
0DFh 0C0h, 0C2h, 0C3h 0C4h to0C5h 0CCh, 0CEh 0C8h
0C2h to0DDh 0DCh 0DBh
00h
EEPROM enabled
I/O are Input with pull-up
Interrupt disabled
SPI disabled LCD display off Interrupt disabled
Port C Direction Register Port C Option Register
0C6h 0CFh
FFh LCD Output
X, Y,V, W, Register Accumulator Data RAM Data RAM Page REgister Data ROM Window Register EEPROM A/D Result Register
080H TO083H 0FFh 084h to0BFh 0CBh 0C9h 00h to 03Fh 0D0h
Undefined As written if programmed
TIMER 1 Status/Control TIMER 1 Counter Register TIMER 1 Prescaler Register
TIMER 2 Status/Control TIMER 2 Counter Register TIMER 2 Prescaler Register
Watchdog Counter Register A/D Control Register
0D4h 0D3h 0D2h
0D7h 0D5h 0D6h
0D8h 0D1h
00h FFh 7Fh
00h FFh 7Fh
FEh
40h
TIMER 1 disabled/Max count loaded
TIMER 2 disabled/Max count loaded
A/D in Standby
358
Loading...
+ 50 hidden pages