ST6246 STMICROELECTRONICS [STMicroelectronics], ST6246 Datasheet

no-image

ST6246

Manufacturer Part Number
ST6246
Description
8-BIT OTP/EPROM MCU WITH LCD DRIVER, EEPROM AND A/D CONVERTER
Manufacturer
STMICROELECTRONICS [STMicroelectronics]
Datasheet
DEVICE SUMMARY
September 1998
– 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)
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:
4 I/O lines can sink up to 20mA to drive LEDs or
TRIACs directly
Two
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 for stand-by LCD operation
Power Supply Supervisor (PSS)
On-chip Clock oscillator can be driven by Quartz
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).
ST62T46B
ST62E46B
DEVICE
8-bit
(Bytes)
3884
OTP
Timer/Counter
EPROM
(Bytes)
8-BIT OTP/EPROM MCU WITH LCD DRIVER,
3884
-
with
I/O Pins
12 to 20
12 to 20
7-bit
EEPROM AND A/D CONVERTER
(See end of Datasheet for Ordering Information)
ST62T46B/E46B
CSDIP56W
PSDIP56
Rev. 2.5
1/72
337

Related parts for ST6246

ST6246 Summary of contents

Page 1

OTP/EPROM MCU WITH LCD DRIVER, 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 ...

Page 2

ST62T46B/E46B . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1 1 GENERAL ...

Page 3

ON-CHIP PERIPHERALS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ...

Page 4

... 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 4/72 340 Table of Contents Document Page 72 ...

Page 5

... EPROM/OTP versions only) PP 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. PORT A 8-BIT PORT B PORT C LCD DRIVER OSC 32kHz ...

Page 6

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 ...

Page 7

PIN DESCRIPTIONS V and V . Power is supplied to the MCU via DD SS these two pins the power connection and the ground connection. SS OSCin and OSCout. These pins are internally connected ...

Page 8

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. Figure 3. Memory Addressing Diagram PROGRAM SPACE ...

Page 9

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 ...

Page 10

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 ...

Page 11

MEMORY MAP (Cont’d) 1.3.5 Data Window Register (DWR) The Data read-only memory window is located from address 0040h to address 007Fh in Data space. It allows direct reading of 64 consecutive bytes locat- ed anywhere in program memory, between ad- ...

Page 12

ST62T46B/E46B MEMORY MAP (Cont’d) 1.3.6 Data RAM/EEPROM Bank (DRBR) Address: CBh — Write only DRBR4 DRBR3 - Bit 7-5 = These bits are not used Bit 4 - DRBR4. This bit, when set, selects RAM Page ...

Page 13

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 to 3Fh is paged as described in ...

Page 14

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 ...

Page 15

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 ...

Page 16

ST62T46B/E46B 2 CENTRAL PROCESSING UNIT 2.1 INTRODUCTION The CPU Core of ST6 devices is independent of the I/O or Memory configuration. As such, it may be thought independent central processor communicating with on-chip I/O, Memory and Pe- ...

Page 17

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 ...

Page 18

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 ...

Page 19

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 ...

Page 20

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 ...

Page 21

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. ...

Page 22

ST62T46B/E46B RESETS (Cont’d) Table 5. Register Reset Status Register EEPROM Control Register 0DFh Port Data Registers 0C0h, 0C2h, 0C3h Port A,B Direction Register 0C4h to 0C5h Port A,B Option Register 0CCh, 0CEh Interrupt Option Register 0C8h SPI Registers 0C2h to ...

Page 23

DIGITAL WATCHDOG The digital Watchdog consists of a reloadable downcounter timer which can be used to provide controlled recovery from software upsets. The Watchdog circuit generates a Reset when the downcounter reaches zero. User software can prevent this reset ...

Page 24

ST62T46B/E46B DIGITAL WATCHDOG (Cont’d) The Watchdog is associated with a Data space register (Digital WatchDog Register, DWDR, loca- tion 0D8h) which is described in greater detail in Section 3.3.1 Digital Watchdog Register (DWDR) . This register is set to 0FEh ...

Page 25

DIGITAL WATCHDOG (Cont’d) 3.3.1 Digital Watchdog Register (DWDR) Address: 0D8h — Read/Write Reset status: 1111 1110b Bit Watchdog Control bit If the hardware option is selected, this bit is forced ...

Page 26

ST62T46B/E46B DIGITAL WATCHDOG (Cont’d) These instructions test the C bit and Reset the MCU (i.e. disable the Watchdog) if the bit is set (i.e. if the Watchdog is active), thus disabling the Watchdog. In all modes, a minimum of 28 ...

Page 27

