![]() |
|
If you can't view the Datasheet, Please click here to try to view without PDF Reader . |
|
Datasheet File OCR Text: |
st622x starter kit user manual for st620x, st621x and st622x release 3.0 november 2000 ref: doc-e-st622xskum
use in life support devices or systems must be expressly authorized. stmicroelectronics products are not authorized for use as critical components in life support devices or systems without the express written approval of stmicroelectronics. as used herein: 1. life support devices or systems are those which (a) are intended for surgical implant into the body, or (b) support or sustain life, and whose failure to perform, when properly used in accordance with instructions for use provided with the product, can be reasonably expected to result in significant injury to the user. 2. a critical component is any component of a life support device or system whose failure to perform can reasonably be expected to cause the failure of the life support device or system, or to affect its safety or effectiveness. table of contents 3/53 chapter 1: introduction . . . . . . . . . . . . . . ............................5 1.1 overview ....................................................................................................... 5 1.2 possible uses of the starter kit .................................................................... 7 1.3 where to go from here... ............................................................................... 8 1.4 getting assistance ........................................................................................ 9 1.5 instructions for use - warning ....................................................................... 9 chapter 2: getting started . . . . . . . ................................11 2.1 your system requirements ........................................................................ 11 2.2 installing the hardware ............................................................................... 11 2.3 installing wgdb6 and other st6 software tools ....................................... 11 2.4 launching wgdb6 ..................................................................................... 13 chapter 3: hardware features . . . . . . . . . . . . . . ......................15 3.1 the st6 microcontrollers ............................................................................ 15 3.2 the starter kit board .................................................................................. 15 chapter 4: running the demos . . . . . . . . . . .........................25 4.1 what the demos do ................................................................................... 25 4.2 running the demonstration programs ....................................................... 27 chapter 5: connecting external resources to the starter kit board . . . . 31 chapter 6: using the starter kit board as a hardware simulator . ......33 6.1 the data transmission driver .................................................................... 34 6.2 technical limitations .................................................................................. 34 6.3 to use the starter kit board as a hardware simulator: ............................... 35 6.4 error messages .......................................................................................... 36 6.5 troubleshooting .......................................................................................... 36 chapter 7: programming st6 microcontrollers . . . . . . . . . . . . . . ........37 7.1 programming signals ................................................................................. 37 7.2 setting up the starter kit board ................................................................. 37 7.3 in-circuit programming ............................................................................... 40 7.4 application board connections ................................................................... 40 7.5 setting up the starter kit board for in-circuit programming ...................... 42 table of contents 4/53 chapter 8: running your own program on the starter kit board . ......45 appendix a: glossary . . . . . .......................................47 product support .................................................49 getting prepared before you call............................................................................... 49 contact list ............................................................................................................... 49 index . . . . . . . . . . . . . . . . . ..........................................51 st622x starter kit user manual 1 - introduction 5/53 1 introduction the st622x starter kit provides you with all you need to start designing, developing and evaluating programs for st620x, st621x and st622x microcontrollers immediately. note: if you come across any terms or abbreviations you do not understand, you can check their meaning in the glossary on page 47. 1.1 overview the st622x starter kit includes: ? the st6 starter kit board, which serves as a demonstration board and low- cost debugging tool. ? two st62e25, two st62e20 and one st62e01 microcontrollers. ? the mcu on cd cd-rom which contains the following: - the st6 assembler and linker, ast6 and lst6. - the st6 windows debugger, wgdb6. - the windows st6 microcontroller programmer, epromer. - some demonstration programs that show how st6 microcontrollers use the starter kit board resources. - some example programs of typical st6 applications for the st622x family. ? a complete set of paper documentation and online help. the demonstration programs, that come pre-loaded on an st62e25 microcontroller, show how the powerful features of st6 microcontrollers operate in a real environment. the demonstration programs use the hardware resources provided on the starter kit board, which include reset and data control buttons, led indicators, a resistance trimmer, a temperature control circuit and an rs-232 interface. the source files of these demos are also included on the mcu on cd cd-rom and are installed by default in the following directory: c:\program files\stm\st6toolchain\starterkit\sk622xli using the st6 assembler and linker, ast6 and lst6, you can assemble and link st6 programs. the ast6/lst6 user manual will guide you through the steps of developing, assembling and linking programs for st6 microcontrollers. 1 - introduction st622x starter kit user manual 6/53 the starter kit software includes a set of example programs of typical st6 applications. these example programs are included in the mcu on cd cd-rom and are installed by default in the following directory: c:\program files\stm\st6toolchain\starterkit\samples\exos once you have developed your st6 program, you can use the st6 windows debugger, wgdb6, together with the starter kit board, as a low-cost but powerful 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 transactions 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 wgdb6 getting started manual and online help will lead you through the debugging process using wgdb6. in addition to the st wgdb6 debugger, raisonance's ride-st6 windows ? - compatible software package is supported by the st6 family starter kits. raisonance's software suite is an integrated development environment that includes a highly optimized ansi c compiler, a powerful macro-assembler, a linker and a fully integrated simulator/debugger. the advantage of raisonance's software suite is that everything you need to evaluate, debug, edit and re-compile your application is integrated in a single, consistent and user-friendly interface. this software is included in the mcu-on-cd cd-rom provided with your emulator kit, or can be downloaded from raisonance's web site at: http://www.raisonance.com once 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 st6 microcontroller that is plugged into either one of the dil sockets on the starter kit board, or your own in-circuit application board that is connected to the starter kit board. to observe and evaluate the consequences of your program on the resources it controls, you can run it on an st6 microcontroller that is plugged into the starter kit board. if it controls a resource that is not included on the starter kit board, you can connect your own resource to the board. st622x starter kit user manual 1 - introduction 7/53 1.2 possible uses of the starter kit the following diagram summarizes the possible uses of the starter kit board and the hardware setup required for each one. to program st6 mcus on your own in-circuit programming board: to run the demonstrations: to run your own program: to use the starter kit board as a software simulator: to program st6 mcus using the starter kit board: pc running epromer starter kit board in-circuit programming board parallel port connected to p1 parallel port connected to p1 j1 connector st6 mcu to be programmed pc running epromer st6 mcu programmed with demok25.hex st6 mcu programmed with program to run starter kit board starter kit board pc running wgdb6 simulator st6 mcu programmed with demok25.hex parallel port connected to p1 1 - introduction st622x starter kit user manual 8/53 1.3 where to go from here... the following table directs you to where you should look for further information concerning how to use the st6 starter kit. to: refer to: install the starter kit software, and connect the power supply to the board. chapter 2: getting started on page 11 of this book. find out about the starter kit board and st6 microcontrollers provided with the kit. chapter 3: hardware features on page 15 of this book. find out what the demonstration applications do, and run them. chapter 4: running the demos on page 25 of this book. connect your own hardware resource to the starter kit board. chapter 5: connecting external resources to the starter kit board on page 31 of this book. learn how to develop source code for ast6 and lst6. ast6/lst6 assembler and linker for the st6 family -user guide . install wgdb6, and learn how to use it for debugging your programs. wgdb6 windows debugger for the st6 family - getting started . prepare the starter kit board for use as an st6 hardware simulator with wgdb6. chapter 6: using the starter kit board as a hardware simulator on page 33 of this book. learn how to use epromer for programming st6 microcontrollers. the epromer online help. prepare the starter kit board for programming st6 microcontrollers using epromer. chapter 7: programming st6 microcontrollers on page 37 of this book. prepare the starter kit board for connecting your own in-circuit programming board. section 7.5: setting up the starter kit board for in-circuit programming on page 42 of this book. run your own program on an st6 microcontroller using the starter kit board. chapter 8: running your own program on the starter kit board on page 45. st622x starter kit user manual 1 - introduction 9/53 1.4 getting assistance for more information, application notes, faqs and software updates on all the st microcontroller families, check out the cd-rom or our website: http://mcu.st.com for assistance on all st microcontroller subjects, or if you need help with using your emulator, refer to product support on page 49. we'll be glad to help you! 1.5 instructions for use - warning this product conforms with the 89/336/eec directive; it also complies with the en55022 emissions 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 radioelectrical disturbances which may require that the user adopt appropriate precautions. the product is not contained in an outer casing, and cannot therefore be immune against electrostatic discharge (esd): it should therefore only be handled at static safe work stations . 1 - introduction st622x starter kit user manual 10/53 st622x starter kit user manual 2 - getting started 11/53 2 getting started 2.1 your system requirements to run/install the software provided on the mcu on cd cd-rom, you must have a pc running either microsoft ? windows ? 95, windows ? 98 or windows ? nt ? . 2.2 installing the hardware 2.2.1 connecting the power supply if you have an 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 provided to the j3 input socket, then connect the mains plug to a mains source with the following characteristics: ? voltage: 16 v min./20 v max. ? current: 100 ma min. note: to avoid a short circuit, always connect the power input cable to the starter kit board before connecting it to a mains power supply. if you use your own 3.5 mm power supply plug, its polarity must be as follows: 2.3 installing wgdb6 and other st6 software tools your starter kit comes with the mcu on cd cd-rom which contains a number of st6 software tools. to install them, follow these steps: 1 place the mcu on cd cd-rom in your cd-rom drive. the cd-rom's autorun feature opens up a welcome screen on your pc. if the autorun feature does not work, use windows ? explorer to browse to the cd-rom's root folder, and double-click on welcome.exe . 2 select install your development tools from the list of options. a new screen appears listing the different families of stmicroelectronics mcus. 3 use your mouse to place the cursor over the st6 tools option. choose st tools and st6 toolchain from the lists that appear. jack plug - + 2 - getting started st622x starter kit user manual 12/53 4 the install wizard is launched. follow the instructions that appear on the screen. you can choose the package you wish to install. to install the complete st6 toolchain for your starter kit, select complete toolchain for starter kit . this option installs the wgdb6 debugger version for your starter kit, as well as a windows epromer and st6 assembler-linker software. alternatively, you can choose to perform a custom installation where you choose which of the available software applications you wish to install. note: in order to configure your starter kit, you must, as a minimum, install the st6 wgdb6 for starter kit if you do not choose any options, but click next> , the st6 assembler-linker will be installed by default. 5 follow the instructions that appear on your screen. you will be prompted to select the parallel port you wish to connect the emulator to, as well as the program folder that the software will be installed to. 6 if you are installing wgdb6 on a windows ? nt ? platform, you must install the windows ? nt ? parallel port driver supplied on the cd-rom. a window pops up if you have not already installed this driver ( parstm.sys ). 7 click ok . the following window appears: st622x starter kit user manual 2 - getting started 13/53 8 click install . the following window appears: 9 click ok , the installation is now complete. the following window appears. 10 choose to read the release notes or start wgdb6, then click the finish button. 2.4 launching wgdb6 from windows ? 95, 98 or windows ? nt, click the start button, point to programs -> st6 tool chain -> development tools , then choose wgdb6 starterkit . refer to the wgdb6 windows debugger for the st6 family user manual for full instructions on how to use wgdb6. this manual is available in pdf format on the mcu on cd cd-rom. 2 - getting started st622x starter kit user manual 14/53 st622x starter kit user manual 3 - hardware features 15/53 3 hardware features this section describes the st6 microcontrollers and the starter kit board that come with the st6 starter kit. figure 3 on page 18 shows a full schematic of the starter kit board. 3.1 the st6 microcontrollers the starter kit includes two st62e25, two st62e20 and one st62e01 microcontrollers. the st62e25 microcontroller labelled demok25 is pre-loaded with the demok25.hex code, which includes the demonstration programs (see chapter 4: running the demos on page 25), as well as the communications protocol program, that enables you to use the starter kit board as a simulator (see chapter 6: using the starter kit board as a hardware simulator on page 33). the other st6 microcontrollers are blank. the demok25.asm file is also provided on the mcu on cd cd-rom and is installed in the ...\st6toolchain\starterkit\sk622xli directory, so that if you erase it from the st62e25, you can re-program it following the instructions given in chapter 7: programming st6 microcontrollers on page 37. 3.2 the starter kit board the starter kit board includes the following resources (described in more detail later in this chapter): ? oscillator. ? reset button. ? data control buttons. ? led indicators. ? resistance trimmer. ? temperature control circuit. ? rs-232 interface. ? demonstration program selector jumpers. it comes with its own power supply unit that can be plugged into an ac mains source, or a dc source with the following characteristics: ? voltage: 16 v min./20 v max., current: 100 ma min. 3 - hardware features st622x starter kit user manual 16/53 it includes the following connectors: ? a parallel port connector (p1) for connection to the host pc when it is used as a hardware simulator or for programming. ? a remote resource i/o interface connector (j2) to which you can connect your own hardware resource. ? an rs-232 connector, which you can use for observing rs-232 communication control using an st6. ? a connector for your own in-circuit st6 programming board. see application board connections on page 40 for further details. a block diagram of the starter kit board is shown in figure 1 .. figure 1: block diagram of starter kit board unit power supply parallel connection to pc and softw are simulator in-circuit programming j1 rs232 p2 user application st622x i/o connection st62e25 j3 jp1 p1 eprom programmer dac temperature control leds trimmer j2 st622x starter kit user manual 3 - hardware features 17/53 a photo of the starter kit board is shown in figure 2 . figure 2: starter kit board 3 - hardware features st622x starter kit user manual 18/53 the layout of the starter kit board is shown in figure 3 . figure 3: starter kit board layout 1 in-circuit programming connector (j1). 11 reset button. 2 8 mhz oscillator. 12 demonstration routine selector. 3 pc connector p1. 13 rs232 interface circuit and connector. 4 4 leds. 14 10 k w trimmer. 5 heater resistor led indicator ld6. 15 dil 20-28 zif mcu socket. 6 power supply jack connector j3. 16 dil 16 zif mcu socket. 7 heater resistor. 17 remote resource i/o interface connector j2. 8 power supply led indicator ld5. 18 st6220 or st6225 device selection jumpers w1. 9 thermistor. 19 aprogrammingo or ausero operating mode selection jumpers w2. 10 a+o and a-o buttons. 1 2 3 4 5 6 7 8 910 11 12 13 14 15 16 17 18 19 w3 w4 w5 w6 w8 w9 w10 w7 w2 w1 st622x starter kit user manual 3 - hardware features 19/53 3.2.1 oscillator an oscillator feeds the st6225 oscin input with an 8 mhz clock signal. you can disconnect the oscillator by removing the two jumpers w2 (marked 19 on the starter kit board diagram on page 18 ). 3.2.2 reset button the reset button activates the st6225 reset input when pressed. a power-on reset circuit is also provided. 3.2.3 + and - buttons the + and - buttons are connected to pb3 and pb4 pins on the microcontroller respectively. they drive the pb3 and pb4 inputs down to gnd when pressed. you can disconnect pb3 by removing the w8 jumper, and pb4 by removing the w9 jumper. 8 mhz oscillator programming clock from p1 oscin user (only when programming microcontrollers) prog jumper w2 pb3 w8-pb3 jumpers st6225 pb4 w9-pb4 3 - hardware features st622x starter kit user manual 20/53 3.2.4 led indicators four leds are used for level indication in the demonstration routines. they are connected to the st6225 pins: pa0 to pa4 (when programmed as outputs) to demonstrate direct led-driving capability. the 4 leds can be disconnected by removing the w3-pa0 to 3 jumpers. 3.2.5 resistance trimmer a10k w resistance trimmer feeds the st6225 pa5 i/o pin (when programmed as an a/d converter input) with a variable voltage (0 v to 5 v dc). it is used for a/d conversion demonstration/evaluation. the trimmer can be disconnected from the i/o pin by removing the w4-pa5 jumper. resistor array w3 jumpers st6225 pa3 pa2 pa1 pa0 v dd trimmer v dd pa5 w4 jumper st6225 gnd st622x starter kit user manual 3 - hardware features 21/53 3.2.6 temperature control circuit this circuit demonstrates temperature control, using the on-chip a/d converter. a heater resistor circuit (150 w , 1 watt) is driven by the timer output of the st6225 microcontroller. the heat level can be controlled by varying the duty cycle of a pwm signal present on the timer output. the heater circuit can be disconnected from the timer output pin by removing the w6-timer jumper. a thermistor bridge (negative temperature coefficient) is connected to the pa4 i/ o pin, which is programmed as an a/d converter input. the voltage value at the a/ d converter input decreases as the thermistor temperature increases. the thermistor circuit can be disconnected from pa4 by removing the w5 jumper. the thermistor is located in close proximity to the heater resistor on the starter kit board, so that it can be used as a sensor to detect the temperature of the resistor body. demonstration 6 shows how this circuit is used as a feedback loop that controls the temperature level (see running the demos on page 25). 3.2.7 rs-232 interface the rs-232 interface enables you to communicate with the pre-programmed st6225 microcontroller provided with the starter kit. it includes an rs-232 buffer circuit that is connected to a standard pc-compatible rs-232 subd-9 connector. heater pa4 w5-pa4 jumper timer w6-timer jumper out st6225 thermistor v dd bridge 74hc04 indicator heator resistor (1 w) 15 v-dc power led 3 - hardware features st622x starter kit user manual 22/53 the following table lists the rs-232/st6 pin connections: you can disconnect these by removing the corresponding jumpers from w7. figure 4 shows the rs-232 connections and line allocations: tx, rx, cts and rts are defined so that the board is used as a slave. to use the board as a master, swap both the rx and tx and the cts and rts pin connections on the cable. 3.2.8 demonstration selector jumpers the demonstration selector is made up of a 6-position jumper w10 (marked 12 on the starter kit board diagram on page 18 ), with each jumper connected to a resistor. each resistor generates a different voltage. after reset, the voltage value generated by the resistor whose jumper is installed is sent to pa3 on the st6225. pa3 is programmed as an a/d converter. the program signal name subd-9 pin st6 pin data transmission (tx) 2 pc7 data reception (rx) 3 pc6 request to send (rts) 8 pc5 clear to send (cts) 7 pc4 figure 4: rs-232 connections and line allocations subd - 9 point pc7 w7 jumpers st6225 connector rs232 line buffer cts tx pc4 pc6 pc5 rx rts 1 2 3 4 6 5 7 8 9 10 k +12 v st622x starter kit user manual 3 - hardware features 23/53 installed on the st6225 uses the input from pa3 to select the appropriate demo. the following table lists the voltage values generated by each resistor: the same principle can be used for keyboard decoding. for a complete example of this, refer to the stmicroelectronics application note: an431: using st6 analog inputs for multiple key decoding . you can disconnect the demonstration selector from pa7 by removing the pa7 jumper from w10 (marked 12 on the starter kit board diagram on page 18 ). resistor value: theoretical voltage value: rt: 10 k w no jumper: 5 v r1: 680 w jumper-d1: 0 v r2: 750 w jumper-d2: 333 mv r3: 820 w jumper-d3: 666 mv r4: 1 k w jumper-d4: 999 mv r5: 1.2 k w jumper-d5: 1.332 v pa7 w10-pa7 jumper st6225 d6 d5 d4 d3 d2 d1 r5 r4 r3 r2 r1 rt jumper w10 v cc gnd 3 - hardware features st622x starter kit user manual 24/53 st622x starter kit user manual 4 - running the demos 25/53 4 running the demos this section describes the demonstration programs that are provided with the starter kit and explains how to run them. 4.1 what the demos do the following paragraphs describe the demos that come pre-loaded with the st6 starter kit demos. see running the demonstration programs on page 27 for details on how to select and run a demo. the source files of these demos are also included on the mcu on cd cd-rom and are installed in the following directory: ...\stm\st6toolchain\starterkit\sk622xli . 4.1.1 demo 1 - button/led indicator control 1 initializes the pins as follows: 2 performs a task relating to your actions: this pin: is initialized as: pb3 input with pull-up and interrupt. connected to + button. pb4 input with pull-up and interrupt. connected to - button. pa0 to pa3 push-pull outputs. connected to the four leds (as marked on board). when you do this: the program does this: press the + button jumps to an interrupt subroutine that lights up each led in turn, from ld4 to ld1. press the - button jumps to an interrupt subroutine that lights up each led in turn, from ld1 to ld4. 4 - running the demos st622x starter kit user manual 26/53 4.1.2 demo 2 - voltage trimming and led level indication 1 initializes the pins as follows: 2 reads the a/d converter data register, and turns on a led according to the voltage value input by the trimmer: adjusting the voltage trimmer (marked 9 on the starter kit board diagram on page 18 ) turns on the appropriate led. pressing the + or - buttons has the same effect as increasing or decreasing the voltage. 4.1.3 demo 3 - temperature control 1 initializes the pins as follows: this pin: is initialized as: pa5 analog input. connected to the trimmer. pa0 to pa3 push-pull outputs. connected to the four leds (as marked on board). this voltage: turns this led on: 0 to 1 none 1 to 2 ld1 2 to 3 ld2 3 to 4 ld3 4 to 5 ld4 this pin: is initialized as: pa4 analog input. connected to the thermistor circuit. timer push-pull output. connected to the heater resistor cir- cuit. pb3 input with pull-up and interrupt. connected to + button. pa0 to pa3 push-pull outputs. connected to the four leds (as marked on board). st622x starter kit user manual 4 - running the demos 27/53 2 reads and stores the a/d converter data register value. this value indicates the temperature at reset. 3 reads and stores the a/d converter data register value at regular intervals. if this value exceeds the value that was stored at reset, a led is turned on indicating the difference between the two values. the higher the difference is between the stored value and the read value, the higher led number is turned on (roughly in steps of ld( n +1) for each additional degree difference). you can either increase the temperature by touching the thermistor (marked 14 on the starter kit board diagram on page 18 ) or pressing the + button. 4.1.4 demo 5 - fuzzy logic heater control this demonstration shows how a heater control application can be developed using a fuzzy logic description. the application was developed using the fuzzytech explorer development tool. for more information about this demonstration, see the fuzzykit text file, this is supplied on the mcu on cd cd- rom and is installed in the following directory: ...\stm\st6toolchain\starterkit\sk622xli . 4.2 running the demonstration programs the st62e25 microcontroller labelled demok25 is programmed with the demonstration software. the demok25.asm file is also provided on the mcu on cd cd-rom and is installed in the ...\stm\st6toolchain\starterkit\sk622xli directory, so that if you erase it from the st62e25 microcontroller, you can re- program it following the instructions given in chapter 7: programming st6 microcontrollers on page 37. to run the demonstrations: 1 power down the starter kit board. 2 make sure that the pre-programmed st62e25 is plugged into the dil connector, and that the device jumpers w1 (marked 18 on the starter kit 4 - running the demos st622x starter kit user manual 28/53 board diagram on page 18 ) are set to st6225 as shown in the following diagram: 3 select the user mode using the jumpers marked w2 (marked 19 on the starter kit board diagram on page 18 ), as shown in the diagram below: 4 disconnect the cable from the parallel port (p1) connection, if it is connected. 5 power up the starter kit board. st6225 st6220 d e v i c e w 1 user prog w 2 m o d e st622x starter kit user manual 4 - running the demos 29/53 6 install the demonstration program jumper marked pa7, as shown in the diagram below: 7 select the demo you want to run, by installing the appropriate jumper on w10 (marked 12 on the starter kit board diagram on page 18 ), as indicated on the diagram below: for example, in the above diagram demo 3 is selected. 8 press the reset button. the selected demo is now run. 9 to run a different demo, repeat steps 7 and 8. w10 demo selection d1 d2 d3 d4 d5 d6 pa7 w10 demo selection d1 d2 d3 d4 d5 d6 selects demo 1 - push button/led indicator control selects demo 2 - voltage trimming and led level indication selects demo 3 - temperature control selects demo 4 - rs-232 communications selects demo 5 - fuzzy logic heater control not used 4 - running the demos st622x starter kit user manual 30/53 st622x starter kit user manual 5 - connecting external resources to the starter kit board 31/53 5 connecting external resources to the starter kit board you can connect your own external resources to the pre-programmed st62e25 to debug or evaluate your programs, using the connector j2 (marked 17 on the starter kit board diagram on page 18 ). to be able to connect your own resources to the starter kit board, you must disconnect the resources that are already connected to the st62e25 (to avoid conflicts between external resources and starter kit board resources). the following table lists the starter kit board resources and the corresponding j2 connections, and indicates the jumper that disconnects each resource. on-board resource jumper to disconnect st6225 i/o pin pin st6225 i/o jumper to disconnect on-board resource +5 v supply - v dd 128v ss - gnd heater resis. control w6-timer timer 2 27 pa0 w3-pa0 led indicator 8 mhz osc. w2 oscin 3 26 pa1 w3-pa1 led indicator none - osco 4 25 pa2 w3-pa2 led indicator system tasks (simulator link) (*) nmi 5 24 pa3 w3-pa3 led indicator rs232 driver tx output w7-pc7 pc7 6 23 pa4 w5-pa4 thermistor rs232 driver rx input w7-pc6 pc6 7 22 pa5 w4-pa5 trimmer rs232 driver rts output w7-pc5 pc5 8 21 pa6 - none rs232 driver cts input w7-pc4 pc4 9 20 pa7 w10-pa7 routine selector system tasks (programming) w2 v pp 10 19 pb0 (*) system task (simul. link) reset button - reset/ 11 18 pb1 (*) system task (simul. link) 5 - connecting external resources to the starter kit board st622x starter kit user manual 32/53 note: some of the signals on the j2 connector are used during st6 programming, thus you must disconnect any external resource that is connected to j2 before using the starter kit board for programming. system tasks (programming) w2 pb7 12 17 pb2 (*) system task (simul. link) system tasks (programming) w2 pb6 13 16 pb3 w8-pb3 + button system tasks (programming) w2 pb5 14 15 pb4 w9-pb4 - button *) this is not available if the starter kit board is connected to a host pc. on-board resource jumper to disconnect st6225 i/o pin pin st6225 i/o jumper to disconnect on-board resource st622x starter kit user manual 6 - using the starter kit board as a hardware simulator 33/53 6 using the starter kit board as a hardware simulator wgdb6, the st6 debugger that runs under windows, lets you test your programs without having to program the eprom of your target st6. depending how much information you want, and how close to real life you want your test environment to be, you can use wgdb6 in one of three ways: ? as a software simulator. if you use wgdb6 as a simulator, you need not attach any additional hardware to your pc. the st6 simulator program, that comes with wgdb6 and is run when you run wgdb6/simulator, simulates the execution of your program, letting you step through the code and see what happens as the program runs. wgdb6 simulator includes wave form editor, which simulates the output of the pins on your target st6 in relation to inputs that you define, enabling you to see how its peripherals react to the inputs they receive. ? with an st6 hardware emulator. emulators are hardware systems that act as your target microcontroller, at the same time capturing detailed information, such as which areas of memory are accessed by the program and what happens when they are accessed. in this case, wgdb6/emulator provides an interface between the emulator and your pc, displaying data captured by the emulator and letting you implement the wgdb6 features in the emulator, such as software or hardware breakpoints. ? with the starter kit board as a hardware simulator. this is a cross between the above two. the wgdb6 software simulator simulates the execution of your program, but each time the data space is accessed, it accesses that of the st6 that is plugged into your starter kit board. thus, using the starter kit board with wgdb6, you can view how the real microcontroller peripherals behave when your program is executed. this section describes the third option, how to use the starter kit board as a hardware simulator. you can use the starter kit board to emulate any st620x, st621x or st622x microcontroller. note, however that you must use the pre-programmed st62e25 microcontroller, labelled demok25 supplied with the kit for hardware simulation. thus, when simulating programs designed for other microcontrollers, make sure that you do not use resources that are not available on the microcontroller your application is designed for. 6 - using the starter kit board as a hardware simulator st622x starter kit user manual 34/53 6.1 the data transmission driver data is transferred between the simulated peripheral registers and the st620x, st621x and st622x registers via the host pc's parallel port. the demok25.hex program, with which the st62e25 microcontroller that is plugged into the starter kit board must be loaded includes the transmission driver. the data transfer driver uses the following bits: 6.2 technical limitations the starter kit board has the following limitations when used with wgdb6 as a hardware simulator: ? real-time program execution is not supported. ? resetting the st6225 by power on, pressing the reset button or external reset does not reset the simulated st6 core. to perform a complete simulated reset, use the wgdb6 reset command instead. ? interrupts sent by the st62e25 microcontroller are not supported by the wgdb6 simulator. ? the pins: nmi, pb0, pb1 and pb2 on the st62e25 microcontroller are used for communications with the host pc, and are thus not available for simulation. note: do not connect any external resources to the corresponding j2 connector pins when using the starter kit board as a peripheral emulator. pc parallel port st6225 wgdb6 use d2 pb2 synchronization d3 pb1 write data to mcu d4 reset hardware reset of peripherals d6 nmi initiates data trans- fer sdop pb0 read data from mcu st622x starter kit user manual 6 - using the starter kit board as a hardware simulator 35/53 6.3 to use the starter kit board as a hardware simulator: 1 power down the starter kit board. 2 make sure that the st62e25 labelled demok25 is plugged into the dil28 socket, and that the device jumpers w1 (marked 18 on the starter kit board diagram on page 18 ) are set to st6225 as shown in the following diagram: 3 select the user mode using the jumpers marked w2 (marked 19 on the starter kit board diagram on page 18 ), as shown in the following diagram: 4 connect the parallel port p1 on the starter kit board to a spare parallel port on your pc using the cable provided with the starter kit. 5 power up the starter kit board. st6225 st6220 d e v i c e w 1 user prog w 2 m o d e 6 - using the starter kit board as a hardware simulator st622x starter kit user manual 36/53 to run wgdb6: from windows 95, 98 or nt click start > programs > st6 tool chain > development tools > wgdb6 starterkit . refer to the wgdb6 windows debugger for the st6 family user manual for full instructions on how to use wgdb6. this manual is available in pdf format on the mcu on cd cd-rom. 6.4 error messages the following table lists the error messages you may encounter when using wgdb6 with the starter kit board: 6.5 troubleshooting if there is a communications problem between wgdb6 and the starter kit board, the title awgdb6 simulatoro appears in the wgdb6 title bar. in this case, you should check the following: ? that the starter kit board is correctly powered up. ? that the parallel port cable is correctly connected. ? that the device jumpers (w2) are in the user position. ? that the device type selection jumpers (w1) are in the st6225 position. ? that an st6225 is plugged into the starter kit board, and it is programmed with demok25.hex . error message description error 116 port b protected when using board. this means that wgdb6 tried to access the port b registers. these are used for communications with the board. error 117 communication error with st620x/ st621x/st622x board. this means that a problem occurred during commu- nications between the host pc and the board. per- form the checks listed below. st622x starter kit user manual 7 - programming st6 microcontrollers 37/53 7 programming st6 microcontrollers you can use the starter kit board, in conjunction with the st6 epromer, to program st620x, st621x or st622x microcontrollers. you can also perform in-circuit programming of st620x, st621x or st622x otp/eprom microcontrollers using your own board, connected to the starter kit board via the connector j1 (marked 1 on the starter kit board diagram on page 18 ). 7.1 programming signals the following table shows the programming signals and states and their corresponding pin numbers. note: some of the signals on the j2 connector are used during st6 programming, thus if you have connected an external resource to j2, you must disconnect it before using the starter kit board for programming. this section describes how to set up the starter kit board for programming microcontrollers, and lists the connection requirements for in-circuit application boards. 7.2 setting up the starter kit board 1 power down the starter kit board. mcu dil28 mcu dil20 mcu dil16 programming signals programming states mcu pin j2 connector mcu pin j2 connector mcu pin j2 connector pb7 high pin 12 pin 12 pin 8 pin 12 pin 7 pin 12 pb6 high/low pin 13 pin 13 pin 9 pin 13 pin 8 pin 13 pb5 high/low pin 14 pin 14 pin 10 pin 14 pin 9 pin 14 test 5 v/12 v pin 10 nc pin 6 pin 10 pin 5 pin 10 oscin high/low pin 3 pin 3 pin 14 pin 7 pin 2 pin 7 reset high/low pin 11 pin 11 pin 16 pin 11 pin 6 pin 11 pb3 high pin 16 pin 16 pin 12 pin 16 nc nc 7 - programming st6 microcontrollers st622x starter kit user manual 38/53 2 plug the st6 microcontroller you want to program into the u3 or u4 zif connector, according to the following diagram: 3 set the device jumpers w1 (marked 18 on the starter kit board diagram on page 18 ) for the microcontroller that you want to program according to the following table: device type w1 position st6200 st6220 st6201 st6220 st6203 st6220 st6208 st6220 st6209 st6220 st6210 st6220 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 28 27 26 25 24 23 22 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 st62x25 st62x08 st62x09 st62x15 st62x10 st62x20 u4 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 st62x01 st62x00 st62x03 u3 st6225 st6220/6209 st622x starter kit user manual 7 - programming st6 microcontrollers 39/53 as shown in the following diagram: 4 select the prog mode using the jumpers marked w2 (marked 19 on the starter kit board diagram on page 18 ), as shown in the following diagram: st6220 st6220 st6215 st6225 st6225 st6225 device type w1 position st6225 st6220 d e v i c e w 1 st6225 st6220 d e v i c e w 1 to select st6225: to select st6220: user prog w 2 m o d e 7 - programming st6 microcontrollers st622x starter kit user manual 40/53 5 connect the parallel port p1 on the starter kit board to a spare parallel port on your pc using the cable provided with the starter kit. 6 power up the starter kit board. you can now use epromer to program the microcontroller that is plugged into the starter kit board. to run epromer from windows 3.x, double-click the epromer icon in the st6 tools group. to run epromer from windows 95, 98 or nt click start > programs > st6 tool chain > development tools > winee . for instructions on how to operate epromer, click help in the epromer main window. 7.3 in-circuit programming you can perform in-circuit programming of st620x, st621x or st622x otp/ eprom microcontrollers using your own board, connected to the starter kit board via the connector j1 (marked 1 on the starter kit board diagram on page 18 ). 7.4 application board connections the following paragraphs specify the connection requirements between your application board and the starter kit board. the application board must have a suitable 16-way connector (8x2 header he10) to be connected via a 16-way cable to connector j1 (marked 1 on the starter kit board diagram on page 18 ) on the starter kit board. the following table shows the required pin connections: st620x, st621x and st622x pins connector pins pb6 pin 1 pb5 pin 3 oscin pin 5 pb7 pin 7 reset pin 9 v pp /tm pin 13 v dd pin 14, 15 st622x starter kit user manual 7 - programming st6 microcontrollers 41/53 v dd use of the v dd connection is optional, depending on whether the application board supply can or cannot be disconnected. if the application board supply is disconnected, you can supply it through pins 14 an 16 of the connector, as long as the total load current does not exceed 100 ma, and the capacitive load is less than 50 m f. if the application board has its own power supply, its voltage must be set to 5 v, so that logic levels are compatible with those of the starter kit board. oscin synchronizes the programming operations using a clock generated by the programming tool. oscin is located on the application board, and must be directly connected to pin 5 on the 16-way connector. no isolation is needed as long as a quartz crystal or ceramic resonator is used in the application. if an external clock generator is used in the application, it must be disconnected during in-circuit programming. reset controls the programming mode entry. to prevent signal level contention, reset must be directly connected to pin 9 on the 16-way connector, and must be isolated from other nodes on the application board. any direct connection to v dd ,v ss or an output must be avoided. this pin can be connected to a cmos input ,a2k w pull- up, a 10 k w pull-down or left open (internal pull-up). the capacitive load of the reset pin should not exceed 1 m f. pins 1 and 7 on the 16-way connector are used to establish communications between the programming tool and the microcontroller. to prevent signal-level contention, pins 1 and 7 must be directly connected to pb6 and pb7 on the 16-way connector, and must be isolated from other nodes on the application board. any direct connection to v dd ,v ss or an output must be avoided. these pins may be connected to a cmos input, a 2 k w pull-up, a 10 k w pull-down or left open (internal pull-up). if pin 3 on the 16-pin connector is connected to the target device, the same applies. connection to pin 3 is not necessary if a high voltage level is guaranteed by the board design. v ss pin 2, 4, 6, 8, 10 st620x, st621x and st622x pins connector pins 7 - programming st6 microcontrollers st622x starter kit user manual 42/53 some i/o pins are not connected to the 16-way connector and must be set to a high level during programming. this is normally achieved by the reset signal sent by the programming tool through the 16-way cable, setting the i/o pins as inputs with an internal 300 k w pull-up. to keep these i/o lines high, direct connection of these pins to gnd or to any other signal at low level (even temporarily) must be avoided. only connections to another cmos input, to an external pull-up or a 10 m w pull-down is allowed. the signals on pb3 and pb5 (if not directly biased through pin 3 of the 16-way connector) must be kept at a high voltage level. the v pp /tm pin must not be directly connected to gnd/v ss on the application board, to avoid any conflict with the programming voltage provided by the programming tool via pin 13 on the connector. this pin should be pulled down by a resistor with minimum value of 10 k w . you must add a 100 nf ceramic capacitor between v pp /test and v ss . 7.5 setting up the starter kit board for in-circuit programming 1 power down the starter kit board. 2 set the device jumpers w1 (marked 18 on the starter kit board diagram on page 18 ) to st6225, as shown in the following diagram: st6225 st6220 d e v i c e w 1 st622x starter kit user manual 7 - programming st6 microcontrollers 43/53 3 select the prog mode using the jumpers marked w2 (marked 19 on the starter kit board diagram on page 18 ), as shown in the diagram below: 4 connect the parallel port p1 on the starter kit board to a spare parallel port on your pc using the cable provided with the starter kit. 5 connect your application board to the connector j1 (marked 1 on the starter kit board diagram on page 18 ) on the starter kit board. 6 power up your starter kit board. you can now use epromer to program the microcontroller that is plugged into the starter kit board. to run epromer from windows 3.x, double-click the epromer icon in the st6 tools group. to run epromer from windows 95, 98 or nt, click start , programs , st6 tools , then epromer . for instructions on how to operate epromer, click help in the epromer main window. note: if your application board is not powered by the starter kit, you must connect it to a 5 v dc power supply before you start programming. user prog w 2 m o d e 7 - programming st6 microcontrollers st622x starter kit user manual 44/53 st622x starter kit user manual 8 - running your own program on the starter kit board 45/53 8 running your own program on the starter kit board you can run your own programs on the starter kit board, using any of the starter kit resources: ? 8 mhz oscillator ? 10 k w trimmer ? + and - buttons ? thermistor bridge ? heater resistor control circuit note: you can only run applications on the starter kit board using st6225 microcontrollers. if your application is designed for another microcontroller, you must change its port definitions to match those of the st6225. you can also use your own hardware resource by connecting it to the j2 connector (see connecting external resources to the starter kit board on page 31). to run your own program on the starter kit board: 1 power down the starter kit board. 2 program the microcontroller with the application you want to run following the instructions given in programming st6 microcontrollers on page 37. 3 make sure that the programmed microcontroller is plugged into the dil connector, and that the device jumpers w1 (marked 18 on the starter kit board diagram on page 18 ) are set to st6225, as shown in the following diagram: st6225 st6220 d e v i c e w 1 8 - running your own program on the starter kit board st622x starter kit user manual 46/53 4 select user mode using the jumpers marked w2 (marked 19 on the starter kit board diagram on page 18 ), as shown in the diagram below: 5 disconnect the cable from the parallel port (p1) connection, if it is connected 6 disconnect the demonstration program selector by removing the jumper marked pa7 in the demonstration selector circuit marked 12 in the starter kit board diagram on page 18 . 7 if you are using your own hardware resources connected to j2 (marked 17 on the starter kit board diagram on page 18 ), disconnect any starter kit board resources that use the same pins, following the instructions given in connecting external resources to the starter kit board on page 31. 8 power up the starter kit board. user prog w 2 m o d e st622x starter kit user manual appendix a: glossary 47/53 appendix a:glossary ast6 ast6 is a macro-assembler that translates files that are written in assembler language into either executable files or object files. dil or dip dual in line, also known as dual in line package. these two abbreviations designate a type of device package with two rows of pins for thru-hole mounting. eprom erasable programmable read-only memory. a non-volatile type of memory that can be erased by exposure to an ultra-violet light source. mcus that have eprom are easily recognized because the package has a quartz window to allow exposure to the uv light. if the eprom mcu is packaged in an opaque plastic package, it is called a otp (one-time programmable) mcu because there is no way to expose the eprom to a uv light source. epromer epromer is a st6 microcontroller program for windows that lets you view, edit and save executable files in the hex (intel) and .s19 (motorola) formats, generated by the assembler, linker or c compiler for st microcontrollers. it also enables you to program executable files into st microcontrollers and to view and verify a microcontroller's memory contents. gnu acronym for not unix. name of a project developed by the free software foundation. lst6 the st6 family linker. it links relocatable objects (assembled source file modules) into a single, executable file that can be loaded into the st6 memory. mcu microcontroller unit. otherwise referred to as the atarget deviceo throughout this manual. this is the core product (or family of products) for which the starter kit is designed to act as an emulator or simulator. in general terms, an mcu is a complete computer system, including a cpu, memory, a clock oscillator and i/o on a single integrated circuit. appendix a: glossary st622x starter kit user manual 48/53 otp one time programmable. also referred to as otprom (one time programmable read-only memory). a non-volatile type of memory that can be programmed but cannot be erased. an otp rom is an eprom mcu that is packaged in an opaque plastic packageeit is called a one-time programmable mcu because there is no way to expose the eprom to a uv light source. rs-232 interface an interface that enables you to communicate with the pre-programmed st6225 microcontroller provided with the starter kit. starter kit a printed circuit board for microcontroller evaluation and programming. it has the ability to program one dip eprom or otp part at a time. different starter kits are available for programming different st6 devices. wgdb6 windows gnu debugger for st6. this is a software tool running under windows. it is the main user interface when operating the st6-hds2 emulator, and is part of the st6 software development tool chain (editor, assembler, linker and debugger). wgdb6 is supplied on the cd-rom with the st6-hds2 emulator and must be installed on your development pc. st622x starter kit user manual product support 49/53 product support if you experience any problems with this product or if you need spare parts or repair, contact the distributor or st sales office where you purchased the product: getting prepared before you call collect the following information about the product before contacting st or your distributor: 1 name of the company where you purchased the starter kit. 2 date of purchase. 3 order code: refer to the side of your starterkit box. the order code will depend on the region for which it was ordered (i.e. the uk, continental europe or the usa). 4 serial number: the serial number is located on a label on the starter kit board. 5 target device: the sales type of the st6 microcontroller you are using in your development. contact list note: for american and canadian customers seeking technical support the us/canada is split in 3 territories. according to your area, contact the following sales office and ask to be transferred to an 8-bit microcontroller field applications engineer (fae). canada and east coast stmicroelectronics lexington corporate center 10 maguire road, building 1, 3rd floor lexington, ma 02421 phone: 781-402-2650 mid west stmicroelectronics 1300 east woodfield road, suite 410 schaumburg, il 60173 phone: 847-517-1890 product support st622x starter kit user manual 50/53 west coast stmicroelectronics, inc. 30101 agoura court suite 118 agoura hills, ca 91301 phone: 818-865-6850 europe france (33-1) 47407575 germany (49-89) 460060 u.k. (44-1628) 890800 asia/pacific region japan (81-3) 3280-4120 hong-kong (852) 2861 5700 sydney (61-2) 9580 3811 taipei (886-2) 2378-8088 index 51/53 d data transmission driver................................ 34 demok25 ............................ ..................... 15,27 demonstration programs................................. 5 running............................................ 25, 27 demonstration selector....... ........................... 22 driver nt ......................................................... 12 e error messages ............................................. 36 external resources connecting............................................. 31 f fuzzy logic heater control .............................. 27 g getting assistance ................................. .......... 9 h hardware features................................................. 15 hardware simulator ....................................... 33 i in-circuit programming .................................. 40 preparing for.......................................... 42 l led indicators ........................................ 20, 25 led level indication ...................................... 26 n nt driver ............................ ........................... 12 o oscillator ........................................................19 oscin.......... ..................................................41 otp definition of ............................................48 p programming st6 microcontrollers..............................37 programming signals .....................................37 r raisonance...................................................... 6 reset...........................................................41 reset button....................................................19 resistance trimmer ......................................... 20 rs-232 interface............................................21 s st6 microcontrollers programming .........................................37 st620x ........ ....................................................5 st621x ........ ....................................................5 st622x ........ ....................................................5 starter kit uses......................................................... 7 starter kit board as a hardware simulator ........................ 33 block diagram ........................................ 16 layout..................................................... 18 limitations...............................................34 resources...............................................15 running programs on ............................. 45 setting up for programming.................... 37 starting wgdb6.............................................13 support contact numbers for.......................... .....49 for development kit ................................49 information required...............................49 t temperature control .................................21, 26 index index 52/53 troubleshooting ............................................. 36 v vdd .............................................................. 41 voltage trimming............................................ 26 w wgdb6 starting...................................................13 windows 3.x .................................................. 11 windows 95 ...................................................11 windows 98 ...................................................11 windows nt ..................................................11 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. intel ? is a u.s. registered trademark of intel corporation. microsoft ? , windows ? and windows nt ? are u.s. registered trademarks of microsoft corporation. ? 2000 stmicroelectronics - all rights reserved. purchase of i 2 c components by stmicroelectronics conveys a license under the philips i 2 c patent. rights to use these components in an i 2 c system is granted provided that the system conforms to the i 2 c 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. 53 5 3 |
Price & Availability of ST6BOX
![]() |
|
|
All Rights Reserved © IC-ON-LINE 2003 - 2022 |
[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy] |
Mirror Sites : [www.datasheet.hk]
[www.maxim4u.com] [www.ic-on-line.cn]
[www.ic-on-line.com] [www.ic-on-line.net]
[www.alldatasheet.com.cn]
[www.gdcy.com]
[www.gdcy.net] |