About ST
Products
Applications
Support
Buy
News & Events
ST Worldwide
Contact Us
Login
User Manuals
|
Microcontrollers
|
8-bit Microcontrollers
|
ST6 - 8-bit Microcontrollers
ST62 noise immunity demonstration board
User Manual
Format:
(736 kb)
or
(23 kb)
Last Updated: 21/02/2008
Pages: 23
Related Datasheets
ST6215C/ST6225C - 8-BIT MCUS WITH A/D CONVERTER, TWO TIMERS, OSCILLATOR SAFEGUARD & SAFE RESET
Raw Ascii Text
- (
Hide
)
(Unformatted textual content of the document used by search engines)
USER MANUAL
ST62 NOISE IMMUNITY DEMONSTRATION BOARD
1 INTRODUCTION
This demonstration board is a tool designed to show the noise immunity of ST62 microcontrollers. It allows you to promote the ST62 noise immunity features and to prove with a live demonstration that this microcontroller family still works in noisy environments. The different ST62 features demonstrated with this board are: Oscillator Safe Guard functions with LFAO (Low frequency Auxiliary Oscillator) Digital Watchdog Operation Low Voltage Detector function Noise protection between I/O ports cells Input protection diode circuits Effect of power supply variations Saving data to EEPROM
Rev. 1.2
July 2001
This is preliminary information on a new product in development or undergoing evaluation. Details are subject to change without notice.
1/23
1
Table of Contents
1 INTRODUCTION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 2 BOARD CHARACTERISTICS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 3 BOARD INSTALLATION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 3.1 BOARD CONNECTION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 3.2 LIST OF ST62 CHIPS PROVIDED . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 3.3 SOFTWARE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 3.4 SLIDES AND USER MANUAL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 4 USING THE BOARD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 4.1 GENERAL OPERATION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 4.2 OSG-LVD DEMO . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 4.3 I/O-ADC DEMO . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 5 PARTS LIST . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 6 BOARD SCHEMATICS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 7 PIN DESCRIPTION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 8 ST6225/ST6230 FLOW CHARTS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 9 7-SEGMENT DISPLAY TABLE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
23
2/23
1
INTRODUCTION
The supplied package contains hardware and software resources for learning how to use, present or modify this demonstration board. The package includes the following: The ST62 Noise Immunity Demonstration Board Three pre-programmed chips (two ST6225 devices and one ST6230) A 'Plug-in' power supply pack (9V DC) The "MCU on CD" CD-ROM This user manual Demonstration presentations (slides) This low cost board is easy to use and needs no external equipment. This manual describes how to install your demoboard, how it works and the demonstration possibilities it offers. You can use the slides provided with the package to present the demonstration board and to go th r o u gh some demonstration examples. These slides also present ST62 features like the OSG, LVD, Digital Watchdog, etc, that are especially useful in noisy environments.
3/23
1
BOARD CHARACTERISTICS
2 BOARD CHARACTERISTICS
Hardware features: MCU socket (U4) for ST6225 and ST6230 microcontrollers 8-MHz standard crystal & 24-MHz noise oscillator (selectable by switch SW2) Oscillator cut off switch (SW1) with blinking LED (LD1) "Plug-in" power supply pack connected to jack (J1) or 9V DC to connector (J2) 2 potentiometers: Vcc variation (R22) & ADC conversion input (R24) LEDs (LD4-LD8): Vcc level indicator 7-segment display (U2 & U3): frequency indication & ADC conversion result Reset push-button (SW4) LED (LD11) and buzzer (BZ1) for Reset state warning Demo selection (SW6) through the NMI pin Demo indication LEDs (LD9 & LD10) Noise source (selectable by switch SW3) Voltage spike generation (9V) Negative and positive over-voltage detection LEDs (LD2 & LD3) External noise source input connector (U5) Software trap push-button (SW5)
U4 LD1 Ext. Osc No Osc. 24 MHz SW1 Osc. SW2 8 MHz ST6225/ ST6230 Noise Selection +-9V No Ext. SW3 Noise U5 O v e r +v o -l t a g e U2 U3
LD3 LD2 Power Supply Indicator LD4 . . . . LD8 R22 R24 SW4 S W5
BZ1
LD9
LD10
J1
O GLVD I/OADC SSW6 LD11 Power/ Reset J2
Power Supply Analog. Variation Value.
Reset
Software. Trap.
Demo Selection
4/23
1
BOARD INSTALLATION
3 BOARD INSTALLATION
This part explains how to install your board using the different features provided within the ST62 Noise Immunity Demonstration Board package. Once the board is installed, refer to the next part for the description of the demonstrations. 3.1 BOARD CONNECTION First plug an ST62 device in the U4 socket (ST6225/ST6230). You may choose any of the three devices supplied with the package (see next paragraph). Then you connect your 'plug-in' power supply pack to the J1 board jack and to the mains. Alte rn a tivel y you can connect any 9V DC power supply to the J2 connector. The LD11 LED (POWER/RESET) goes on, showing the board is powered on. You can start any of the demos, as described in Section 4. 3.2 LIST OF ST62 CHIPS PROVIDED Three different chips are supplied in the demonstration board package: 1. ST6225 with no OSG, no LVD, no Watchdog, 2. ST6225 with LVD, Watchdog, but no OSG, 3. ST6230 with OSG, Watchdog, and EEPROM. T h e s e options are chosen by programming the option bytes (OSG, LVD, Watchdog for ST6225 microcontroller, and OSG, Watchdog for ST6230 microcontroller). The EEPROM is not available for the ST6225 and the LVD is not available for the ST6230. The se option bytes also implement internal pull-up resistors on the NMI pin and on the I/O ports (ST6230) at reset. Note: Three different "options.hex" files are provided and installed for each part by the ST62 Noise Immunity Setup available on the "MCU on CD" CD-ROM. You can use them if you want to program another part.
5/23
1
BOARD INSTALLATION
3.3 SOFTWARE T h e .st6 files show the source code for the ST6225 (demo25.st6) and the ST6230 (dem o3 0.st6). These files can be used to understand the way the demonstrations are handled. They can also be modified to change the demonstrations if you want to. These files have been compiled and linked using the RIDE IDE from Raisonance. You can either install them using the "MCU on CD" CD-ROM or download a free evaluation version from the Raisonance website: http://www.raisonance.com. T h e .hex files can be used to program EPROM parts (demo25.hex for the ST6225 and d e m o 3 0 .h e x for the ST6230). The eeprom.hex file must be used to program the ST6230 EEPROM. The ST62 chips supplied with the demoboard are already programmed. Use these files only if you need to program new chips. Do not forget to program the microcontroller option bytes depending on the options you want on your chip (see Section 3.2). To program your own ST62 chips, you can use the ST622x and ST623x Starter Kits or EPROM Programmers for example. 3.4 SLIDES AND USER MANUAL Both documents present this board and how to use it. The user manual is intended to help you to understand the various features of the demonstration board, how to install it, and list all the items present in the complete package provided with the board. The slides present the different demonstrations available with the board and the ST62 noise protection features (OSG, LVD, etc.).
6/23
1
USING THE BOARD
4 USING THE BOARD
This part describes how to use the various features of the board. Please refer to the slides to get more details about the way you can use these functions to demonstrate the ST62 noise protection features. 4.1 GENERAL OPERATION The LD11 bicolour LED (POWER/RESET) turns green when the board is receiving powered on and turns red when the microcontroller is in Reset state. The BZ1 buzzer emits a beep each time the microcontroller changes state (Normal --> Reset or vice-versa). The LD1 LED (EXT. OSC) blinks when one of the external crystals is connected to the microcontroller oscillator. This LED is off when there is no external clock driving the microcontroller (crystal cut-off). The SW4 push-button (RESET) generates a Reset on the ST62 external RESET pin. It can be used to initialize the microcontroller and to recover if it goes out of control. The SW5 push-button (SOFTWARE TRAP) puts the program in an infinite loop. It demonstrates the Digital Watchdog recovery feature. Two different demonstrations are available on this demoboard. To choose between them, you must press the SW6 push-button (DEMO SELECTION). These demos are explained in the following sections. 4.2 OSG-LVD DEMO The LD9 LED (OSG-LVD) shows that this demo has been chosen. Otherwise, it is the LED LD10 which is on (I/O-ADC demo). This first demo displays an ascending sequence of numbers (from 00 to 99) on the two 7-segment displays U2 and U3. The three functions of the Oscillator Safe Guard (OSG) are demonstrated: Overfrequency: by switching the SW2 switch, a 24-MHz crystal is used instead of the standard 8-MHz crystal. There is no change of behaviour visible on the 7-segment display if the OSG option has been selected on the chip. LFAO: by switching the SW1 switch, both external crystals are cut off. The LD1 blinking LED (EXT. OSC) is off in this case, indicating that there is no external oscillator connected to the microcontroller. The Low Frequency Auxiliary Oscillator (LFAO) takes over from the crystal if the OSG option is present (numbers on the 7-segment displays appear more slowly). Frequency depending on Vcc: the R22 potentiometer (POWER SUPPLY VARIATION) causes the microcontroller power supply to vary from 0 to 5 V (voltage level indicated on the LD4-
7/23
1
USING THE BOARD
LD8 LEDs: POWER SUPPLY INDICATOR). With the OSG option, the microcontroller internal frequency varies with the Vcc drop, slowing the 7-segment display. Th e same R22 potentiometer is used to demonstrate the Low Voltage Detector function (LVD). The microcontroller enters Reset state when Vcc is too low (around 3.8V). It exits this state and recovers normal program flow when Vcc is high enough (around 4.1V). 4.3 I/O-ADC DEMO The LED LD10 (I/O-ADC) shows that this demo has been selected by the SW6 push-button (DEMO SELECTION). This demo displays an analog value on the 7-segment displays (hexadecimal value from 00h to FFh). This value comes from the R24 potentiometer (ANALOG VALUE) analog voltage converted by the ST62 ADC. You can change the value displayed by turning the potentiometer. This demo aims at showing that this ADC conversion is not perturbed by any noise present on other ports. So, you can add noise on I/O ports to show the value displayed does not change. The three different noise sources are selected by the SW3 switch (NOISE SELECTION): 9V: a 9V square wave with 2 mA current injection is generated on board and connected to an I/O port when this position is chosen on the switch. EXT: the noise source is external. It is a signal connected by the user to the board through the U5 connector (NOISE). You can test any signal, but please stay within ST62 specificatio ns. NO: this switch position disconnects any noise source from the microcontroller input. It is useful to show that it makes is no difference to the functionality if noise sources are connected or not. The two LEDs LD2 and LD3 (OVERVOLTAGE) indicate that there is an overvoltage on the I/O port where the noise source is connected. One LED is on when there is a positive overvolta ge and the other is on when there is a negative overvoltage.
8/23
1
PARTS LIST
5 PARTS LIST
P art BZ1 C 1, C 2 C3, C 9 C4, C 6, C11, C12 C5,C8 C7, C 10 D1,D2,D3,D4,D5,D6,D7 D8,D9,D10 J1 J2 LD1 LD2,LD3 LD4,LD5,LD6,LD7,LD8 LD9,LD10 LD1 1 R1, R 25 R2, R 11, R14, R15, R21 R3 R4 R5, R 10 R6 R7,R8,R23 R9 R12,R16,R17 R13,R20 R18 R 19 R22,R24 R26 R27 S W 1, S W 2 S W3 S W 4, S W 5, S W 6 T1 T2 Device B uz z er 22PF 47 0N F 10MF 10 0N F 1M F 1N4 148 1N 4 1 4 8 JACK circles connector LED-RED-5MM-wink LED-GR EEN-3MM LE D - R E D - r e c t LE D-RE D-5M M LED-bicolour 22 0 4. 7K 10 0K 22 0K 3. 3K 47 0 1K 8. 2K 33 0 61.9K 330-SIL10-5R-B 3.3K-SIL10-5R 10K-RV 68 0 10 0 SW-2XON/ON SW-slide-ON/OFF/ON S W-P U S H 2N2222A-NPN-40V 2N2907-PNP-40V P ar t U1,U6 U2,U3 U4 U5 U7 U8 U9,U11,U14 U1 0 U1 2 U1 3 U1 5 U1 6 W 1,W 2 XT 1 XT 2 Z1 D evice 7 4A LS 244 7SEG-POINT-DISP ST6225/ST6230 socket connector LF351 T S 912 LM393 7 4HC04 D G2 0 1 7 4HC123 L 7805 I CL76 60 MW1X1 8MHZ-XT-P 24MH Z-XT-P D Z 5.6V
9/23
1
7 1
3
BOARD SCHEMATICS
3+ 2-
3
-HVpulse 74HC04 V+HVpulse V+
Figure 1. Main Shematic
4 5
1
6 BOARD SCHEMATICS
SW5 SW-PUSH R10 3.3K DG201 R11 4.7K R8 1K
3.3K
T1 2N2222A-NPN-40V 2 1
8
5 1
4 2
Watchdog
1 2 3 4 5 6 7 8 IN1 D1 S1 VGND S4 D4 IN4 IN2 D2 S2 V+ NC S3 D3 IN3
16 15 14 13 12 11 10 9
4
3
3
2
1
+HVpulse
potentiometer Vccup 7-segment I/O1.[1..7] I/O2.[1..7] I/O2.[1..7] I/Oreset Reset {Value} PinReset Analog Buzzer I/O1.[1..7] H_Vcc {Value} V+ R14 4.7K 3
R2
R6 470
SW3
Noise
2
1
VCC 1 T2 2N2907-PNP-40V
3
4.7K R3 100K U5 1 VCC oscillator GND BORNIER OSCin OSCout {Value} 0
R7 1K
SW-glissièreON/OFF/ON
I/O2.1 I/O2.2 I/O2.3 I/O2.4 I/O2.5 I/O2.6 I/O2.7
I/O1.1 I/O1.2 I/O1.3 I/O1.4 I/O1.5 I/O1.6 I/O1.7
V+ R24 10K-RV C5 V+
LD3 LED-GREEN-3MM
2
2
1
1
supply VCC Vcc Vss R23 U10A U12 6 1 2 U8A TS912 +3 2 1K R4 +HV 220K {Value} U7 LF351 VCC -HV R5 C3 470NF R9 8.2K R22 10K-RV Z1 1 DZ 5.6V U4 V+ Demos3 R17 330 74HC04 LD10 LED-RED-5MM U10B 4 R16 330 2 R15 4.7K LD9 LED-RED-5MM -HVpulse Support ST6225 1 2 3 OscIN 4 OscOUT Pushdemo 5 6 7 Buzzer 8 Analog Watchdog 9 10 Test 11 Reset 12 I/O2.7 13 I/O2.6 14 I/O2.5 Vdd TIMER OSCin OSCout NMI Ain/PC7 Ain/PC6 Ain/PC5 Ain/PC4 TEST RESET Ain/PB7 Ain/PB6 Ain/PB5 Vss PA0 PA1 PA2 PA3 PA4/Ain PA5/Ain PA6/Ain PA7/Ain PB0/Ain PB1/Ain PB2/Ain PB3/Ain PB4/Ain VNoise Demos I/O1.1 I/O1.2 I/O1.3 I/O1.4 I/O1.5 I/O1.6 I/O1.7 I/O2.1 I/O2.2 I/O2.3 I/O2.4 28 27 26 25 24 23 22 21 20 19 18 17 16 15 Test V100NF OscIN OscOUT
10/23
SW6 SW-PUSH
5 1
4 2
Pushdemo
C10 + 1MF
SW4 SW-PUSH
5 1
4 2
Reset
+ C7 1MF
VCC
D7 1N4148
LD2 LED-GREEN-3MM
D8 1N4148
VCC 2 A U1 led1.[1..7] I/O1.[1..7] F G E D H AFF-7SEG-POINT 1G 2G 74ALS244 6 5 U10C PinReset R26 680 green cathode red LED-bicolour 2 74HC04 1 R27 100 1 19 VCC H9 VCC led1.1 led1.2 led1.3 led1.4 led1.5 led1.6 led1.7 1Y1 1Y2 1Y3 1Y4 2Y1 2Y2 2Y3 2Y4 1A1 1A2 1A3 1A4 2A1 2A2 2A3 2A4 18 16 14 12 9 7 5 3 I/O1.1 I/O1.2 I/O1.3 I/O1.4 I/O1.5 I/O1.6 I/O1.7 2 4 6 8 11 13 15 17 A B BC D E F CG led1.1 led1.2 led1.3 led1.4 led1.5 led1.6 led1.7 14 3
D6
D5
D4
U2
1
2 1
2 1
1N4148
1N4148
1N4148
1 13 10 8 7 2 11
LD11 3 R25 220
VCC 2 A U6 F G led2.[1..7] E D H AFF-7SEG-POINT H9 VCC led2.1 led2.2 led2.3 led2.4 led2.5 led2.6 led2.7 led2.1 led2.2 led2.3 led2.4 led2.5 led2.6 led2.7 1Y1 1Y2 1Y3 1Y4 2Y1 2Y2 2Y3 2Y4 1G 2G 74ALS244 U13A CEXT C4 10MF R13 61.9K 14 VCC 1 19 1A1 1A2 1A3 1A4 2A1 2A2 2A3 2A4 18 16 14 12 9 7 5 3 2 4 6 8 11 13 15 17 I/O2.1 I/O2.2 I/O2.3 I/O2.4 I/O2.5 I/O2.6 I/O2.7 14 3
D3
D2
D1
U3
1
2 1
2 1
1N4148
1N4148
1N4148
Figure 2. 7-Segment Displays & Reset Management
A B BC D E F CG
1 13 10 8 7 2 11
I/O2.[1..7]
2
D10 1N4148
13 Q Q 74HC123 VCC 4 A B CLR VCC CEXT 6 C6 10MF
1
REXT/CEXT 1 2 3
15
BZ1 1 U13B
2
buz-
buz+
Buzzer REXT/CEXT 5 Q Q 74HC123 12 A B CLR 9 10 11 7
R20 61.9K
2
BOARD SCHEMATICS
VCC
1
+ +
I/Oreset R21 4.7K
D9 1N4148
11/23
1
8
2
5
1
1
3
4
BOARD SCHEMATICS
X1 T
SW 2
2
2 7 5+ 6-
1 UB 9
6
R 9A 1 3.3K-SIL10-5R
4
6
24M Z-XT-P H
SWDR IT-2XO /O -O NN
3
4
8
5
R 9C 1 3.3K-SIL10-5R
4
6
7
8
8
9
J2 1 Vcc 2 Gd n +H V U5 1 L7805 1 Input O tput 2 u VCC M 1X1 W C 8 100N F W 2 1 pin M 1X1 W W 1 1 pin Vcc
sup
2 3 1
C 9 470N F
JAC K
U16
3
Ground
J1
+ C11 10M F -HV
1 2 Boost ap+ 3 Cround 4G C pa
8 V+ 7 Osc 6 LV 5 Vout
Vss
+
IC 7660 L
C2 1 10M F
10
4
1
R2 1 VCC 9 7 5 3 1 330-SIL10-5R B UA 9 LM 93 3 1 LD 4 LED-R Drect E10 8 6 4 2 VC C R1 220 H Vcc _ LED R D 5M -wnk -E- M i 3+ 2330 R8 1 LD 1 SW 1 SWD OT-2XO /O -RI NN LD 5 LED R D rect - ELM 93 3 R 9B 1 3.3K-SIL10-5R VCC C 2 22PF 1 Vccup 3+ 2U 1A 1 LM 93 3 LD6 LED R D rect - ELD 7 LEDRED rect -7 U 1B 1 5+ 6LM 93 3 R 9D 1 3.3K-SIL10-5R VCC U 4A 1 LM 93 3 1 LD 8 LED R D-rect -E 3+ 2R 9E 1 3.3K-SIL10-5R
12/23
Figure 3. Voltmeter
O Cin S
O Cout S
8M Z-XT-P H
3
X2 T
5
4
C1 22PF
PIN DESCRIPTION
7 PIN DESCRIPTION
U4
V+ OSCin OSCout Pushdemo Buzzer Analog Watchdog Test Reset I/02.7 I/02.6 I/02.5 X X
V DD TIMER OSCin OSCout NMI Ain/PC7 Ain/PC6 Ain/PC5 Ain/PC4 TEST RESET Ain/PB7 Ain/PB6 Ain/PB5
1 2 3 4 5 6 7 8 9 10 11 12 13 14
ST6225
28 27 26 25 24 23 22 21 20 19 18 17 16 15
VSS PA0 PA1 PA2 PA3 PA4/Ain PA5/Ain PA6/Ain PA7/Ain PB0/Ain PB1/Ain PB2/Ain PB3/Ain PB4/Ain
VNoise Demos I/01.1 I/01.2 I/01.3 I/01.4 I/01.5 I/01.6 I/01.7 I/02.1 I/02.2 I/02.3 I/02.4
U4
V+ OSCin OSCout Pushdemo Buzzer Analog Watchdog Test Reset I/02.7 I/02.6 I/02.5 X X
VDD TIMER OSCin OSCout NMI Ain/PC7 Ain/PC6 Ain/PC5 Ain/PC4 TEST/VPP RESET Ain/PB6 Ain/PB5 Ain/PB4
1 2 3 4 5 6 7 8 9 10 11 12 13 14
ST6230
28 27 26 25 24 23 22 21 20 19 18 17 16 15
VSS PA0 PA1 PA2/OVF PA3/PWM PA4/Ain/CP1 PA5/Ain/CP2 PD1/Ain/Scl PD2/Ain/Sin PD3/Ain/Sout PD4/Ain/RXD1 PD5/Ain/TXD1 PD6/Ain PD7/Ain
VNoise Demos I/01.1 I/01.2 I/01.3 I/01.4 I/01.5 I/01.6 I/01.7 I/02.1 I/02.2 I/02.3 I/02.4
Noise: noise input (either on-board or external noise source). Demos: demo output indicator/selector (0 for OSG-LVD demo and 1 for I/O-ADC). I/O1.1-7: 7-segment first digit driver (0 to switch off and 1 to switch on). I/O2.1-7: 7-segment second digit driver (0 to switch off and 1 to switch on). Reset: 'Reset' push-button input (Reset pin). Watchdog: 'Software Trap' push-button input. Analog: 'Analog Value' potentiometer input. Buzzer: Monostable buzzer driver. Pushdemo: 'Demo Selection' push button input (NMI pin).
13/23
1
ST62 25/ST6230 FLOW CHARTS
8 ST6225/ST6230 FLOW CHARTS
Figure 4. Main Program for ST6225 Register definition. Table definition (coded digits).
Reset
INITIALIZATION: Interrupts Digital Watchdog Ports A,B,C Demo = OSG-LVD
OSG _LVD
V R 02130A
14/23
1
ST6225/ST6230 FLOW CHARTS
Figure 5. OSG-LVD for ST6225
INITIALIZATION: ADC powered dow n Watchdog refreshed ROM Window
OSG_LVD
Addresses of digits X & Y loaded from EEPROM
Timer initialization
DISP
2-Digit display on ST6230 ports from Table
Se t1
2 digits saved in EEPROM
C ount er = 5 (Tempo = 0.25s)
Incremen t digits addresses (X & Y)
Timer_0
Watchdog refreshed
Timer End of Count? NO D em o = O S G _LV D ?
YES
Loop_0 NO
Decre ment counter
IO_ADC YES
End of Tempo?
YES
NO V R 02130B
15/23
ST62 25/ST6230 FLOW CHARTS
Figure 6. I/O-ADC for ST6225
INITIALIZATION: Timer inhibited ADC activated ROM Window
IO_ADC
Be gin
Start 16 ADC conversions
Divi
16 conversions average
End Res
Watchdog refreshed
LSB calculation
1st digit display on ST6225 ports
MSB calculation
2nd digit display on ST6225 ports Coun ter = 032h (Tempo = 1s)
Carry
Tempo
Watchdog refreshed & 1st tempo loop
Demo = OSG_LVD? NO Cou nt2 Decreme nt counter
YES
OSG_LVD
End of Tempo? NO
YES
V R 02130C
16/23
ST6225/ST6230 FLOW CHARTS
Figure 7. NMI Interrupt for ST6225 Demo Watchdog refreshed
D em o = OSG_LVD? YES C hange1
NO
Demo = I/O-ADC
Demo = OSG-LVD Change2
R ET I Figure 8. Watchdog Interrupt for ST6225 Watchdog
RETI
VR021 30D
Watchdog refreshed
Infinite loop
VR 02130E
17/23
ST62 25/ST6230 FLOW CHARTS
Figure 9. Main Program for ST6230 Registers definition. Table definition (coded digits).
R es et
INITIALIZATION: Inter r upts Digital Watchdog Oscillator ROM & RAM Pages Ports A, B, C, D Pe ripheral Interrupts
Demo loaded from EEPROM
D em o = O S G_ L V D ? NO Demo = I/O-ADC
Y ES
Demo = OSG-LVD
E nd_R es
IO _AD C
O SG_LV D
VR0 2130F
18/23
ST6225/ST6230 FLOW CHARTS
Figure 10. OSG-LVD for ST6230
INITIALIZATION: ADC powered dow n Watchdog refreshed ROM Window
OSG_LVD
Add resse s of digits X & Y loaded fro m EEPROM
Timer initialization
DISP
2 Digits display on ST6230 ports fro m Table
Se t1
2 digits saved in EEPROM
Cou nter = 5 (Tempo = 0.25s)
Increme nt digits addresses (X & Y)
Timer_0
Watchdog refreshed
Timer End of Count?
YES
NO Demo = O S G _LV D ? YES NO
Loop_0
Decrement counter
IO_ADC
End of Tempo?
YES
NO
VR021 30G
19/23
ST62 25/ST6230 FLOW CHARTS
Figure 11. I/O-ADC for ST6230
INITIAL IZATION: Timer inhibited ADC activated ROM Window
B egi n
Start 16 ADC conversions
IO_ ADC
Divi
16 conversions averaged
ADC conversion loaded from EEPROM
E ndR es
Watchd og refreshed
Watchd og refreshed
DI SP2
LSB calculation
1st digit display on ST6230 ports
MSB calculation
2nd digit display on ST6230 ports ADC conversion saved in EEPROM Counter = 032h (Tempo = 1s)
S et 1b
T e m po
Watchd og refreshed & 1st tempo loop
D em o = OSG_ LVD? NO C ount 2 Decrement counter
YES
O S G _LV D
End of Tempo? NO
YES
V R 02130H
20/23
ST6225/ST6230 FLOW CHARTS
Figure 12. NMI Interrupt for ST6230
D em o
Polling: PC 4 = 0 ?
YE S
NO Watchdog refreshed Watc hdog
D em o = OSG_LVD?
NO
YE S C hange1 Demo = I/O-ADC Demo = OSG-LVD C hange2
Demo saved in EEPROM
Demo saved in EEPROM
R ET I
R ET I
VR 02130I
21/23
7-SEGMENT DISPLAY TABLE
Figure 13. Watchdog Interrupt for ST6230
Watchdog Watchdog refreshed
Infinite loop
VR02130J
9 7-SEGMENT DISPLAY TABLE
TABLE: DB 40h, 79h, 24h, 30h, 19h, 12h, 02h, 78h DB 00h, 10h, 08h, 03h, 46h, 21h, 06h, 0Eh This table contains the 16 coded values for one 7-segment digit display. They are ordered from '0' to 'F' (hexadecimal values), where 40h is the coded value of '0' and 0Eh is the coded value of 'F'. So if you want to display '5' for example on one digit of the 7-segment display, you will have to use the sixth number of the table, i.e. 12h. Th is number is equivalent to 00010010b in binary format. Each bit corresponds to one segment of the 7-segment display. Bit 'n' is the value displayed on segment 'n+1' of the 7-segment display (where 0
22/23
7-SEGMENT DISPLAY TABLE
THE SOFTWARE INCLUDED IN THIS NOTE IS FOR GUIDANCE ONLY. STMicroelectronics SHALL NOT BE HELD LIABLE FOR ANY DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM USE OF THE SOFTWARE.
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 2001 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 - China - Finland - France - Germany - Hong Kong - India - Italy - Japan - Malaysia - Malta - Morocco - Singapore - Spain Sweden - Switzerland - United Kingdom - U.S.A. http://www.st.com
23/23
Document Number: 6140