INTERRUPTS The CPU can manage four Maskable Interrupt sources, in addition to a Non Maskable Interrupt source (top priority interrupt). Each source is asso- ciated with a specific Interrupt Vector which con- tains a Jump instruction to the associated ...

Page 28

ST62T46B/E46B INTERRUPTS (Cont’d) 3.4.2 Interrupt Procedure The interrupt procedure is very similar to a call pro- cedure, indeed the user can consider the interrupt as an asynchronous call procedure. As this is an asynchronous event, the user cannot know the ...

Page 29

INTERRUPTS (Cont’d) 3.4.3 Interrupt Option Register (IOR) The Interrupt Option Register (IOR) is used to en- able/disable the individual interrupt sources and to select the operating mode of the external interrupt inputs. This register is write-only and cannot be accessed ...

Page 30

ST62T46B/E46B INTERRUPTS (Cont’d) Figure 17. Interrupt Block Diagram PIF PSS PEI NMI SPI FROM REGISTER PORT A,B,C SINGLE BIT ENABLE PBE V DD PORT A PBE PORT B PORT C PBE Bits TIMER1 TIMER2 OSCEOC OSC32kHz EOSCI A/D CONVERTER 30/72 ...

Page 31

POWER SAVING MODES The WAIT and STOP modes have been imple- mented in the ST62xx family of MCUs in order to reduce the product’s electrical consumption during idle periods. These two power saving modes are described in the following ...

Page 32

ST62T46B/E46B POWER SAVING MODE (Cont’d) 3.5.3 Exit from WAIT and STOP Modes The following paragraphs describe how the MCU exits from WAIT and STOP modes, when an inter- rupt occurs (not a Reset). It should be noted that the restart ...

Page 33

ON-CHIP PERIPHERALS 4.1 I/O PORTS The MCU features Input/Output lines which may be individually programmed as any of the following input or output configurations: – Input without pull-up or interrupt – Input with pull-up and interrupt – Input with ...

Page 34

ST62T46B/E46B I/O PORTS (Cont’d) 4.1.1 Operating Modes Each pin may be individually programmed as input or output with various configurations. This is achieved by writing the relevant bit in the Data (DR), Data Direction (DDR) and Option reg- isters (OR). ...

Page 35

I/O PORTS (Cont’d) 4.1.2 Safe I/O State Switching Sequence Switching the I/O ports from one state to another should be done in a sequence which ensures that no unwanted side effects can occur. The recom- mended safe transitions are illustrated ...

Page 36

ST62T46B/E46B I/O PORTS (Cont’d) Table 11. I/O Port configuration for the ST62T46B/E46B MODE AVAILABLE ON PA4-PA7 Input PB0-PB7 PC0-PC7 Input PA4-PA7 with pull up PB0-PB7 (Reset state except for PC0-PC7 PC0-PC7) Input PA4-PA7 with pull up PB0-PB7 with interrupt PC0-PC7 ...

Page 37

I/O PORTS (Cont’d) 4.1.3 LCD alternate functions (combiports) PC0 to PC7 can also be individually defined as 8 LCD segment output by setting DDRC, ORC and DRC registers as shown inTable 12. On the contrary with other I/O lines, the ...

Page 38

ST62T46B/E46B I/O PORTS (Cont’d) 4.1.5 I/O Port Option Registers ORA/B/C (CCh PA, CDh PB, CFh PC) Read/Write 7 Px7 Px6 Px5 Px4 Px3 Px2 Bit 7-0 = Px7 - Px0 : Port Option Register bits. 4.1.6 I/O ...

Page 39

TIMER 1 & 2 The MCU features two on-chip Timer peripheral named TIMER 1 & TIMER 2. Each of these timers consist of an 8-bit counter with a 7-bit programma- ble prescaler, giving a maximum count of 2 The ...

Page 40

ST62T46B/E46B Figure 22. TIMER 1 & 2 Block Diagram PSC INT 40/72 376 DATA BUS 8 8-BIT COUNTER STATUS/CONTROL SELECT REGISTER TMZ ETI D5 ...

Page 41

TIMER 1& 2 (Cont’d) 4.2.1 TIMER 1 & 2 Operating Mode The Timer prescaler is clocked by the prescaler clock input (f 12). INT The user can select for each TIMER the desired prescaler division ratio through the PS2, PS1, ...

Page 42

ST62T46B/E46B TIMER 1& 2 (Cont’d) 4.2.4 TIMER 1 Registers Timer Status Control Register (TSCR) Address: 0D4h — Read/Write 7 TMZ ETI - - PSI PS2 Bit 7 = TMZ: Timer Zero bit A low-to-high transition indicates that the timer count ...

