ST SGS-Thomson ST624x-KIT Series Manual

February 1998 1/49
R
ST624x-KIT
STARTER KIT FOR ST624x MCU FAMILY
HARDWARE FEATURES
Immediate evaluation of ST6240 with demonstration examples
Program debugging within the user’s real application environment
On board programming of ST62E46 and ST62T46
In-circuit programming of ST62E4x and ST62T4x devices on the user’s application board
SOFTWARE FEATURES
Software simulator including LCD display and I/O read/write
Assembler, linker, debugger
EPROM/OTP programming utilities
Application examples
5
查询ST624x-KIT供应商 捷多邦,专业PCB打样工厂,24小时加急出货
2/49
Table of Contents
6
ST624x -KIT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1 INTRODUCTION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.1 Where to go from here... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
2 THE STARTER KIT HARDWARE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
2.1 The ST6 Microcontroller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
2.2 The Starter Kit Board . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
2.3 8 MHz and 32 KHz Oscillators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
2.4 8-alphanumeric Digit LCD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
2.5 Reset Button . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
2.6 LED Indicator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
2.7 Hexadecimal Keyboard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
2.8 Resistance trimmer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
2.9 Combi-ports PC0-7 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
3 INSTALLING THE STARTER KIT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
3.1 Hardware and Software Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
3.2 I ns ta llin g the Softwar e . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
3.3 Connecting the Power Supply . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
4 RUNNING THE DEMOS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
4.1 What the Demos Do . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
4.1.1 Demo 1 - Key Display . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
4.1.2 Demo 2 - Voltmeter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
4.2 Running the Demonstration Programs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
5 CONNECTING EXTERNAL RESOURCES TO THE STARTER KIT BOARD . . . . . . . . . . . . . . 19
6 USING THE STARTER KIT BOARD AS A HARDWARE SIMULATOR . . . . . . . . . . . . . . . . . . 22
6.1 The Data Transmission Driver . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
6.2 Technical Limitations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
6.3 Error Messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
6.4 Troublesho oting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
7 EXERCISES . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
7.1 Exercise 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
7.2 Exercise 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
8 PROGRAMMING ST6 MICROCONTROLLERS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
8.1 Setting Up the Starter Kit Board . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
8.2 In-Circuit Programming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
8.2.1 Application B oard Connect ions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
8.3 Setting Up the Starter Kit Board for In-Circuit Programming . . . . . . . . . . . . . . . . . . . . . . . 35
3/49
Table of Contents
9 LCD INTERFACE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
9.1 ST6240 LCD DRIVER OVERVIE W . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
9.2 STARTER KIT LCD PANEL INTERFACE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
9.3 Interfacing The LCD Panel with the ST6240 LCD Driver . . . . . . . . . . . . . . . . . . . . . . . . . . 40
9.4 Character Definition Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
9.4.1 Character A Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
9.4.2 Character 3 Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
9.5 Starter Kit LCD Panel Character Set Software Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
9.5.1 Direct Code LCD RAM Patching . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
9.5.2 Indexed Data ROM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
9.5.3 Complete Message Displa y . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
10 HARDWARE INFORMATION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
10.1Part List . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
10.2Starter Kit Board Schematic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
7
4/49
Introduction
1 INTRODUCTION
The ST624x Starter Kit provides you with all you need to start designing, developing and eval­uating programs for ST624x microcontrollers immediately.
The ST624x Starter Kit includes:
The ST6 assembler and linker, AST6 and LST6.
The ST6 Windows debugger, WGDB6.
The Windows ST6 microcontroller programmer, Epromer.
The ST6 Starter Kit board, w hich serves as a demonstration board and low-cost debug­ging tool.
Some demonstration programs that show how ST6 microcontrollers use the Starter Kit board resources.
Some example programs.
Two ST62E46BF1 microcontro llers.
A complete set of paper documentation and online help.
The demonstration programs, that come pre-loaded on the ST62T40B microcontroller, show how the powerful features of ST6 microcontrollers operate in a real environment. The demon­stration programs use the hardware resources provided on the Starter Kit board, which in­clude an LCD, hexadecimal keyboard, a resistance trimmer and an 8 MHz and a 32 KHz os­cillator.
Using the ST6 assembler and linker, AST6 and LST6, you can assemble and link ST6 pro­grams. The "ST6 Family Software development tools AST6, LST6, WGDB6" User Manual will guide you through the steps of developing, assembling and linking programs for the ST6. The Starter Kit software includes a set of example programs of typical ST6 applications. These are installed in the directory C:\st6tools\sk624Xi1\examples.
For a fast-track solution for developing bug-free programs for the ST6, without the hassle of writing assembler code, try out the ST6-Realizer program.
Once you have developed your ST6 program, you can use the Windows-based ST6 program debugger, WGDB6/SIMULATOR, together with the Starter Kit board, as a low-cost but pow­erful debugging tool. WGDB6 includes an ST6 simulator, that simulates the execution of your program, and uses the ST6 that is plugged into the Starter Kit board to emulate all transac­tions that are performed with the data space. Thus, using the Starter Kit board with WGDB6, you can view how the microcontroller peripherals behave when your program is executed. WGDB6 includes powerful debugging features, such as source-level debugging, instruction and conditional memory access breakpoints and selective trace recording. The "ST 6 Family
8
5/49
Introduction
Software development tools AST6, LST6, WGDB6" User Manual and online help will lead you through the debugging process using WGDB6.
When your program is ready, Epromer provides you with an easy-to-use Windows interface, which lets you prepare executable code, then write it to the ST62E46B microcontroller that can be plugged into the SDIP56 ZIF socket on the Starter Kit board, or your own in-circuit ap­plication board that is connected to the Starter Kit board.
The ST62T40B can’t be erased or programmed, it is already programmed and contains the demonstrations program.
To observe and evaluate the consequences of your program on the resources it controls, you can run it on the ST62T40B microcontroller that is s oldered on the Starter K it board in Hard­ware Simulation mode. If it controls a resource that is not included on the Starter Kit board, you can connect your own resource to the board.
Instructions for use - Warning
This product conforms with the 89/336/EEC directive; it also complies with the EN55022 emis­sions standard for ITE, as well as with generic 50082-1 immunity standards.
The product is a
Class A apparatus
. In a residential environment this device may cause ra-
dioelectrical disturbances which may require that the user adopt appropriate precautions. The product is not contained in an outer c asing, and cannot therefore be immune against elec-
trostatic discharge (ESD):
it should therefore only be handled at static safe work stations.
9
6/49
Introduction
The following diagram summarises the possible uses of the Starter Kit board and the hard­ware setup required for each one.
To program ST6s on your own in-circuit programming board:
To run the demonstrations:
To use the Starter Kit board as a hardware simulator:
To program ST6s using the Starter Kit board:
PC running Epromer
Starter Kit board
In-circuit programming board
Parallel port connected to P2
Parallel port connected to P2
P1 connector
ST6 to be programmed
PC running Epromer
ST62T40B Programmed with DEMOKIT2.HEX
Starter Kit board
Starter Kit board
PC running WGDB6 Simulator
ST62T40B Programmed with DEMOKIT2.HEX
Parallel port connected to P2
10
7/49
Introduction
1.1 Where to go from here...
The following table directs you to where you should look for further information about using the ST6 Starter Kit
To: Refer to:
Find out about the Starter Kit board and ST6 microcontrollers provided with the kit.
“The Starter Kit Hardware” on page 8 of this book.
Install the Starter Kit software, and connect the power supply to th e board.
“Installing the Starter Kit” on page 15 of this book.
Find out what the demonstration applications do, and run them.
“Running the Demos” on page 17 of this book.
Learn how to develop source code for AST6 and LST6.
"ST6 Family Software development tools AST 6, LST6, WGDB6" User Manual.
Prepare the Starter Kit board for use as an ST6 hardware simulator with WGDB6.
“Using The Starter Kit Board as a Hardware Simulator” on page 22 of this book.
Learn how to use WGDB6 for debugging your programs.
"ST6 Family Software development tools AST 6, LST6, WGDB6" User Manual.
Prepare the Starter Kit board for programming ST6 microcontrollers using Epromer.
“Programming ST6 Microcontrollers” on page 32 of this book.
Prepare the Starter Kit board for connecting your own in-circuit programming board.
“In-Circuit Programming” on page 33 of this book.
Learn how to use Eprommer for programming ST6 microcontrollers.
The Epromer online help.
Connect your own hardware resource or LCD to the Starter Kit board.
“Connecting External Resources to the Starter Kit Board” on page 19 of this book.
Perform some introductory excercises using WGDB6.
“Exercises” on page 26.
Learn how the LCD interface works. “LCD Interface” on page 36.
11
8/49
The Starter Kit Hardware
2 THE STARTER KIT HARDWARE
This section describes the ST6 microcontrollers and the Starte r Kit board that come w ith the ST6 Starter Kit. A full schematic of the Starter Kit board is provided in “Hardware Information” on page 47.
2.1 The ST6 Microcontroller
The Starter Kit includes two ST62E46BF1 microcontrollers. The ST62T40B microcontroller is pre-loaded with the c ode
DEMOKIT2.HEX
, which includes the demonstration programs (see “Running the Demos” on page 17), as well as the commu­nications protocol program, that enables you to use the Starter Kit board as a sim ulator (see “Using The Starter Kit Board as a Hardware Simulator” on page 22).
2.2 The Starter Kit Board
The Starter Kit board includes the following resources:
A Reset button.
An 8-alphanumeric digit LCD.
A hexadecimal keyboard.
A LED indicator.
A resistance trimmer.
One 8 MHz and one 32 KHz oscillator.
A SDIP56 ZIF socket to program the ST62E46B or ST62T46B. It comes with its own power supply unit that can be plugged i nto an AC mains source, or a DC
source with the following characteristics:
Voltage: 16V min./20V max.
Current: 100 mA min.
12
9/49
The Starter Kit Hardware
It includes the following connectors:
A parallel port connector (P2) for connection to the host PC when it is used as a hardware
simulator or for programming.
A remote resource I/O interface (J1).
An in-circuit ST6 programming board connector (P1).
A remote LCD connector (J2) to which you can connect your own LCD.
Below is a block diagram of the Starter Kit board:
13
10/49
The Starter Kit Hardware
ST624x Starter Kit Board
14
11/49
The Starter Kit Hardware
The following diagram shows the layout of the Starter Kit board.
1 In-circuit programming connector P1. 17 Remote resource I/O interface J1. 2 “Programming” or “User” operating mode
selection jumper JP1.
16 Remote LCD interface connector J2.
3 8 Mhz oscillator. 15 ST62T40B MCU 4 PC connector P2. 14 LCD protection with jumper JP2 if the combi-
port PC0-7 is used. 5 32.768 KHz oscillator. 13 SDIP56 ZIF MCU socket. 6 LED indicator LD1. 12 Keyboard 7 LCD display. 11 Voltage trimmer 8 Power supply JACK connector J3. 10 RESET button. 9 Power supply LED indicator LD2.
1
2
3
4
5
6
7
8
9
11
12
13
14
15
16
JP1
17
ST6246B
ST62T40B
SOCKET
DISPLAY
10
F E654
789D
CB0A
321
15
12/49
The Starter Kit Hardware
2.3 8 MHz and 32 KHz Oscillators
An oscillator feeds the ST62T40B OSCIN input with an 8 MHz clock signal. A 32 KHz oscillator is delivered with the boar d. The required components: crystal XT1 and ca-
pacitors C5, C6 are connected to the ST62T40B as described in the ST6240 Data Book.
2.4 8-alphanumeric Digit LCD
An 8-alphanumeric digit LCD is connected to the ST62T40B LCD driver outputs. It has 32 seg­ments that are driven by 4 COM outputs. You can disconnect a part of the LCD by removing jumper JP2 if you want to use the combi-port PC0-7 on the connector interface J2. For full de­tails about the LCD see “LCD Interface” on page 36.
2.5 Reset Button
This activates the ST62T40B RESET input when pressed. A power-on reset circuit is also pro­vided.
2.6 LED Indicator
A LED is connected to the ST62T40B PB4 I/O pin (which is defined as output) to demonstrate the ST6 LED-driving capacity. It can be disconnected from PB4 by removing the jumper JP3.
2.7 Hexadecimal Keyboard
A hexadecimal keyboard is connected to the ST62T40B PB0 I/O pin (defined as A/D Convert­er input), via an analog interface resistor array.
The voltage value on the A/D converter input is equal to 5V/16 x the key number, thus giving an image of the pressed key.
16
13/49
The Starter Kit Hardware
The following table lists the Resistor array values and their corresponding voltage/key values:
Jumper JP5 sets the keyboard operation mode: polling or IRQ, according to the following dia­gram.
Jumper JP4 disconnects the keyboard output from PB0 when it is removed, enabling you to connect your own external source to PB0 via the J1 connector.
For an example of the analog keyboard application, refer to the SGS-Thomson application note AN431: Using ST6 Analog Inputs for Multiple Key decoding.
Resistor Array Values Theoretical Voltage Values
RT: 1K
NO KEY: 5V
R0: 68
K0: 0V
R1: 75
K1: 0.312V
R2: 82
K2: 0.625V
R3: 100
K3: 0.937V
R4: 120
K4: 1.250V
R5: 150
K5: 1.562V
R6: 180
K6: 1.875V
R7: 220
K7: 2.187V
R8: 270
K8: 2.500V
R9: 390
K9: 2.812V
R10: 560
KA: 3.125V
R11: 820
KB: 3.437V
R12: 1.2K
KC: 3.750V
R13: 2.7K
KD: 4.062V
R14: 7.5K
KE: 4.375V KF: 4.687V
JP5
This pos it io n selects polling.
This position selects IRQ.
JP5
17
14/49
The Starter Kit Hardware
Analog Keyboard diagram:
2.8 Resistance trimmer
A 10 KΩ resistance trimmer feeds the ST62T40B PA4 I/O pin (when programmed as an A/D Converter input) with a variable voltage (0 to 5V DC). It is used for A/D conversion demonstra­tion/evaluation.
The trimmer can be disconnected from the PA4 I/O pin by removing the JP6 jum per.
2.9 Combi-ports PC0-7
The port C of the ST6240B is used for the LCD segments. It can be used as a normal port in hardware simulation mode.
The port PC0-7 can be accessed on J2, prior to use it, remove the 8 jumpers on JP2 (marked 14 on the Starter Kit board diagram on page 11). Thus, the LC D won’t be aff ected by the in­puts on the port PC0-7 and won’t be damaged.
TRIMMER
V
DD
PB4
JP6
JUMPER
ST62T40B
RV1
GND
18
15/49
Installing the Starter Kit
3 INSTALLING THE STARTER KIT
3.1 Hardware and Software Requirements
To be able to install and run the ST6 Starter Kit, you need a PC with:
A 3 1/2” Floppy Disk Drive
A free Centronics compatible parallel port connector
MS-Windows
TM
3.11, NT or 95.
A CD-ROM Disk Drive
3.2 Installing the Software
If diskettes are provided, you must install the software with them in order to have the latest re­lease:
1
Place the SK624XI1 diskette into your floppy disk drive.
2
In Windows Explorer or File Manager, view the contents of the diskette, then double-click the
Setup
file or icon.
3
Follow the instructions as they appear on screen.
If only the ST62 CDROM is provided, then:
1
Place the ST62 CDROM provided into your CDROM disk drive.
2
In Windows Explorer or File Manager, view the contents of the CDROM, browse to st62oncd\ftools\sk624Xi1 and double-click the
Setup
file or icon.
3
Follow the instructions as they appear on screen.
3.3 Connecting the Power Supp ly
If you have AC mains supply, connect the Jack plug on the power supply cable provided to the J3 input socket, then connect the mains plug to a mains source.
If you have DC mains supply, connect the male plug on the power supply cable provi ded to the J3 input socket, then connect the mains plug to a mains source with the following characteris­tics:
Voltage: 16V min./20V max.
Current: 100 mA min. To avoid a short circuit, always connect the power input cable to the starter kit board before
connecting it to a mains power supply.
19
Loading...
+ 34 hidden pages