UM0311 User manual
Using the STMPE2402 Port Expander Demonstration Board
Introduction
This document explains how to use the STMPE2402 Port Expander demonstration board that consists of an STMPE2402 Port Expander IC and an ST72F63B microcontroller and includes a PC graphical user interface (GUI). The objective of this demonstration board is to highlight the features and capabilities of the Port Expander chip (STMPE2402) using a Windows-based host software application and one of several USB low-speed microcontrollers (ST72F63B) from STMicroelectronics acting as a control device. The host software and the ST7 source code provide a user-friendly environment for the demo board in the following modes:
Stand-alone mode PC GUI mode
In both modes, power to board can be provided from either the USB bus itself or from an external power supply. In this demo, the ST72F63B microcontroller (MCU) acts as the I2C Master and controls the STMPE2402 port expander functioning as the I2C Slave. The STMPE2402 provides the interface for the LCD, hot key detection and 3 PWM (Pulse Width Modulation) outputs. The built-in Analog-to-Digital Converter (ADC) enables the STMPE2402 to measure environmental conditions such as ambient light and temperature. For visual display of the PWM outputs, LEDs are provided on the board. All these interfaces are controlled by the ST72F63B MCU via the I2C bus. For interfacing with the PC GUI, the application layer is built above the USB core library, making all hardware control of the USB interface transparent for developers. All events such as hot key presses are captured and displayed on the LCD screen and also on the PC GUI. The PC GUI supports the various power-saving modes and wake-up features for the Port Expander. Moreover, the demo board includes a provision for an alternate I2C path for an external control device. The board also has an ICC connector for re-programming the Flash memory of the ST7 microcontroller.
March 2007
Rev 1
1/24
www.st.com
Contents
UM0311
Contents
1 Getting started . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.1 1.2 1.3 1.4 System requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 Package contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 Software installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 Hardware installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
1.4.1 1.4.2 Power supply . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 Jumper settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
2
Running the STMPE2402 Port Expander demo board . . . . . . . . . . . . . . 8
2.1 Running in Stand-alone mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
2.1.1 2.1.2 2.1.3 PWM Output demo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 Hot key detection demo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 Ambient light sensing demo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
2.2
Running in PC GUI mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
2.2.1 2.2.2 2.2.3 2.2.4 2.2.5 2.2.6 2.2.7 2.2.8 Read mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 Write/program mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 Reading the STMPE2402 internal memory . . . . . . . . . . . . . . . . . . . . . . 13 Programming PWM outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 Disable/enable STMPE2402 PWM . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 Changing the frequency of STMPE2402 PWM . . . . . . . . . . . . . . . . . . . 14 Changing PWM frequency using hot keys . . . . . . . . . . . . . . . . . . . . . . . 15 PWM file creation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
2.3
Reset and Low-power modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
2.3.1 2.3.2 Hibernate mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 Sleep mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
2.4
Resetting the demo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
3 4
Using the external I2C master . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 Revision history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
2/24
UM0311
List of figures
List of figures
Figure 1. Figure 2. Figure 3. Figure 4. Figure 5. Figure 6. Figure 7. Figure 8. Figure 9. Figure 10. Figure 11. Figure 12. Figure 13. Figure 14. Figure 15. Figure 16. Figure 17. Figure 18. Figure 19. Figure 20. Figure 21. Figure 22. Figure 23. Figure 24. Figure 25. Figure 26. Figure 27. Figure 28. Install window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 License window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 Folder selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 Installation complete . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 Port expander demo board . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 JP1 and JP2 Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 JP6 Setting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 JP7 Setting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 Hot keys . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 Enumeration result . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 STMPE2402 PC GUI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 PC GUI in Read mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 Read mode functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 Write/Program mode. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 Reading STMPE2402 internal memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 PWM Programming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 Enable/disable PWM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 Frequency selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 PWM File creation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 Ramp registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 Execute ramp-up segment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 Execute ramp-down segment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 Adding flat segment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 PWM Command sequence and its plot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 Reset and low-power modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 Waking Up from Hibernate mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 Waking from Sleep mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 External I2C connector . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
3/24
Getting started
UM0311
1
1.1
Getting started
System requirements
In order to use the STMPE2402 Port Expander demonstration board with the Windows operating system, a recent version of Windows, such as Windows 2000 or Windows XP must be installed on the PC. The version of the Windows OS installed on your PC may be determined by clicking on the "System" icon in the control panel.
1.2
Package contents
The Port Expander demo board includes the following items:
One demonstration board PC executable software (PE_2402_GUI) to be used along with demo board User manual
1.3
Software installation
To install the PC GUI software, perform the following steps: 1. Double-click on the Port Expander demo executable to display the Install dialog box (Figure 1) and click Next. Install window
Figure 1.
2.
Read the software license agreement (Figure 2) and click Yes if you accept the license.
4/24
UM0311 Figure 2. License window
Getting started
3.
Select the folder where you will install the demonstration software (Figure 3). By default, it will install the software in the following location: C:\Program Files\STMicroelectronics\PortExpanderSTMPE2402
Figure 3.
Folder selection
4. 5.
After selecting the folder, click Next to start installing the software. After installing the software, the Installation Complete window appears (Figure 4). Click Finish to complete the installation.
5/24
Getting started Figure 4. Installation complete
UM0311
The software is now installed in the selected directory and a shortcut to the demo software is available in the Start menu. A link to the user manual is also available in the same directory.
1.4
Hardware installation
Figure 5 shows a snapshot of the Port Expander demo board. Figure 5. Port expander demo board
1.4.1
Power supply
DRAFT
The demo board can directly be powered by the USB connector (bus powered) or you can use an external power supply.
6/24
UM0311
Getting started The external power supply should provide a minimum supply of 7V/1A and a maximum power supply of 12V/1A.
1.4.2
Jumper settings
There are seven jumpers (JP1, JP2, JP3, JP4, JP5, JP6 and JP7) available on the board.
JP1 and JP2: Jumpers JP1 and JP2 select between ICC (for programming the ST7 microcontroller) or I2C data lines as shown in Figure 6. JP1 and JP2 Settings
Figure 6.
When (re)programming the ST7 microcontroller, the jumpers must be connected on the ICC side (right side) and when using the board for demonstration, the jumpers must be connected on I2C side (left side).
JP3: Jumper JP3 connects the DAC output to the white LED available in the demo board. JP4: Jumper JP4 can be used to show the voltage measurement. This jumper connects the corresponding analog input to the 1.8V supply. Note that the external voltage source can be connected to this analog input after removing this jumper; but you must keep in mind that the maximum voltage applied to the corresponding pin should exceed 1.8V. JP5: This jumper connects the 32-kHz clock coming from the ST7 microcontroller to the CLKIN pin of STMP2402 Port Expander. Note that an external 32-kHz clock can be used by removing this jumper and then connecting the external clock source. JP6: As shown in the Figure 7, jumper JP6 selects the clock source for the ST7 microcontroller. JP6 Setting
Figure 7.
The default connection of this jumper is the EXT side (left side). This provides the external crystal resonator clock source when the board is used for demonstration. When (re)programming the ST7 microcontroller, connect the jumper on the ICC side (right side) to provide the ICC clock.
As shown in Figure 8, JP7 is used to select the power supply: USB supply or the external board supply.
7/24
Running the STMPE2402 Port Expander demo board Figure 8. JP7 Setting
UM0311
Connect the jumper to the left side to select an external power supply and to the right side to use a USB power supply. There is no restriction as such on using either of the power supplies. You can use the external power supply when using the demo board in the Stand-alone mode and the USB power supply when using the PC GUI or in Standalone mode. So even while providing power to the demo from an external source, you can use the PC GUI but you must connect the PC to the demo board using the USB connector.
2
Running the STMPE2402 Port Expander demo board
The STMPE2402 Port Expander demo board consists of two main parts:
PC GUI Demonstration board
In Stand-alone mode, the demonstration board can be used without the PC GUI. Before using the demo board in either Stand-alone or PC GUI mode, connect the following jumper settings:
Connect JP1 and JP2 to the I2C side (left side) Connect JP6 to the left side to use the external crystal oscillator Connect JP7 to the required power supply
2.1
Note:
Running in Stand-alone mode
Only limited features are available for the demo board in Stand-alone mode. For using the full capability of the demo board, it is necessary to use it along with the PC GUI. In Stand-alone mode, after connecting the power supply, the LCD displays a welcome message within a few seconds indicating that the demo has started correctly. If the LCD does not display a message, a problem has occurred. In this case disconnect the power supply for a few seconds before reconnecting it again. You should now see the message coming on the LCD. If this does not happen even after removing and reconnecting the power supply several times, you need to contact technical support. Once the demo board is started correctly, the LCD displays a series of messages. At the end, you will see a blank LCD screen and all the LEDs will blink. These LEDs are the 3 PWM outputs coming from the STMPE2402 port expander. Now the system is ready to be used and the following demo board features are available.
8/24
UM0311
Running the STMPE2402 Port Expander demo board
2.1.1
PWM Output demo
You can observe the PWM out on an oscilloscope by connecting the probe to the corresponding LED output (there are 3 LED available in the demo board corresponding to each PWM). In Stand-alone mode, the PWM outputs are pre-programmed and cannot be modified.
2.1.2
Hot key detection demo
There are 4 hot keys available on the demo board as shown in Figure 9. When a hot key is pressed, the STMPE2402 sends an interrupt via the I2C bus to the ST7 MCU which in turn reads the status register for the corresponding Hot Key and identifies the key pressed. The LCD displays all hot key press events. Figure 9. Hot keys
2.1.3
Ambient light sensing demo
In Stand-alone mode, you can also discover the ambient light sensing demo which is implemented using the ADU (automatic dimming unit) and DAC (digital-to-analog converter) peripherals available in the STMPE2402 device. For sensing the ambient light, an LDR (light dimming resistor) is available on the demo board. The ADU measures the ambient light and then gives the complementary outputs to the DAC whose amplified outputs drive a white LED on the demo board. You can observe the change in white LED intensity by changing the light intensity at the LDR. This demo is independently controlled by the STMPE2402 device with no interference from the ST7 host.
2.2
Running in PC GUI mode
In addition to the functions described above, a PC graphical user interface (GUI) is also available. To run the GUI, the demo board must first be connected to the PC via the USB cable and then to a power supply (Jumper JP7).
9/24
Running the STMPE2402 Port Expander demo board
UM0311
When correctly connected, you should find the demo board enumerated as an HID device as shown in Figure 10 and board is ready for use. If this message does appear, contact technical support. Figure 10. Enumeration result
After launching the STMPE2402 PC GUI demo software, the PC displays a graphical interface (Figure 11) for controlling the demonstration board. This PC software is used to issue various commands and to transfer data between the PC and the ST7 peripheral. The LED display at the lower right-hand corner of the PC GUI (Figure 11) indicates if the board is correctly connected. Red means that the board is not connected and Green means that board is correctly connected. The PC GUI operates in one of two possible modes:
Read mode Write/Program mode
In addition to these two modes, there are 2 power-down options available in the GUI for switching the STMPE2402 into Power-down mode. A Reset option is also available which resets the default settings of the demo board. For more information, see Section 2.3: Reset and Low-power modes on page 18.
10/24
UM0311 Figure 11. STMPE2402 PC GUI
Running the STMPE2402 Port Expander demo board
2.2.1
Read mode
To enter Read mode, click the Read icon as shown in Figure 12. Figure 12. PC GUI in Read mode
11/24
Running the STMPE2402 Port Expander demo board
UM0311
In Read mode, you can observe hot key press events in the Hot Key Detection pane on the PC as well as on the LCD screen of the demo board. You can also observe ambient light intensity, ambient temperature and voltage data as shown in Figure 13. Figure 13. Read mode functions
The accuracy of these measurements can be further improved as no calibrations are performed by the ST7 Host firmware to compensate for errors. In Read mode, all functions related to Write/Program mode remain disabled. However, Low Power mode is operational.
12/24
UM0311
Running the STMPE2402 Port Expander demo board
2.2.2
Write/program mode
To enter Write/Program mode, click the Write/Program icon as shown in Figure 14. Figure 14. Write/Program mode
When entering Write/Program mode, Write mode becomes active and all scanning activity stops.
2.2.3
Reading the STMPE2402 internal memory
To read the internal memory of a particular STMPE2402 slave device, enter the 8-bit hexadecimal address in the Address box of the "Memory Read" pane, select the correct number of bits, and then click Read to display the returned data in hexadecimal format as shown in Figure 15. Figure 15. Reading STMPE2402 internal memory
13/24
Running the STMPE2402 Port Expander demo board
UM0311
2.2.4
Programming PWM outputs
The Port Expander demo board includes 3 PWM (Pulse Width Modulation) outputs coming from the STMPE2402 device. To program the outputs, click Open in the PWM Programming pane and load the correct PWM file (*.pex). Select the correct PWM output from the dropdown menu and click Program to program the selected PWM LED output as shown in Figure 16.
Note:
See Section 2.2.8: PWM file creation on page 15 for more information on PWM files. In this demo, this programs the corresponding PWM output in infinite repetition mode. The LCD screen displays a message that confirms that the output is correctly programmed. You can observe the PWM signal on an oscilloscope by connecting a probe at the programmed LED output. In the event of a programming error, the corresponding PWM LED will stop blinking on the demo board. Figure 16. PWM Programming
2.2.5
Disable/enable STMPE2402 PWM
You can disable/enable PWM outputs by selecting the corresponding output and then clicking Disable or Enable as shown in Figure 17. Figure 17. Enable/disable PWM
2.2.6
Changing the frequency of STMPE2402 PWM
You can change the global frequency of each of the PWM outputs. Select the correct frequency (32, 100, 200 or 400 kHz) from the drop-down menu next to the corresponding PWM and then click Write to confirm the value as shown in Figure 18. You can verify the change in frequency by observing the blinking rate of the LED or by using an oscilloscope and connecting a probe to the corresponding PWM output.
14/24
UM0311 Figure 18. Frequency selection
Running the STMPE2402 Port Expander demo board
2.2.7
Changing PWM frequency using hot keys
You can also use hot keys to change the PWM frequency. Table 1 lists the hot key associations for updating the frequency of the corresponding PWM. Table 1. PWM Hot Key associations
Hot Key Up Left Right PWM Output PWM1 PWM2 PWM3
After pressing the selected hot key, the firmware updates the corresponding PWM frequency based on the voltage measured at the fixed resistor R4 resistive bridge (connected to 1.8V supply on other side) and the variable resistor VR1 by the Channel 1 of the STMPE2402 ADC. By changing the value of VR1, the PWM frequency changes. This feature is not implemented in Stand-alone mode.
2.2.8
PWM file creation
You can create PWM files to program PWM outputs using the PWM File Creation pane (Figure 19).
Note:
Section 2.2.4: Programming PWM outputs on page 14 describes how to select PWM files. Figure 19. PWM File creation
To create a PWM file, first set the global frequency from the drop-down menu. Then click View Register to set the values for the different ramp registers that define the different ramp rates for the various segments (Figure 20).
15/24
Running the STMPE2402 Port Expander demo board Figure 20. Ramp registers
UM0311
There are 3 different segments which you can add to your PWM output.
Execute RU Execute RD Execute Flat
Execute RU
Click Execute RU to display a dialog box and select the appropriate ramp-up values from the drop-down menus as shown in Figure 21. Figure 21. Execute ramp-up segment
After selecting the ramp-up values, click Set to display the effects of this selection. To confirm the selected values and save them in the PWM file, click OK.
Execute RD
Click Execute RD to display a dialog box and select the appropriate ramp-down values from the drop-down menus as shown in Figure 22.
16/24
UM0311
Running the STMPE2402 Port Expander demo board Figure 22. Execute ramp-down segment
After selecting the ramp-down values, click Set to display the effects of this selection. To confirm the selected values and save them in the PWM file, click OK.
Execute flat
Click Execute Flat to display a dialog box and select the appropriate ramp rate and flat duration from the drop-down menus as shown in Figure 23. Figure 23. Adding flat segment
After selecting the flat values, click Set to display the effects of this selection. To confirm the selected values and save them in the PWM file, click OK.
Viewing the PWM File
After adding a segment, click Cmd Seq to view the effect of the corresponding segment as shown in Figure 24.
17/24
Running the STMPE2402 Port Expander demo board Figure 24. PWM Command sequence and its plot
UM0311
The upper pane displays the command sequence. To display the corresponding plot, click Plot. The plot in Figure 24 shows the segments to be added for getting the sine wave from PWM. In the event of an error in the PWM program, the plot will not appear and an error message will appear. This will not stop you from creating the file. After adding the all the required segments (the instruction size must remain lower than or equal to 32 bytes, otherwise you will get an error message), click End in the PWM File Creation pane before clicking Generate to save your PWM file. This file is 41 bytes; the first 32 bytes are the PWM program, the 33rd byte is the information for PWM frequency and the last 8 bytes correspond to ramp rate registers values.
2.3
Reset and Low-power modes
The Port Expander demo board supports two low-power modes:
Hibernate mode Sleep mode
The STMPE2402 slave device can either be reset or set to Hibernate or Sleep mode by clicking the corresponding button on the GUI as shown in Figure 25. Figure 25. Reset and low-power modes
18/24
UM0311
Running the STMPE2402 Port Expander demo board
2.3.1
Hibernate mode
In Hibernate mode, all PWMs are stopped and hot key presses are not detected. To wake up the demo from Hibernate mode, click WakeUp. As the demo comes out of the power-down mode, it displays a message in the dialog box as shown in Figure 26. Figure 26. Waking Up from Hibernate mode
In the STMPE2402, registers are reset in Hibernate mode, hence they are re-initialized after waking up from this mode. Therefore after waking up from Hibernate mode, you will again see the PWM outputs running according to the original program.
2.3.2
Sleep mode
In Sleep mode, the PWM keeps running as these outputs are controlled by the 32-kHz clock. To wake up the demo from Sleep mode, you can either click WakeUp or press a Hot Key. You can observe the corresponding message in the dialog box as shown in Figure 27. Figure 27. Waking from Sleep mode
2.4
Resetting the demo
You can reset the demo by clicking the Reset button on the demo board. This will reset the demo to its initial state.
19/24
Using the external I2C master
UM0311
3
Using the external I2C master
You can also use an external I2C Master device to control the STMPE2402 port expander by configuring pins available on connector J1 as shown in Figure 28. Figure 28. External I2C connector
Perform the following steps to enable the use of an external master device: 1. 2. 3. 4. First set up the demo board as described in Section 2.2: Running in PC GUI mode on page 9. Now jumpers JP1 and JP2 to disconnect the I2C connections from ST7 Host. This is required to prevent conflicts due to I2C operations performed by the demo itself. Connect the SCL and SDA line available on jumper J1. To control the Interrupt line from the STMPE2402, use PA4 for INT (Slave interrupt line). PA5 does not need to be connected.
Now the STMPE2402 demo board is ready to be controlled using the external I2C master device. In this mode, the PC GUI will not be available for use by the the external user. To access STMPE2402, the specified slave address is 0x8A. After using the external I2C master, if you want to return to normal mode, perform the following steps: 5. 6. 7. Remove all connections as mentioned in Steps 3 and 4 above. Connect the I2C connections using Jumper JP1 and JP2 (Section 1.4.2: Jumper settings). Click the Reset button on the demo board to re-initialize the demo.
Note that the I2C lines work using a 5V power supply. YOu must ensure that the external I2C Master also uses a 5V power supply.
20/24
UM0311
V CC S1 JP1 S2 1V 8 GND
R4
2V 8 S3 2 S4 1
PWM -1 R17
LD2 R10
1 3 2 1 1 3k3 2 1k 1
GND ICCDATA PA1 R2 SDA
R9
1 2 Q1 2STR1215 3 220E
2
2
1
R13
V CC
3k3 2 3k3
R8 R11
3k3
CON1
C3
HEADER 3 JP2
ICCCLK PA2 R3 SCL
4k7 4k7
Appendix A
1 2 3 4 3 2 1 F6 F5 F4 F3 F2 F1 E6 E5 E4 HEADER 3 V R1 10k U2 1 2 2
LD1 R12
PWM -2 I O10 2V 8 I O8 I O0 SDA -1 PWM -3 PWM -1 I O9
USBV DD USBDM USBDP V SSA
4.7uF/25V
C10
100nF
USB-B-TY PE 4k7 JP3 1V 8 I O12 I O10 V CC28 I O8 I O0 SDA TA I O13 I O11 I O9 1
PWM -2 R18
USBDM
R1
USBV CC
1K 5
LD3
1 3
R14
V CC
U1 2
220E
C1
V CC
33pF STM PE2402 U3
R15
Y1
RT1 4.7k LDR1 LDR >9k
R27
220E
2 1k 1
Q2 2STR1215
330E
C2 R7
DAC
12M Hz 220E
R22
V DDA USBV CC USBDM USBDP V SSA PA0 PA1
t
33pF 4k7
R6
OSC_EXT
IO17 RST INT 2V 8 ADDR0 IO5 IO18 IO16 ADDR1
A1 A2 A3 A4 A5 A6 B1 B2 B3 IO17 RESET_N INT AV DD IO6 IO5 IO18 IO16 IO7 DA C_OUT I O4 I O3 I O20 I O19 DGND A GND I O2 I O1 10k LM 258 1 2 3 4 OUT1 V CC -IN1 OUT2 +IN1 -IN2 GND +IN2 8V CC 7 6 5 CLK IN SCLK V CC18 IO14 IO15 IOGND IO23 IO22 IO21
CLK IN SCL-1 1V 8 IO14 IO15 GND IO23 IO22 IO21
E3 E2 E1 D6 D5 D4 D3 D2 D1
GND
V CC 4k7 B4 B5 B6 C1 C2 C3 C4 C5 C6 JP4 2 1
LD4
R5
4k7
2 3
1
R16
V CC
C11
220E
RESET DA C I O4 I O3 I O20 I O19 GND GND I O2 I O1
10nF
R20
1V 8
1 2 3 OSC1 4 V SS 5 PC2 6 PC1 7 PC0 RESET 8 9 PB7 10 PB6 11 V PP 12 PB5 13 PB4 14 PB3 15 PB2 16 PB1
PA2 PA3 PA4 PA5 PA6 PA7 PB0 PWM -3 R19
S5
V DD V DDA OSCOUT USBV CC OSCIN USBDM V SS USBDP PC2 V SSA PC1/TDO PA0/M CO PC0/RDI PA1/SDA/ICCDATA RESET NC PB7 NC PB6 PA2/SCL/ICCCLK V PP PA3 PB5 PA4 PB4 PA5 PB3 PA6 PB2 PA7 PB1 PB0 1k
32 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17
ST7263B 5k1
V DDA
2
Q3 2STR1215
V CC V SS
1 U6
C13
V SSA
GND
V R2 10k
C4 C12
GND
100nF
C6
J1 1V 8 1uF/10v 100nF U5 JP5 1V 8 1 2
R21 5k1
CLK IN
1uF/10V
4 3 2 1
SDA SCL PA4 PA5
SDA-1
R29
LD5
SCL-1
R30
2k2
HEADER 4 JP7 CON3 1 2 3 J4 CON9
2
1
2k2
1 1V 8 2 IO0 3 DB1 4 IO2 5 DB3 6 IO4 7 DB5 ADDR0 8 9 DB7 GND 10
R28
1V 8 SDA-1 SCL RST PA4
V CC SDA SCL-1 PB3 INT
VL V CC V L1 V CC1 V CC2 V L2 V L3 V CC3 V CC4 V L4 V L5 V CC5 V CC6 V L6 V L7 V CC7 V CC8 V L8 GND OE ST2378E
20 V CC 19 DB0 18 IO1 17 DB2 16 IO3 15 DB4 14 IO5 13 DB6 12 ADDR1 11 1V 8
J3
V SS V CC
Application diagram
J2
C5
2
3 2 1 100uF/10v 100nF
V CC USBV DD RS IO23 1V 8
C23 J5 ST2378E 2V 8
C25 C26
C24
9 8 7 6 5 4 3 2 1
+V GND
I
G
1k 1
PA6 IO22 En GND
U4 L7805
O
3
R34
1 2 3 4 5 6 7 8 9 10 VL V CC V L1 V CC1 V CC2 V L2 V L3 V CC3 V CC4 V L4 V L5 V CC5 V CC6 V L6 V L7 V CC7 V CC8 V L8 GND OE
I O5 I O4 I O3 I O2 I O1 GND I O14 I O15 PWM -3
20 19 18 17 16 15 14 13 12 11
100E J7
CON3
330nF
I CC
100nF 100nF
R24
CON2
V CC
I O18 I O19 I O20 I O23 I O21 I O22 1V 8 SCL -1 SDA -1
JP6
1 2 3 4 5 6 7 8 9 CON9
ADDR0 DAC 2V 8 GND INT ADDR1 RST IO16 IO17
PWM -2 PWM -1 IO10 IO9 2V 8 GND IO8 CLK IN IO0
9 8 7 6 5 4 3 2 1 CON9 J6 CON9 1 2 3 4 5 6 7 8 9
R31
1 2 3
GND 10k
PA 7 PA 3
OSC_EXT
V CC V CC
C18 C20 C22
1 3 5 7 9
2 4 6 8 10
ICCDATA ICCCLK RESET V PP
100E
RS GND En DB0 DB1 DB2 DB3 DB4 DB5 DB6 DB7 A K
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 JHD162A
OSC1
HEADER 5X2 100nF
R32
100nF 18k
100nF
R33
U7 LF18CDT 2V 8
ADDR1
18k
ADDR0
U8 5 4 100nF
C8 C19 C21 C17 C9
Vin gnd V out
V CC GND
1V 8
R25
R26
R23
1 2 3 4.7uF/10v 100nF 100nF 10k 10nF
V CC
1 3 2
1V 8
10k
IN OUT GND INHIBIT BP
10k
C16
LD2985
C14
100nF
C15
100nF
2.2uF/10v
C7
1uF/10v
Application diagram
21/24
Bill of materials
UM0311
Appendix B
Table 2.
Bill of materials
Bill of materials
Value / generic part number 1K5 33 pF Manufa cturer Any Any Manufacturer's Supplier's ordering code / Supplier ordering orderable part code number
Index Qty
Ref.
Package
1 2
1 1
R1 C1 C10, C12, C13, C14,C16, C17,C18,C19, C20,C21, C22, C24, C25, C26 C8, C11 C15 C2 C23 C3 C5 C4, C6, C7 C9 CON1 CON2 J1 J2 J3 J4, J5, J6 ,J7 JP1, JP2 JP3, JP4, JP5 JP6, JP7 LD1 LD2, LD5 LD3 LD4 LDR1 Q1, Q2, Q3
0805 0805
3
14
100 nF
0805
Any
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
2 1 1 1 1 1 3 1 1 1 1 1 1 4 2 3 2 1 2 1 1 1 3
10 nF 2.2 f/10 v 33 pF 330 nF 4.7 f/25 v 100 f/10 v 1 f/10 v 4.7 f/10 v USB-B-TYPE HEADER 5X2 HEADER 4 CON3 JHD162A CON9 HEADER 3 HEADER 2 CON3 WHITE RED LED GREEN LED YELLOW LED LDR >9 k 2STR1215
0805 RB-4.0 805 805 RB-2.25 RB-4.0 RB-2.25 RB-2.25 USB-B IDC-10B SIP4 POWER LCD SIP9 SIP3 SIP2 SIP3 LED-5 mm LED-3 mm LED-3 mm LED-3 mm LDR SOT-23
Any Any Any Any Any Any Any Any Any Any Any Any Any Any Any Any Any Any Any Any Any Any ST 2STR1215
22/24
UM0311 Table 2. Bill of materials (continued)
Value / generic part number Manufa cturer
Revision history
Index Qty
Ref.
Package
Manufacturer's Supplier's ordering code / Supplier ordering orderable part code number
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
4 5 4 2 5 1 2 2 2 6 1 5 1 1 1 1 2 1 1
R8, R9, R10, R11 R12, R13, R14, R15, R16 R17, R18, R19, R28 R20, R21 R22, R23, R24, R25, R26 R27 R29, R30 R31, R34 R32, R33 R2, R3, R4, R5, R6, R7 RT1 S1, S2, S3, S4, S5 U1 U2 U3 U4 U5, U6 U7 U8
3k3 220E 1k 5k1 10k 330E 2k2 100E 18 k 4k7 4.7 k SWITCH ST72F63BK4B1 STMPE2402 LM258AD L7805CV ST2378ETTR LF18ABDT LD2985AM28R
0805 0805 0805 0805 0805 0805 0805 0805 0805 0805 NTC Push Button SDIP-32 TFBGA36 SO-8 TO-220 TSSOP20 RES SOT23-5L
Any Any Any Any Any Any Any Any Any Any Any Any ST ST ST ST ST ST ST ST72F63BK4B1 STMPE2402TBR LM258AD L7805CV ST2378ETTR LF18ABDT LD2985AM28R
4
Revision history
Table 3.
Date 26-Mar-2007
Revision history
Revision 1 First issue Changes
23/24
UM0311
Please Read Carefully:
Information in this document is provided solely in connection with ST products. STMicroelectronics NV and its subsidiaries ("ST") reserve the right to make changes, corrections, modifications or improvements, to this document, and the products and services described herein at any time, without notice. All ST products are sold pursuant to ST's terms and conditions of sale. Purchasers are solely responsible for the choice, selection and use of the ST products and services described herein, and ST assumes no liability whatsoever relating to the choice, selection or use of the ST products and services described herein. No license, express or implied, by estoppel or otherwise, to any intellectual property rights is granted under this document. If any part of this document refers to any third party products or services it shall not be deemed a license grant by ST for the use of such third party products or services, or any intellectual property contained therein or considered as a warranty covering the use in any manner whatsoever of such third party products or services or any intellectual property contained therein.
UNLESS OTHERWISE SET FORTH IN ST'S TERMS AND CONDITIONS OF SALE ST DISCLAIMS ANY EXPRESS OR IMPLIED WARRANTY WITH RESPECT TO THE USE AND/OR SALE OF ST PRODUCTS INCLUDING WITHOUT LIMITATION IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE (AND THEIR EQUIVALENTS UNDER THE LAWS OF ANY JURISDICTION), OR INFRINGEMENT OF ANY PATENT, COPYRIGHT OR OTHER INTELLECTUAL PROPERTY RIGHT. UNLESS EXPRESSLY APPROVED IN WRITING BY AN AUTHORIZED ST REPRESENTATIVE, ST PRODUCTS ARE NOT RECOMMENDED, AUTHORIZED OR WARRANTED FOR USE IN MILITARY, AIR CRAFT, SPACE, LIFE SAVING, OR LIFE SUSTAINING APPLICATIONS, NOR IN PRODUCTS OR SYSTEMS WHERE FAILURE OR MALFUNCTION MAY RESULT IN PERSONAL INJURY, DEATH, OR SEVERE PROPERTY OR ENVIRONMENTAL DAMAGE. ST PRODUCTS WHICH ARE NOT SPECIFIED AS "AUTOMOTIVE GRADE" MAY ONLY BE USED IN AUTOMOTIVE APPLICATIONS AT USER'S OWN RISK.
Resale of ST products with provisions different from the statements and/or technical features set forth in this document shall immediately void any warranty granted by ST for the ST product or service described herein and shall not create or extend in any manner whatsoever, any liability of ST.
ST and the ST logo are trademarks or registered trademarks of ST in various countries. Information in this document supersedes and replaces all information previously supplied. The ST logo is a registered trademark of STMicroelectronics. All other names are the property of their respective owners.
2007 STMicroelectronics - All rights reserved STMicroelectronics group of companies Australia - Belgium - Brazil - Canada - China - Czech Republic - Finland - France - Germany - Hong Kong - India - Israel - Italy - Japan Malaysia - Malta - Morocco - Singapore - Spain - Sweden - Switzerland - United Kingdom - United States of America www.st.com
24/24
|