Page 43

TIMER 1& 2 (Cont’d) 4.2.5 TIMER 2 Registers Timer Status Control Register (TSCR) Address: 0D7h — Read/Write 7 TMZ ETI D5 D4 PSI PS2 Bit 7 = TMZ: Timer Zero bit A low-to-high transition indicates that the timer count register ...

Page 44

ST62T46B/E46B 4.3 A/D CONVERTER (ADC) The A/D converter peripheral is an 8-bit analog to digital converter with analog inputs as alternate I/O functions (the number of which is device depend- ent), offering 8-bit resolution with a typical conver- sion time ...

Page 45

A/D CONVERTER (Cont’d) Since the ADC is on the same chip as the micro- processor, the user should not switch heavily load- ed output signals during conversion, if high preci- sion is required. Such switching will affect the sup- ply ...

Page 46

ST62T46B/E46B 4.4 SERIAL PERIPHERAL INTERFACE (SPI) The on-chip SPI is an optimized serial synchro- nous interface that supports a wide range of indus- try standard SPI specifications. The on-chip SPI is controlled by small and simple user software to perform ...

Page 47

SERIAL PERIPHERAL INTERFACE(Cont’d) After 8 clock pulses (D7..D0) the output Q4 of the 4-bit binary counter becomes low, disabling the clock from the counter and the data/shift register. Q4 enables the clock to generate an interrupt on the 8th clock ...

Page 48

ST62T46B/E46B 4.5 LCD CONTROLLER-DRIVER On-chip LCD driver includes all features required for LCD driving, including multiplexing of the com- mon plates. Multiplexing allows to increase display capability without increasing the number of seg- ment outputs. In that case, the display ...

Page 49

LCD CONTROLLER-DRIVER (Continued) 4.5.1 Multiplexing ratio and frame frequency setting common plates COM1..COM4 can be used for multiplexing ratio ranging from 1/1 to 1/4. The selection is made by the bits DS0 and DS1 of the LCDCR ...

Page 50

ST62T46B/E46B LCD CONTROLLER-DRIVER (Continued) Figure 28. Typical Network to connect to V pins if V 4.5V LCD V LCD R V LCD2 LCD1 100k C: 47nF Figure 29. Addressing Map of the LCD RAM ...

Page 51

LCD CONTROLLER-DRIVER (Continued) 4.5.4 Stand by or STOP operation mode No clock from the main oscillator is available in STOP mode for the LCD controller, and the con- troller is switched off when the STOP instruction is executed. All segment ...

Page 52

ST62T46B/E46B 4.6 POWERSUPPLY SUPERVISOR DEVICE (PSS) The Power Supply Supervisor device, described in the Figure 31, permits supervising the crossing of the PSS pin voltage (VPSS) through a program- mable voltage (mxV /n), where n and m can be DD ...

Page 53

POWER SUPPLY SUPERVISOR (Continued) 4.6.1 PSS Operating Mode Description The resistive voltage divider connected to the PSS pin provides the internal comparator with the nxV /13 voltage. The resistive voltage divider PSS connected to the V pin provides the internal ...

Page 54

ST62T46B/E46B POWER SUPPLY SUPERVISOR (Continued) 4.6.2 PSS Register The PSS register permits control over the PSS de- vice. The register can be addressed in the data space as a RAM location at DAh. This register is cleared after Reset. PSS ...

Page 55

SOFTWARE 5.1 ST6 ARCHITECTURE The ST6 software has been designed to fully use the hardware in the most efficient way possible while keeping byte usage to a minimum; in short, to provide byte efficient programming capability. The ST6 core ...

Page 56

ST62T46B/E46B 5.3 INSTRUCTION SET The ST6 core offers a set of 40 basic instructions which, when combined with nine addressing modes, yield 244 usable opcodes. They can be di- vided into six different types: load/store, arithme- tic/logic, conditional branch, control ...

Page 57

INSTRUCTION SET (Cont’d) Arithmetic and Logic. These instructions are used to perform the arithmetic calculations and logic operations. In AND, ADD, CP, SUB instruc- tions one operand is always the accumulator while the other can be either a data space ...

Page 58

ST62T46B/E46B INSTRUCTION SET (Cont’d) Conditional Branch. The branch instructions achieve a branch in the program when the select- ed condition is met. Bit Manipulation Instructions. These instruc- tions can handle any bit in data space memory. One group either sets ...

Page 59

Opcode Map Summary.The following table contains an opcode map for the instructions used by the ST6 LOW 0 1 0000 0001 0010 HI 2 JRNZ 4 CALL abc 0000 1 pcr 2 ext 1 2 JRNZ 4 ...

