ST7 FAMILY ST7MDT20 EVALUATION BOARD EXERCISE MANUAL Release 1.8 Ref: DOC-ST7MDT20-EVx ST7 FAMILY ST7MDT20 EVAL BOARD EXERCISE MANUAL July 2002 REF- DOC-ST7MDT20-EVx 1 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. ST7 MDT20 Evaluation Board Exercise Manual for the ST7 MDT20 Eval Board INTRODUCTION This document is intended for people getting started with ST7 microcontrollers or who are writing ST7 Assembly or C Code for the first time. It gives practical guidelines for performing the exercises using the ST7 MDT20 Eval Board and allows users to get to know ST7 peripherals and software tools. The "MCU ON CD" CD-ROM containing the tutorial exercises is included in this package. The tutorial exercise installation procedure will create all the resource files (located in the INIT directory) and source files for the solutions (located in the RESULT directory) on the PC hard disk drive, as well as the batch files required to compile, assemble and link. This manual and the associated exercises are also available on ST Internet site (http://mcu.st.com). To simplify the use of the Hiware C exercises, select the default configuration when installing the software. To install the tutorial exercises, insert the MCUonCD into the disk driver, the autorun program is then executed. Click on "Install your Development Tools", then click on "ST7 Tools", finally click on "Tutorial exercises". To help explain the exercises, the MDT20 Evaluation Board may be used. This evaluation board is described in the following sections. Two MDT20 evaluation boards are available: ST7MDT20-EVY/xx: that's the one which was existing under the previous sales type: ST7MDT2-TRAIN/xx with the socket Yamaichi (IC149) mounted on it (refer to 1.3 Connection). You have to use the DB200 adaptor to be able to put the emulator (EMU2B) probe (with the DB389 adaptor) or a device (with the DB379 adaptor). The "xx" stands for the power supply type (EU, UK or US). ST7MDT20-EVC/xx: that's the new board with the CAB socket mounted on it, avoiding to use adaptors to work in emulation mode or device mode. The CAB socket is also delivered with the EMU3 emulators supporting the TQFP64 14*14 package. Rev. 1.8 July 2002 5/33 Table of Contents INTRODUCTION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 1 ST7 MDT20 EVAL BOARD DESCRIPTION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 1.1 OVERVIEW . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 1.2 POWER SUPPLY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 1.3 CONNECTION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 1.3.1 ST7MDT20-EVY/xx (Yamaichi socket) . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 1.3.2 ST7MDT20-EVC/xx (CAB socket) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 1.4 OSCILLATION SYSTEM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 1.5 CAN DEVICE COMMUNICATION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 1.6 SPI SERIAL COMMUNICATION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 1.7 ISP (IN-SITU PROGRAMMING) CONNECTION . . . . . . . . . . . . . . . . . . . . . . . . 13 1.8 SCI DEVICE COMMUNICATION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 1.9 I/O PORT FUNCTIONS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 1.9.1 1.9.2 1.9.3 1.9.4 1.9.5 1.9.6 Port A Port B Port C Port D Port E Port F ...... ...... ...... ...... ...... ...... .................................... .................................... .................................... .................................... .................................... .................................... . . . . . . . . . . . 14 . . . . . . . . . . . 14 . . . . . . . . . . . 14 . . . . . . . . . . . 14 . . . . . . . . . . . 15 . . . . . . . . . . . 15 1.10JUMPER DESCRIPTION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 1.10.1Jumper J2 - External Voltage Supply . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 1.10.2Jumper J4 - External Oscillator System . . . . . . . . . . . . . . . . . . . . . . . . . . 15 1.10.3Jumper J5 - SCI Enable/Disable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 1.10.4Jumper J6 - MCU Voltage Supply . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 1.10.5Jumper J7 - Buzzer Enable/Disable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 1.10.6Jumpers J9, J10, J11 - LED Enable/Disable . . . . . . . . . . . . . . . . . . . . . . 16 1.10.7ISP Connector . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 1.10.8NMI Pull-down/Pull-up . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 2 SOFTWARE INSTALLATION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 33 6/33 Table of Contents 2.1 ST7 ASSEMBLY TOOLCHAIN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 2.2 STVD7 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 2.3 HIWARE AND COSMIC DEMO VERSIONS . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 2.4 TUTORIAL EXERCISES . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 3 TRAINING EXERCISES . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 3.1 EXERCISE 1: ASSEMBLER SYNTAX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 3.2 EXERCISE 2: USE OF THE 16-BIT TIMER IN ASSEMBLY LANGUAGE . . . . 21 3.3 EXERCISE 3: USE OF THE 16-BIT TIMER IN HIWARE C LANGUAGE . . . . . 22 3.3.1 Purpose of the Exercise . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 3.3.2 How to Use the Hiware C Demo Program . . . . . . . . . . . . . . . . . . . . . . . . . 24 3.4 EXERCISE 4: USING THE ADC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 3.5 EXERCISE 5: USING THE SPI DRIVER . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 3.6 EXERCISE 6: USING THE SCI DRIVER . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 4 APPENDIX 1: ST72334 REGISTER AND MEMORY MAPPING FILE . . . . . . . . . . . 27 5 APPENDIX 2: SCHEMATIC DIAGRAMS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 7/33 ST7 MDT20 EVAL BOARD DESCRIPTION 1 ST7 MDT20 EVAL BOARD DESCRIPTION The ST7 MDT20 Eval Board has been designed to support either an emulator probe or an ST7 device (FLASH, ROM) in a TQFP package. To do this, a reset system and a 16-MHz crystal are connected to dedicated pins. 1.1 OVERVIEW This board can be used without any modifications to test and verify all the exercises given in this manual. Additional hardware functions can be implemented by installing components in the wrapping zone. For more details refer to the schematic drawing in the appendix. Figure 1. Overview of the ST7 MDT20 Eval Board Power Supply Connector J2: Jumper used to change the reference voltage TQFP-64 connector for emulator probe, FLASH or ROM Ports A to F Output Pins ISP Connector SCI Connector CAN Connector Buzzer 8/33 7-segment LED display connected to PD7:1 Push Buttons tying low pins PA0, PB0, PB4 and PF2 for external interrupts Reset Button Trimmer connected on PD0 SPI Memory & Connector ST7 MDT20 EVAL BOARD DESCRIPTION 1.2 POWER SUPPLY This board is supplied with an AC/DC converter and a 5-volt regulator (V CC = 5 V). The reference voltage can be changed by removing jumper J2 and connecting the new reference voltage as shown in Figure 2. Figure 2. How to Change the Board Reference Voltage From external generator 1 - Remove jumper J2. 2 - Connect the new reference voltage. LM 7805 LM 7805 VCC EXT VCC EXT J2 MDT20 Eval Board J2 MDT20 MDT2 Eval Eval BoardBoard When the emulator probe is connected, the LEDs can be activated (when bits PB7:5 are set) and the port signals will be displayed, even if the board is not powered-on. However, the board must be supplied with 5 Volts (pins VCC & GND) in order for the ADC and push-button switch to be operational. 9/33 ST7 MDT20 EVAL BOARD DESCRIPTION 1.3 CONNECTION 1.3.1 ST7MDT20-EVY/xx (Yamaichi socket) This board is delivered with a Yamaichi socket (IC149). All connectors required for an emulation strategy are included either in the emulator package (DB407, DB389) or in the development kit package (DB404). In order to use the MDT20 in Device mode, contact your nearest ST sales office and order the DB379 connector. 10/33 ST7 MDT20 EVAL BOARD DESCRIPTION 1.3.2 ST7MDT20-EVC/xx (CAB socket) This board is delivered with a CAB socket. This socket has been chosen for EMU3 generation of emulators because they avoid the user to use different adaptors to work in emulation mode or in device mode. In emulation mode, the user has just to remove the socket top and to plug the emulator probe on the CAB socket mounted on the board. In device mode, the user has just to put the device on the socket mounted on the board and to close it with the socket top provided. Page QFP-Socket Cover Series Q2101 44.15 QFP-Base Socket Series Q2001 The QFP-Socket Cover comes with 4 screws M2x6 and the QFP-Base Socket comes with a screwdriver. The Sockets are JEDEC Pad compatible and compact in design. K G Contact Beryllium copper, nickel 2,5 m, gold 0,25 m Series Q2101 Insulator Body Liquid cristall Polymer (LCP), UL 94 V0 Temperature Continual operation -25 to + 85C Resistance to solder heat Reflow 240C, 20 Sec. Vaper phase 220C, 60 Sec. 1 100 100 VRMS < 70 m 8 > 5 x 10 0,5 A Series Q2001 S=Square R=Rectangular H Pins PITCH Mechanical life/cycles Rated Voltage Contact Resistance Insulation Resistance Current Carring Capacity (per contact) K' G' recom. pad design K (C +1,0) G (C - 2D) 0,4 0,4 0,4 0,4 80 100 120 144 S S S S Part No. 3303275 3303231 3303276 3303232 3303277 3303233 3303278 3303234 0,4 156 R 3303235 0,4 0,4 176 256 S S 3303236 3303237 3303280 3303281 0,5 0,5 0,5 0,5 0,5 48 80 100 120 120 S S S S S 3303238 3303239 3303240 3303241 3303241 3303282 3303283 3303284 3303285 3303286 0,5 128 R 3303243 3303287 0,5 0,5 0,5 0,5 0,5 0,5 0,5 0,65 0,65 0,65 128 144 160 176 208 208 240 64 80 80 S S S S S S S S S S 3303242 3303244 3303245 3303246 3303247 3303247 3303248 3303249 3303250 3303250 3303288 3303289 3303290 3303291 3303292 3303293 3303294 3303295 3303296 3303297 0,65 100 R 3303251 3303298 0,65 100 R 3303251 3303299 0,65 100 R 3303251 3303300 0,65 100 R 3303251 3303301 0,65 0,65 0,65 0,65 0,8 0,8 0,8 0,8 100 144 160 168 44 44 64 64 S S S S S S S S 3303252 3303253 3303254 3303255 3303260 3303261 3303256 3303262 3303302 3303303 3303304 3303305 3303311 3303312 3303306 3303307 0,8 80 R 3303257 3303308 0,8 80 R 3303257 3303309 1,0 64 R 3303259 3303310 Q n1' x PITCH PITCH 1 PITCH 6,5(0,5) n1 x PITCH E 13,5(0,5) Series Q2101 7,0 Series Q2001 C C' 0,2 1,85 Q Q' D S A B A' B' M2 A A' B B' C C' 19,00 21,00 23,00 25,00 23,55 29,55 29,00 37,50 17,00 21,00 23,00 29,00 29,00 24,00 30,00 27,00 29,00 33,00 33,00 37,00 37,00 41,00 22,10 24,10 24,10 23,75 30,25 23,75 30,25 23,75 30,25 23,75 30,25 28,10 38,70 38,70 38,70 19,70 19,70 23,70 23,70 23,70 30,10 23,70 30,10 23,80 29,80 12,65 14,65 16,60 18,65 17,20 23,20 22,65 31,15 10,65 14,65 16,60 22,65 22,65 17,65 23,65 20,65 22,65 26,65 26,65 30,65 30,65 34,65 15,75 17,75 17,75 17,40 23,90 17,40 23,90 17,40 23,90 17,40 23,90 21,75 31,70 31,70 31,70 13,35 13,35 17,35 17,35 17,35 23,75 17,35 23,75 17,45 23,45 D E 12,1 14,1 16,0 18,1 16,1 22,1 22,1 30,6 0,5 0,5 0,5 0,5 0,18 0,18 0,18 0,20 0,2 0,2 0,2 0,2 0,5 0,18 0,2 0,5 0,5 0,20 0,18 0,2 0,2 9,1 14,1 16,0 22,05 22,05 16,1 21,1 20,1 22,05 26,1 26,1 30,1 30,1 34,1 14,6 16,6 16,6 16,25 22,75 16,25 22,75 16,25 22,75 16,25 22,75 20,6 30,6 30,6 30,6 12,2 13,3 17,3 16,2 17,3 23,3 17,3 23,3 17,2 23,2 0,5 0,5 0,5 0,5 0,5 0,23 0,25 0,23 0,25 0,25 0,25 0,25 0,25 0,25 0,25 0,5 0,25 0,25 0,5 0,5 0,5 0,5 0,5 0,5 0,5 0,8 0,8 0,8 0,25 0,25 0,23 0,23 0,23 0,23 0,25 0,25 0,25 0,25 0,25 0,25 0,25 0,25 0,25 0,25 0,25 0,35 0,35 0,35 0,5 0,25 0,35 0,5 0,25 0,35 0,5 0,25 0,35 0,5 0,25 0,35 0,8 0,8 0,8 0,8 0,5 0,75 0,75 0,5 0,25 0,23 0,23 0,23 0,5 0,25 0,25 0,25 0,35 0,35 0,35 0,35 0,5 0,5 0,5 0,5 H 0,75 0,25 0,5 0,75 0,25 0,5 0,75 0,25 0,6 Q Q' S 11,22 13,20 15,42 17,22 15,40 21,40 21,20 30,00 0,18 0,18 0,18 0,18 8,40 13,40 15,12 21,20 21,80 15,40 21,40 19,40 21,20 25,24 25,24 29,40 30,00 33,90 13,95 15,80 15,35 16,57 23,07 15,35 21,25 15,91 21,85 16,77 23,07 21,00 30,30 30,30 30,30 11,20 12,22 16,20 15,20 16,20 22,40 15,96 22,00 16,60 22,60 0,18 0,18 0,18 0,18 0,18 0,18 0,18 0,18 0,18 0,18 0,18 0,18 0,18 0,18 0,18 0,18 0,23 0,23 0,23 0,25 0,25 0,25 0,25 0,23 0,23 0,23 0,23 0,25 0,23 0,30 0,25 0,30 0,30 0,30 n1 n1' 19 24 29 35 31 45 43 63 11 19 24 29 29 25 37 31 35 39 43 51 51 59 15 19 19 19 29 19 29 19 29 19 29 24 35 39 41 10 10 15 15 15 23 15 23 12 18 Pitch Q' Q2001 Q2101 3303279 Please check Dimension Q because several versions are availiable. cab-Produkttechnik GmbH & Co KG, Postfach 19 04, D-76007 Karlsruhe, Telefon +49/721/6626-0, Fax +49/721/6626-219, www.cabgmbh.com 11/33 ST7 MDT20 EVAL BOARD DESCRIPTION 1.4 OSCILLATION SYSTEM The ST7MDT20 Eval Board is designed to be used with an on-board 16-MHz crystal. But another clock signal can be used by connecting the corresponding oscillator to the OSCIN pin. To do this, remove jumper J4 and connect the external clock signal generator to the OSCIN pin as shown in Figure 3. Figure 3. How to Change the Oscillator Frequency From external generator XT1 XT1 16 MHz J4 1 - Remove jumper J4. MDT20 Eval Board 16 MHz J4 2 - Connect the external clock signal. MDT20 Eval Board 1.5 CAN DEVICE COMMUNICATION A CAN transceiver (L9615 or U435) is connected to the microcontroller CAN pin (pins PE2 and PE3). In order to supply power to the CAN transceiver, the "APPLI VDD" jumper must be connected to the W5 connector. The Rx_CAN pin of the MCU can be disconnected from the transceiver by removing jumper J12 and the CAN speed is selected according to the configuration of jumper W4. A 120-ohm terminating resistor is validated when jumper J13 is connected. 1.6 SPI SERIAL COMMUNICATION An external EEPROM memory with an SPI serial interface is connected to the SPI pins of the ST7 socket as shown in the following figure. But the serial EEPROM can be disconnected and the SPI bus used for other communications. This hardware configuration is explained in Application Note AN970 "SPI Communication Between ST7 and E2PROM". 12/33 ST7 MDT20 EVAL BOARD DESCRIPTION Figure 4. How to Use the SPI Connection Using the SPI Bus Using the embedded SPI EEPROM M95040 M95040 2 1 2 1 ST7 SPI pins MDT20 Eval Board GND MOSI MISO SCK PB3 SPI JP8 Install all the jumpers on the SPI connector. ST7 SPI pins MDT20 Eval Board GND MOSI MISO SCK PB3 SPI JP8 Remove the jumpers and use the left-hand side connector. 1.7 ISP (IN-SITU PROGRAMMING) CONNECTION The ISP connector is used to program Flash devices using ISP protocol. If an ST programming tool is being used, connector JP1 must be plugged to the cable provided by the ST programming tool and the board has to be powered-on. Figure 5. ISP Connections ST Programming Tool Cable Other Programming Tool Cable ISPDATA ISPCLK RESET ISPSEL JP1 2 1 10 9 ISP 2 1 10 9 ISP JP1 MDT20 Eval Board MDT20 Eval Board This connector can also be used with a tool other than the one provided by ST. In this case, use the connections as described in Figure 5. 13/33 ST7 MDT20 EVAL BOARD DESCRIPTION 1.8 SCI DEVICE COMMUNICATION The DB9 connector can be used to link the ST7 MDT20 Eval Board to a PC, for example. A "MAX232" component is used to fit the ST7 TTL output to the line level of a PC serial connector. 1.9 I/O PORT FUNCTIONS All I/O port pins are accessible through external connectors (connector JP3 for port A, JP4 for port B, JP5 for port C, JP6 for port D, JP2 for port E, JP7 for port F). 1.9.1 Port A The PA0 pin can be used to generate an external interrupt (EI0). It is connected to the ground through push-button switch SW1. Pins PA2 and PA3 are used to validate the 7-segment LED displays (useful for multiplexing). 1.9.2 Port B Pins PB5, PB6, PB7 are connected to 3 LEDs. Pins PB0 and PB4 can be used to generate an external interrupt (EI2 and EI3). These pins are connected to the ground through push-button switches SW3 and SW4. Table 1. Port B Alternate Functions (ST72511 only) PB0 PB1 PB2 PB3 PB4 PWM3 PWM2 PWM1 PWM0 ARTCLK PWM Output 3 PWM Output 2 PWM Output 1 PWM Output 0 PWM-ART External Clock 1.9.3 Port C Table 2. Port C Alternate Functions PC0 PC1 PC2 PC3 PC4 PC5 PC6 PC7 OCMP2_B OCMP1_B ICAP2_B ICAP1_B MISO MOSI SCK SS Timer B Output Compare 2 Timer B Output Compare 1 Timer B Input Capture 2 Timer B Input Capture 1 SPI Master In Slave Out Data SPI Master Out Slave In Data SPI Serial Clock SPI Slave Select 1.9.4 Port D This port is connected to the 7-segment LED which is validated with a `1' logical value on pins PA2 and PA3. 14/33 ST7 MDT20 EVAL BOARD DESCRIPTION Table 3. Port D Alternate Functions PD0 PD1 PD2 PD3 PD4 PD5 PD6 PD7 AIN0 AIN1 AIN2 AIN3 AIN4 AIN5 AIN6 AIN7 Analog Input 0 Analog Input 1 Analog Input 2 Analog Input 3 Analog Input 4 Analog Input 5 Analog Input 6 Analog Input 7 1.9.5 Port E This port is connected to both the SCI transceiver (ST232 or MAX232) and the CAN transceiver (available only on ST72511, ST72512, ST72532), as described in the following table. Table 4. Port E 0Alternate Functions PE0 PE1 PE2 PE3 TDO RDI CANTX CANRX SCI Transmit Data Out SCI Receive Data In CAN Transmit Data Output CAN Receive Data Input 1.9.6 Port F The PF2 pin can be used to generate an external interrupt (EI1). It is connected to the ground through the push-button switch. Table 5. Port F Alternate Functions PF0 PF1 PF3 PF4 PF5 PF6 PF7 CLKOUT BEEP OCMP2_A OCMP1_A ICAP2_A ICAP1_A EXTCLK_A Main Clock Output (Fosc/2) Beep Signal Output Timer A Output Compare 2 Timer A Output Compare 1 Timer B Input Capture 2 Timer B Input Capture 1 Timer A External Clock Source 1.10 JUMPER DESCRIPTION 1.10.1 Jumper J2 - External Voltage Supply Please refer to Section 1.2. 1.10.2 Jumper J4 - External Oscillator System Please refer to Section 1.4. 15/33 ST7 MDT20 EVAL BOARD DESCRIPTION 1.10.3 Jumper J5 - SCI Enable/Disable In order to use the SCI peripheral device, these 2 jumpers must be connected; otherwise, it is recommended that they be removed from the board. Please refer to Figure 4. 1.10.4 Jumper J6 - MCU Voltage Supply This jumper is dedicated to the MCU power supply only. When it is removed, it can be used, for example, to measure the current consumption of the MCU by connecting a DC-ammeter in parallel. 1.10.5 Jumper J7 - Buzzer Enable/Disable This jumper enables the buzzer to be used once it is connected to pin PF1. 1.10.6 Jumpers J9, J10, J11 - LED Enable/Disable These 3 jumpers are used to connect the three LEDs (D5, D6 and D7) to pins PB5, PB6 and PB7. It is recommended that the jumpers be removed from the board if this feature is not used. 1.10.7 ISP Connector Please refer to Section 1.7. 1.10.8 NMI Pull-down/Pull-up A pull-down (or, pull-up) is applied on pin NMI if a jumper is connected between pins 2-3 (or, pins 1-2) on the board. 16/33 SOFTWARE INSTALLATION 2 SOFTWARE INSTALLATION The following software packages must be installed in order to do the exercises: - ST7 Assembly Toolchain, - STVD7 Debugger, - C-Compiler (Hiware and Cosmic Evaluation versions). 2.1 ST7 ASSEMBLY TOOLCHAIN The ST7 Assembly Toolchain can be directly installed on the PC using the "MCU ON CD" CDROM (Welcome.exe file) or downloaded from the ST Internet site (http://mcu.st.com). When the installation is completed, click on the Finish button and then reboot the PC so that that the autoexec.bat modifications can be taken into account. 2.2 STVD7 The STVD7 is the new 32-bit debugger developed by ST. This is a basic IDE (Integrated Development Environment) tool, which is used to edit, build and debug applications in a single environment. The STVD7 program can be directly installed on the PC using the "MCU ON CD" CD-ROM (Welcome.exe file) or downloaded from the ST Internet site (http://mcu.st.com). 2.3 HIWARE AND COSMIC DEMO VERSIONS These two third-party companies have developed a C-compiler for use with ST7 microcontrollers. An evaluation version of each compiler can be directly installed on the PC using the "MCU ON CD" CD-ROM (Welcome.exe file) or downloaded from each of their respective Internet sites (http://www.hiware.com and http://www.cosmic-software.com). 2.4 TUTORIAL EXERCISES The exercises can be installed using the "MCU ON CD" CD-ROM ("Install your Development Tools", "ST7 Tools", "ST Demo Boards" and "ST7 Evaluation Board"). 17/33 TRAINING EXERCISES 3 TRAINING EXERCISES 3.1 EXERCISE 1: ASSEMBLER SYNTAX The purpose of the first exercise is to improve your knowledge of ST7 Assembler syntax and the STVD7 environment. 1. Launch the STVD7 Simulator: Configure the Toolchain paths as requested. The ST assembly toolchain path is already entered. For Hiware, the correct path is C:\Hiware\prog and for Cosmic: C:\Program Files\cosmic software\st7eval\cxst7 (if the default paths were selected during the installation procedure). A Browse function is also available to find the correct path. Create a new project: - Click on "File, New Workspace" and enter the requested information (see Figure 7.) - Click on the "Source Directory" tab in the Workspace window and double click on the directory: the default user directory is selected by default. 2. Modify the files located in the following directory (C:\exercise\init\asm, see Figure 6.) to correct the assembler syntax. Some syntax errors have been introduced by replacing correct directives or lines of code by `?????'. 3. When the file has been corrected, write the compile.bat batch file to assemble, link and create a new *.s19 file (assign a new name to the file). The batch file also generates the S19, SYM, MAP and OBJ files. For further assistance, please refer to the Technical Manual. 4. Then, click on "Project, Build", or directly on the Build shortcut, to build your application. 5. Detected errors are listed in the Output window. Click on the error to display the line of code. Correct the error and then rebuild. 6. To debug, simply click on the blue "D" displayed in the toolbar. Then select "Tools, MCU Configuration" in order to configure the MCU (ST72334N4) and the option byte (Watchdog software,...). Now, the rest is up to you... 18/33 TRAINING EXERCISES Figure 6. Assembler Syntax Resource Files 19/33 TRAINING EXERCISES Figure 7. STVD7 New Workspace Project Settings 20/33 TRAINING EXERCISES 3.2 EXERCISE 2: USE OF THE 16-BIT TIMER IN ASSEMBLY LANGUAGE Starting with a similar program frame (New Project: File, New Workspace), design a software program for the ST72334N4 that: 1. Generates a PWM signal on pin PF4 (40-kHz frequency, 20% duty cycle). 2. Generates an interrupt every period and toggles pin PB0 defined as a push-pull output (square wave at 20 kHz). Refer to the ST72334 datasheet for the correct use of the timer in PWM mode. Since the MCU uses a 16-MHz crystal, it must be configured in Normal mode and the "Divider by 2" function must be selected for the timer clock in order to have the best accuracy. Write a main program that: - Configures pin PF0 as a push-pull output. - Enters the calculated value for the pulse length and the period length in TAOC1R and TAOC2R registers using the datasheet formula. - Configures the 16-bit timer in PWM mode. - Enables the interrupt process and waits for interrupts. Write an interrupt routine that toggles pin PFO and clears interrupt flags ICF1and ICF2. In this exercise, the entire structure is given, but only the comment lines have been kept. The correct ST7 code must be written by using only the comments. 3. Check the validity of your software program by displaying the signal on pins PF0 and PF4 with an oscilloscope or by using the ST7 Waveform Editor after an STVD7 simulation. When an application is run on the simulator, a port.out file that contains all the pin changes is automatically generated. It is used to check the operation of the application without using any hardware. 21/33 TRAINING EXERCISES The following timing diagram should be obtained: Figure 8. PWM Timing Diagram PF4 PF0 0 25 50 t (us) The hardware registers and mapping file (ST72334.asm) are printed in the appendix. The labels of the hardware registers are also listed in this section. The resource files are shown in Figure 9. Figure 9. Timer Resource Files 3.3 EXERCISE 3: USE OF THE 16-BIT TIMER IN HIWARE C LANGUAGE 3.3.1 Purpose of the Exercise The purpose of this exercise is to use the Hiware C Toolchain to write a program that performs the same PWM functions as in the previous exercise, but using the following resources. 22/33 TRAINING EXERCISES Figure 10. C-Language Timer Resource Files The linker parameter file (enviro.prm) and the makefile (enviro.mak) file have been placed in the working directory. If an editor such as Winedit is used in place of the STVD7 program, please refer to Application Note AN 989 `Starting with ST7 Hiware C' available on Internet (http://mcu.st.com. Then select "ST7", "Technical Documentation", "Application Notes".) The Default.env and Project.ini files are used to configure the Hiware C Toolchain and the text editor. These two files are automatically created by the Hiware setup program in the Configuration dialog box. All files are ready-for-use, except for the main.c and itenviro.c files. In order to be able to use these files, the following procedure must be completed: In the main.c file, write the instructions that: - Configure pin PF0 as a push-pull output. - Enter the calculated value for the pulse length and the period length in TAOC1R and TAOC2R registers using the datasheet formula. - Configure the 16-bit timer in PWM mode. - Enable the interrupt process and wait for interrupts. 23/33 TRAINING EXERCISES Write an interrupt function in itenviro.c file that: - Toggles pin PFO. - Clears interrupt flags ICF1 and ICF2. 3.3.2 How to Use the Hiware C Demo Program The Hiware C Compiler demo can be directly installed on the PC using the "MCU ON CD" CDROM (Welcome.exe file) or downloaded from their Internet site (http://www.hiware.com). When the installation is completed, open the HIWARE TOOLS icons in the group of HIWARE demo icons (Start Menu) and click on the first icon displayed in the Hiware tools toolbar. Figure 11. HiWare Tools Toolbar This icon opens the Configuration dialog box. Click on New button and enter the application directory (C:\exercise\init\C334) and the various tabs (refer to Application Note AN989), then click on OK. This action creates or updates the project.ini and default.env files located in the application directory. An editor is not required for the Hiware Tool box which is just used to create the default.env and project.ini files. Once the Hiware configuration parameters are entered, open the STVD7 program (simulator or development kit) and create a new project by specifying the Hiware toolchain in the project settings window. The correct configuration is listed in the technical manual. 3.4 EXERCISE 4: USING THE ADC The purpose of this exercise is to write lines of code in C language that are able to read an analog voltage and to show the result in hex value on the two 7-segment LED displays by multiplexing. The the ST72334 C-environment is located in the C:\exercise\init\ADC directory. Click on the "ADC.wsp" project in this directory and the resource files are displayed as shown in Figure 12. 24/33 TRAINING EXERCISES Figure 12. ADC Resource Files Only the "main.c" program must be completed, according to the explanatory comments. Table "tab[16]" contains the configuration for the 7-segment LED displays. When addressing tab[i], the corresponding digit i is accessed when PDDR is pushed. Label "lab1" is an infinite loop. It starts a new conversion, waits until it is completed, and store the tens and ones unit value into the i and j registers. Then, it outputs the i and j values on Port D, and decreases a counter so that the result is displayed on the LEDs. Then, it starts again. A high level on output PA3 (output PA2, respectively) selects the tens (ones, respectively) value on the dedicated 7-segment LED display. 3.5 EXERCISE 5: USING THE SPI DRIVER The purpose of this exercise is to use the SPI driver to program the embedded SPI EEPROM. The structure of the main module and the batch file for efficient HIWARE C language compiling as well as the ST72334 resource directory are located in the SPI directory. First, open the "SPI.wsp" project file. The resource files are displayed as shown in Figure 13. Figure 13. SPI Resource Files 25/33 TRAINING EXERCISES You have to complete the "main.c" and "itenviro.c" programs, according to the explanatory comments. The first step is to send "value[3]" into the EEPROM, starting at the address 0x00. Each value has to be displayed on the 7-segment LED display. Then, by pressing push-button switches EI1, EI2 or EI3, the previously sent value must be read at the 0x00, 0x01 and 0x02 addresses, and the result must be displayed on the 7-segment LED display in hex value. If the 0x00 EEPROM memory address is read, LED PB5 has to light up; LEDs PB6 or PB7 LED have to light up if the 0x01 or 0x02 memory addresses are read. 3.6 EXERCISE 6: USING THE SCI DRIVER The purpose of this exercise is to use the SCI driver to communicate with your PC, with the help of the "Hyperterminal" software. The parameters for this software program must be correctly configured before use. 1) Click on "File Properties" and select the correct COM port. 2) In the "Settings" menu, check the "Windows Keys" and "ANSI Emulation" check boxes. 3) In "File Properties Configure", set the following parameters: "Bits per second: 19200", "Data bits: 8", "Parity: None", "Stop bits: 1", "Flow control: None". The ST72334 environment in HIWARE C language is located in the ex_SCI directory. First, open the "SCI.wsp" project file. Figure 14. SCI Resource Files Then, complete the "main.c" program, according to the explanatory comments. The first step is to send "title[ ]" to the PC. Then, wait for eight characters to be entered before sending it back to the PC. Afterwards, the program starts over, and eight new characters must be entered. 26/33 APPENDIX 1: ST72334 Register and Memory Mapping File 4 APPENDIX 1: ST72334 REGISTER AND MEMORY MAPPING FILE The following lists the content of the hardware register file: ST72334.asm. st7/ ;************************************************************************ ; TITLE: ST72334.ASM ; AUTHOR: CMG Microcontroller Application Team ; DESCRIPTION: ST72334 Register and memory mapping ; Define here the micro RAM & ROM Size according to the sales type: ; #define ST72334N2 1 ;=> 8K ROM, 384 bytes RAM also available for ST72334N2 #define ST72334N4 1 ;=> 16K ROM, 512 bytes RAM also available for ST72334N4 ;************************************************************************ ;************************************************************************ BYTES ; following addresses are 8 bit length ;******************************************************************** segment byte at 0-71 'periph' ;******************************************************************** ;********************************************************************** ; I/O Ports registers ;********************************************************************** .PADR DS.B 1 ; port A data register .PADDR DS.B 1 ; port A data direction register .PAOR DS.B 1 ; port A option register DS.B 1 ; not used .PCDR DS.B 1 ; port C data register .PCDDR DS.B 1 ; port C data direction register .PCOR DS.B 1 ; port C option register DS.B 1 ; not used .PBDR DS.B 1 ; port B data register .PBDDR DS.B 1 ; port B data direction register .PBOR DS.B 1 ; port B option register DS.B 1 ; not used .PEDR DS.B 1 ; port E data register .PEDDR DS.B 1 ; port E data direction register .PEOR DS.B 1 ; port E option register DS.B 1 ; not used .PDDR DS.B 1 ; port D data register .PDDDR DS.B 1 ; port D data direction register .PDOR DS.B 1 ; port D option register DS.B 1 ; not used .PFDR DS.B 1 .PFDDR DS.B 1 .PFOR DS.B 1 DS.B 1 reserved0 DS.B 8 ; port F data register ; port F data direction register ; port F option register ; unused 27/33 1 APPENDIX 1: ST72334 Register and Memory Mapping File ********************************************************************** ; Miscellaneous 1 register ;********************************************************************** .MISCR1 DS.B 1 ; miscellaneous register 1 ;********************************************************************** ; SPI registers ;********************************************************************** .SPIDR DS.B 1 ; SPI data register .SPICR DS.B 1 ; SPI control register .SPISR DS.B 1 ; SPI status register reserved1 DS.B 5 ; unused ;********************************************************************** ; Main Clock Registers ;********************************************************************** .MCCSR DS.B 1; Main Clock Control/Status register ;********************************************************************** ; Watchdog Registers ;********************************************************************** .WDGCR DS.B 1 ; Watchdog control register .CRSR DS.B 1; clock, reset, supply control/status register ;********************************************************************** ; EEPROM Register ;********************************************************************** .EECSR DS.B 1 ; Data-EEPROM Control/Status register reserved2 DS.B 4 ; unused ;********************************************************************** ; Timer A registers ;********************************************************************** .TACR2 DS.B 1 ; timer A control register 2 .TACR1 DS.B 1 ; timer A control register 1 .TASR DS.B 1 ; timer status register .TAIC1HR DS.B 1 ; timer A input capture 1 high register .TAIC1LR DS.B 1 ; timer A input capture 1 low register .TAOC1HR DS.B 1 ; timer A output compare 1 high register .TAOC1LR DS.B 1 ; timer A output compare 1 low register .TACHR DS.B 1 ; timer A counter high register .TACLR DS.B 1 ; timer A counter low register .TAACHR DS.B 1 ; timer A alternate counter high register .TAACLR DS.B 1 ; timer A alternate counter low register .TAIC2HR DS.B 1 ; timer A input capture 2 high register .TAIC2LR DS.B 1 ; timer A input capture 2 low register .TAOC2HR DS.B 1 ; timer A output compare 2 high register .TAOC2LR DS.B 1 ; timer A output compare 2 low register ;********************************************************************** ; Miscellaneous 2 register ;********************************************************************** .MISCR2 DS.B 1 ; miscellaneous register 2 ;********************************************************************** ; Timer B registers ;********************************************************************** .TBCR2 DS.B 1 ; timer B control register 2 .TBCR1 DS.B 1 ; timer B control register 1 .TBSR DS.B 1 ; timer B status register .TBIC1HR DS.B 1 ; timer B input capture 1 high register 28/33 APPENDIX 1: ST72334 Register and Memory Mapping File .TBIC1LR DS.B .TBOC1HR DS.B .TBOC1LR DS.B .TBCHR DS.B .TBCLR DS.B .TBACHR DS.B .TBACLR DS.B .TBIC2HR DS.B .TBIC2LR DS.B .TBOC2HR DS.B .TBOC2LR DS.B 1 1 1 1 1 1 1 1 1 1 1 ; timer B input capture 1 low register ; timer B output compare 1 high register ; timer B output compare 1 low register ; timer B counter high register ; timer B counter low register ; timer B alternate counter high register ; timer B alternate counter low register ; timer B input capture 2 high register ; timer B input capture 2 low register ; timer B output compare 2 high register ; timer B output compare 2 low register ;********************************************************************** ; SCI registers ;********************************************************************** .SCISR DS.B 1 ; sci status register .SCIDR DS.B 1 ; sci data register .SCIBRR DS.B 1 ; sci baud rate register .SCICR1 DS.B 1 ; sci control register 1 .SCICR2 DS.B 1 ; sci control register 2 .SCIERPR DS.B 1 ; sci extended receive prescaler register DS.B 1 ; reserved .SCIETPR DS.B 1 ; sci extended transmit prescaler register reserved5 DS.B 24 ; unused ;********************************************************************** ; ADC registers ;********************************************************************** .ADCDR DS.B 1 ; adc data register .ADCCSR DS.B 1 ; adc control status register ;********************************************************************** segment byte at 80-FF 'ram0' ;Zero Page ;********************************************************************** WORDS ; following addresses are 16 bit length ;********************************************************************** ; for ST72334J2 or ST72334N2 with 8K ROM & 384 bytes RAM #ifdef ST72334N2 segment byte at 100-1FF 'stack' segment byte at E000-FFDF 'rom' ; #endif ;********************************************************************** ;********************************************************************** segment byte at C00-CFF 'eeprom' ;EEPROM area ;********************************************************************** ;********************************************************************** ; for ST72334J4 or ST72334N4 with 16K ROM & 512 bytes RAM ; #ifdef ST72334N4 segment byte at 100-1FF 'stack' segment byte at 200-27F 'ram1' 29/33 APPENDIX 1: ST72334 Register and Memory Mapping File segment byte at C000-FFDF 'rom' #endif ;********************************************************************** ;********************************************************************** segment byte at FFE0-FFFF 'vectit' ;********************************************************************** end 30/33 D 1 1 1 PB6 PB7 2 4 6 8 10 B2S 2 2 2 R13 4K7 R12 4K7 ISP ENA 1 3 5 7 9 2 J11 B2S 2 R6 R5 R4 1K8 1K8 1K8 VCC yP VCC yP + Vin SW EI1 SW2 1K R15 EI3 SW4 EI2 SW3 C1 100 yF-EA-25V JP1 J10 B2S J9 4K7 R10 10K RV1 VCC PB5 VCC VCC PHONEJACK 2 3 1 1N4004 POWER_12V D2 C23 100PF C14 100NF C13 100NF C25 100PF C24 100PF PC6 ISPCLK 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 U2 PF0 NMI VOUT 3 MC0 MCO 1 J8 2 VCC EXT NMI 1 J3 1 D7 LED-Red-3mm-2ma D6 LED-Red-3mm-2ma ST72511R PC6 PC4 PC5 PB3 SCK MISO MOSI PE4 (HS) CANRX / PE3 PE5 (HS) CANTX / PE2 RDI / PE1 PE6 (HS) TDO / PE0 PE7 (HS) Vdd_2 PB0 / PWM3 OSC1 PB1 /PWM2 PB2 / PWM 1 EI 2 OSC2 PB3 / PWM0 Vss_2 NMI PB4 / ARTCLK nc PB5 EI 3 /Reset PB6 Vpp PB7 PA7 (HS) AIN0 / PD0 PA6 (HS) AIN1 / PD1 PA5 (HS) AIN2 / PD2 PA4 (HS) AIN3 / PD3 Vss_1 AIN4 / PD4 Vdd_1 AIN5 / PD5 PA3 AIN6 / PD6 PA2 AIN7 / PD7 EI 0 PA1 Vdda PA0 Vssa /SS / PC7 Vdd_3 SCK / PC6 Vss_3 MOSI / PC5 PF0 / MCO E I 1 MISO / PC4 PF1 / BEEP ICAP1_B / PC3 (HS) PF2 ICAP2_B / PC2 (HS) PF3 / OCMP2_A OCMP1_B / PC1 (HS) PF4 / OCMP1_A OCMP2_B / PC0 (HS) PF5 / ICAP2_A Vss_0 PF6 (HS) / ICAP1_A Vdd_0 PF7 (HS) / EXTCLK_A D5 LED-Red-3mm-2ma PF0 PF1 PF2 PF3 PF4 PF5 PF6 PF7 PE4 PE5 PE6 PE7 PB0 PB1 PB2 PB3 PB4 PB5 PB6 PB7 PD0 PD1 PD2 PD3 PD4 PD5 PD6 PD7 ISPSEL /RESET PC4 VIN ISPDATA C2 100NF 1 GND 2 1 2 1 2 1 64 63 62 61 60 59 58 57 56 55 54 53 52 51 50 49 48 47 46 45 44 43 42 41 40 39 38 37 36 35 34 33 PA3 PA2 PA1 PA0 PC7 PC6 PC5 PC4 PC3 PC2 PC1 PC0 /RESET ISPSEL PA7 PA6 PA5 PA4 NMI PE3 PE2 PE1 PE0 J4 OSC EXT C4 15PF C3 100NF 2 + R3 4K7 JP8 C22 2 4 6 8 10 VCC yP C6 100NF SPI ENA 1 3 5 7 9 Y1 EI0 SW1 R9 VCC VCC 4K7 R17 10K 4 3 2 1 VCC VCC 2 D 5 6 7 8 R2 4K7 VCC + + VCC C9 1yF 16V C15 1yF 16V C12 1yF 16V PB0 PB1 PB2 PB3 PB4 PB5 PB6 PB7 + RTS 1 2 3 1 2 3 W1 VCC 2 8 HEADER 1 2 3 4 5 6 7 8 JP3 B2S J6 2 J5B B2S C M95040 Vss /W 1 J5A B2S VCC 1 1 PA0 PA1 PA2 PA3 PA4 PA5 PA6 PA7 Q /HOLD /S U8 NMI VCC VCC yP 100NF R1 330 RES_4922 R14 4K7 C8 C7 15PF SW5 /RESET LED-GREEN D1 VCC yP C11 100NF 100PF C26 16 mhZ C5 100 yF-CT-16V 100PF 1 J1 1 3 2 1 2 1 VCC C1+ C1C2+ C2V+ V- C27 100PF C16 1yF 16V 1 3 4 5 2 6 PD1 PD2 PD3 PD4 PD5 PD6 PD7 PA3 MAX232 U3 R1IN R2IN T1IN T2IN VCC yP 13 8 11 10 PC0 PC1 PC2 PC3 PC4 PC5 PC6 PC7 8 HEADER 1 2 3 4 5 6 7 8 JP4 1 2 3 4 5 6 7 2 D1 D2 D3 D4 D5 D6 D7 15 16 12 9 14 7 2 1 Q1 3BC547A 2V4 D3 7 Seg VCC BUZZER LS1 U4 GND VCC R1OUT R2OUT T1OUT T2OUT 1 PD0 PD1 PD2 PD3 PD4 PD5 PD6 PD7 8 HEADER 1 2 3 4 5 6 7 8 JP5 GND 8 2 1 C10 100NF 1 PE0 PE1 PE2 PE3 PE4 PE5 PE6 PE7 B2S J7 2 8 HEADER 1 2 3 4 5 6 7 8 JP6 PF1 PD1 PD2 PD3 PD4 PD5 PD6 PD7 1 2 3 4 5 6 7 2 D1 D2 D3 D4 D5 D6 D7 U5 1 Q2 3BC547A 2V4 D4 7 Seg CONNECTOR DB9 P1 PA2 5 9 4 8 3 7 2 6 1 PF0 PF1 PF2 PF3 PF4 PF5 PF6 PF7 8 HEADER 1 2 3 4 5 6 7 8 JP2 GND 8 J2 + U1 LM7805/TO RES_4922 VDD_APPLI PE3 PE2 PF3 PF2 PF0 8 HEADER 1 2 3 4 5 6 7 8 JP7 PF1 RTS PF4 TP6 CON5 1 2 3 4 5 APPENDIX 2: SCHEMATIC DIAGRAMS 5 APPENDIX 2: SCHEMATIC DIAGRAMS Figure 15. MDT20 Eval Board (Part 1) . 31/33 32/33 RES_4 922 VDD_APPLI + W5 2 4 6 VDD V2 V3 Vin MW2X3C 1 3 5 POWER C20 10yF-CT-16V VDD_CAN RES_4922 VCC RTS INT DOUT DIN SCLK CAN[0..3] CH TL CL TH VDD 1 2 4 6 8 2 1 2 3 4 5 6 7 8 9 10 U435 GND V1 V2 V3 VS CH TL CL TH GND U6 MW2X1C W3 MW2X4C 1 3 5 7 W2 GND WA KE INT RES SCKL DIN DOUT TxD RxD GND RES_435 PF4 PF0 PF1 PF2 PF3 20 19 18 17 16 15 14 13 12 11 + SCLK DIN DOUT INT C17 10y F-CT-35V 10K R16 G1 GOUTTE CONTACT PE3 PE2 C19 10yF-CT-16V PF3 RES_REG + V2 PF0 PF2 PF1 TL CL CH TH RTS + V3 PF4 3.9K R7 3.9K R8 1 2 J12 B2 S C18 1yF-CT-25V C21 100NF VDD 2 1 F AST SLOW 2 1 TP1 1 2 3 4 W4 3 2 1 1 ASC C_H C_L RX1 2 J13 B2S L9615 TX0 GND Vs RX0 U7 3 2 1 8 7 6 5 VDD 120 R11 CAN SPEED SELECT VDD_CAN 2 1 5 9 4 8 3 7 2 6 1 2 1 TP5 CAN P2 C_L C_H APPENDIX 2: SCHEMATIC DIAGRAMS Figure 16. MDT20 Eval Board (Part 2) APPENDIX 2: SCHEMATIC DIAGRAMS "THE PRESENT NOTE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS WITH INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE CONTENT OF SUCH A NOTE AND/OR THE USE MADE BY CUSTOMERS OF THE INFORMATION CONTAINED HEREIN IN CONNEXION WITH THEIR PRODUCTS." 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 2002 STMicroelectronics - All Rights Reserved. Purchase of I2C Components by STMicroelectronics conveys a license under the Philips I2C Patent. Rights to use these components in an I2C system is granted provided that the system conforms to the I2C Standard Specification as defined by Philips. STMicroelectronics Group of Companies Australia - Brazil - Canada - China - Finland - France - Germany - Hong Kong - India - Israel - Italy - Japan Malaysia - Malta - Morocco - Singapore - Spain - Sweden - Switzerland - United Kingdom - U.S.A. http://www.st.com 33/33