Page 60

ST62T46B/E46B Opcode Map Summary(Continued) LOW 8 9 1000 1001 1010 HI 2 JRNZ abc 0000 1 pcr 2 ext 1 2 JRNZ abc 0001 1 pcr 2 ext 1 2 ...

Page 61

ELECTRICAL CHARACTERISTICS 6.1 ABSOLUTE MAXIMUM RATINGS This product contains devices to protect the inputs against damage due to high static voltages, how- ever it is advisable to take normal precaution to avoid application of any voltage higher than the ...

Page 62

ST62T46B/E46B 6.2 RECOMMENDED OPERATING CONDITIONS Symbol Parameter T Operating Temperature A V Operating Supply Voltage Oscillator Frequency OSC I Pin Injection Current (positive) INJ+ I Pin Injection Current (negative) V INJ- Notes: 1. Care must be taken ...

Page 63

DC ELECTRICAL CHARACTERISTICS (T = -40 to +85 C unless otherwise specified) A Symbol Parameter V Input Low Level Voltage IL All Input pins V Input High Level Voltage IH All Input pins (1) Hysteresis Voltage V Hys All ...

Page 64

ST62T46B/E46B 6.4 AC ELECTRICAL CHARACTERISTICS (T = -40 to +85 C unless otherwise specified) A Symbol Parameter (1) t Supply Recovery Time REC Minimum Pulse Width ( RESET pin WR NMI pin T EEPROM Write Time WEE Endurance ...

Page 65

TIMER CHARACTERISTICS (T = -40 to +85 C unless otherwise specified) A Symbol Parameter f Input Frequency on TIMER Pin Pulse Width at TIMER Pin* W Note*: When available. 6.7 SPI CHARACTERISTICS (T = -40 to +85 ...

Page 66

ST62T46B/E46B 7 GENERAL INFORMATION 7.1 PACKAGE MECHANICAL DATA Figure 34. 56 Shrink Plastic Dual In Line Package, 600-mil Width Figure 35. 56-Pin Ceramic Shrink Dual In Line Package, 600-mil Width with Window 66/72 402 mm Dim. Min Typ Max A ...

Page 67

GENERAL INFORMATION (Continued) 7.2 PACKAGE THERMAL CHARACTERISTIC Symbol Parameter RthJA Thermal Resistance 7.3 .ORDERING INFORMATION Table 28. OTP/EPROM VERSION ORDERING INFORMATION Program Sales Type Memory (Bytes) ST62E46BF1 3884 (EPROM) ST62T46BB6 3884 (OTP) Value Test Conditions Min. Typ. PSDIP56W CSDIP56W I/O ...

Page 68

ST62T46B/E46B Notes: 68/72 404 ...

Page 69

... ST6240-EMU2 Emulation and Development System (connects to an MS-DOS PC via a parallel port). DEVICE SUMMARY DEVICE ROM ST6246B 3884 September 1998 8-BIT ROM MCU WITH LCD DRIVER, EEPROM AND A/D CONVERTER (See end of Datasheet for Ordering Information) with 7-bit I/O Pins ST6246B PSDIP56 Rev. 2.5 69/72 405 ...

Page 70

... ST6246B 1 GENERAL DESCRIPTION 1.1 INTRODUCTION The ST6246B is mask programmed ROM version of ST62T46B OTP devices. It offers the same functionality as OTP devices, selecting as ROM options the options defined in the programmable option byte of the OTP version. Figure 1. Programming wave form 0.5s min TEST 15 14V typ 10 5 TEST ...

Page 71

... ST6246B MICROCONTROLLER OPTION LIST Customer . . . . . . . . . . . . . . . . . . . . . . . . . Address . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Contact . . . . . . . . . . . . . . . . . . . . . . . . . Phone Reference . . . . . . . . . . . . . . . . . . . . . . . . . STMicroelectronics references Device: Package: Temperature Range: Special Marking: Authorized characters are letters, digits, ’.’, ’-’, ’/’ and spaces only. Maximum character count: Watchdog Selection: NMI Pull-Up Selection: ROM Readout Protection: ...

Page 72

... STMicroelectronics. The signed listing forms a part of the contractual agreement for the creation of the specific customer mask. The STMicroelectronics Sales Organization will be pleased to provide detailed information on con- tractual points. Table 1. ROM Memory Map for ST6246B Device Address 0000h-007Fh 0080h-0F9h 0FA0h-0FEFh 0FF0h-0FF7h 0FF8h-0FFBh ...

Related keywords