UM0313 STMICROELECTRONICS | Alldatasheet
Document overview
- Manufacturer or author: Provided By ALLDATASHEET.COM(FREE DATASHEET DOWNLOAD SITE)
- PDF pages: 33
Technical content
Datasheet sections
- 1 Evaluation kit description
- 2 EK302DL GUI installation
- 2.1 PC system requirements
- 2.2 Software installation
- 2.3 Hardware installation
- 3 Graphical User Interface
- 3.1 Connecting to the Virtual COM port
- 4 Data acquisition quick star t
- 5 EK Lite
- 6 MEMS pointer
- 6.1 GUI description
- 6.1.1 Right side: main controls
- 6.1.2 Left side: pointer application controls
- 7 Supported commands
- 7.1 Getting started
- 7.2 Supported commands
- 7.2.1 Start command
The EK302DL is an evaluation kit designed to provide the user with a complete, ready-to- use platform for evaluation of the LIS302DL. The LIS302DL is a low power 3-axis linear accelerometer with digital output. The device includes a sensing element and an IC interface capable of translating information from the sensing element into a measured signal that can be used for external applications. In addition to the MEMS sensor, the evaluation board utilizes an ST7-USB microcontroller which functions as a bridge between the sensor and the PC, on which it is possible to use the Graphical User Interface included with the kit or dedicated software routines for customized applications. This user manual describes the hardware included with the evaluation kit and provides the information required to install and run the evaluation kit user interface. For details regarding the features of the LIS302DL sensor, please refer to the datasheet for this device and application note AN2335.
1 Evaluation kit description
LIS302DL low power 3-axis linear accelerometer with digital output. The block diagram of the evaluation kit is shown in Figure 1. Figure 1. Evaluation board block diagram provided with the kit, or through dedicated software routines to run customized applications. Switches and LED indicators are used to control and monitor the functionality of the board.
2 EK302DL GUI installation
- installation on the PC of the software delivered with the evaluation kit.
- installation of the Virtual COM driver needed to use the evaluation kit board.
2.1 PC system requirements
designed to operate with Microsoft® Windows XP .
2.2 Software installation
- insert the mini CD into the CD-ROM drive;
- if the “Autorun” screen does not appear, click on Start > Run, then enter
- click on “Evaluation Kit SW Installation” from the “EK302DL Evaluation Kit” page;
- follow the on scre en instructions (Figure 4).
Figure 4. Software installation
2.3 Hardware installation
“Notify” icon should appear as in Figure 5.
Figure 7. USB driver installation using the Hardware Update Wizard EK302DL Evaluation Software GUI. For additional details, see section 3.1.
Figure 8. Virtual COM driver port assignment
3 Graphical User Interface
- click on Start > All Programs;
- select EK302DL > Executables;
- launch the program “EK302DL Ver.1.3”.
- Connection panel (ref 1) - Connects/disconnects the board and starts acquisition via the Start/Stop buttons.
- “Save” box (ref 2) - Allows the user to save the data to a specified file.
- Tab Menu (ref 3) - Used to toggle between the different functions of the evaluation kit.
Figure 9. Graphical User Interface: main window
Graphical User Interface UM0313
3.1 Connecting to the Virtual COM port
Before using the functions of the evaluation kit software it is necessary to open the connection with the EK302DL board. This is achieved through the following procedure: 1. connect the EK302DL to the desired USB port; 2. in the “Select COM” drop-down menu ( Figure 9 ref 1), choose the Virtual COM number to which the board has been mapped. For additional information on how to obtain this number, see section 2.3; 3. open the connection by clicking on “Connect” ( Figure 9 ref 1). When this procedure is complete, the general purpose LED on the board will switch from red to green. At this point the user can acquire, plot and save the acceleration data measured by the sensor and access the content of the registers embedded in the device. The following sections provide details regarding the functions of the tabs in Figure 9, ref 3. 3.2 “Options” tab The Options tab allows the user to control the following parameters:
- Full Scale (FS) - Sets the maximum acceleration value measurable by the device. It is possible to select either 2g or 8g (Figure 10, ref 1).
- Data Rate (DR) - In this box the rate at which each acceleration sample is produced can be selected. The possible values are 100 Hz or 400 Hz (Figure 10, ref 2).
- Tri-State (TS) - Permits switching the SPI lines of the ST7-USB microcontroller mounted on the evaluation kit between 3-state (i.e. high-impedance) and normal mode (Figure 10, ref 3). This function makes it possible to isolate the sensor mounted on the board from the microprocessor, in case any external control (from a different microcontroller mounted on a separate user board) is needed.
- High-Pass Filter (HP) - This control activates the High-Pass Filter on the device and selects the cut-off frequency (Figure 10, ref 4).
- Interrupt on Pad IntX - Allows the selection of the type of signal to be sent out on Int1 and Int2 Pad (Figure 10, ref 5).
Figure 10. Options tab
- “General” (ref 1) - Provides access to the registers which control the main settings of the device. This section contains the control registers (CTRL_REG1, CTRL_REG2 and CTRL_REG3) and the registers that control the generation of inertial interrupt signals. It is possible to read and write the contents of each register. To restore the default value for a given register, press the “Default” button.
- “All Registers” (ref 2) - Permits the user to read, write and recall the default content for all the registers shown in ref 1 with a single click on the read/write/default button.
- “Direct Communication” (ref 3) - Provides access to any register in the device. To read a generic register, insert the address in the “Register Address” textbox, then click on the “Read” button. The retrieved content of the register will be displayed in the “Register Value” field. As with writing to a register, the user must specify the address and the data to be written inside the fields marked “Register Address” and “Register Value”, respectively, and then press the “Write” button.
- “Load/Save Configuration” (ref 4) - Lets the user save/load a specific configuration to/from a file.
- “Parameters” (ref 5) - Allows the user to save the register configuration to a text file, which includes a detailed description of the resulting configuration for each register. ref 1 ref 2 ref 3 ref 4 ref 5
Figure 11. Register Setup tab
the RED, GREEN and BLUE bars. Figure 12. Bars tab
- “Main window” (ref 1) - Shows the sequence of acceleration samples that have been measured by the LIS302DL MEMS sensor mounted on the evaluation kit.
- “Visualization options” (ref 2) - Allows the user to enable/disable the trace related to each axis and to show/hide the marker on the plot diagram.
- “Zoom options” (ref 3) - Permits enlargement of the plot in the horizontal (Time) and vertical (Amplitude) directions and to move the center of the plot upward/downward with the “Up” and “Down” buttons.
Figure 13. Plot tab
- “ADC Out” (ref 1) - Displays the acceleration data provided by the sensor after its conversion from 2’s complement to magnitude and sign.
- “Acceleration Value” - Represents the acceleration data measured by the sensor, expressed in mg.
- “Angle” - Returns the tilt angle, expressed in degrees, that is inferred from the “ADC Out” data. Note: To increase data re adability, the values shown in the boxes described above are based on an average of 50 samples.
Figure 14. Data tab
data obtained from the sensor to scroll a map (or another type of document) on the screen. Figure 17. Map Browsing tab that allow the configuration of the two independent interrupt sources of the device. immediate check of its content.
and “Set Wake Up Default”, respectively (ref 4). Figure 18. Interrupt tab
“Double Click” event and provides an interrupt when the event occurs. function and the external interrupt lines. Two buttons allow the user to set standard values for single and double click. Figure 19. Click tab
The FFT tab (Figure 20) shows the FFT of the acceleration signals acquired by the sensor. Figure 20. FFT tab
4 Data acquisition quick start
- connect the EK302DL to the USB port;
- select the Virtual COM port and click on the “Connect” button ( Figure 9, ref 1);
- select the destination file to which the acceleration data must be saved by clicking
- use the Tab Menu to display the desired function (optional);
- click on the “Start” button to activate the sensor data collection and screen plotting
- click on the “Start saving” button to activate the sensor data saving to file;
- click on the “Stop saving” button to stop the sensor data saving;
- click on the ”Stop” button to stop the sensor data collection and screen plotting
- to close the application, click on “Disconnect” and then click on “Exit”.
5 EK Lite
software that came with the evaluation kit was installed (C:\\Program Files by default). located in the EK302DL > Executables folder. An example of the GUI of the EK lite application is shown in Figure 21. Figure 21. EK302DL Lite GUI
- connect the EK302DL to the USB port;
- start the EK302DL Lite GUI;
- select the Virtual COM port and click on the “Connect” button ( Figure 9, ref 1);
- select the destination file to which the acceleration data must be saved by clicking
- use the Tab Menu to display the desired function (optional);
- click on the “Start” button to activate the sensor data collection and screen plotting
- click on the “Start saving” button to activate the sensor data saving to file;
- click on the “Stop saving” button to stop the sensor data saving;
- click on the ”Stop” button to stop the sensor data collection and screen plotting
- to close the application, click on “Disconnect” and then click on “Exit”
and allows a single read of the acceleration data measured by sensor.
6 MEMS pointer
movement of the pointer. The board also emulates the left and right buttons of the mouse.
6.1 GUI description
acquisition. The bottom section contains the pointer application controls. Figure 22. MEMS Pointer Demo
6.1.1 Right side: main controls
- Connection control - Selects the COM port on which the EK board is connected.
- Acquisition control - Starts and stops acquisition.
- Exit - Exits the MEMS Pointer Demo application.
6.1.2 Left side: point er application controls
- Left button/right buttons - Indicates when the left/right button on the evaluation kit is pressed.
- X/Y -position - Shows the current x/y coordinates of the mouse pointer on the PC screen.
- X/Y -deg - Shows the tilt of the evaluation kit along the X and Y axes as depicted in Figure 23.
- Tilt control - Allows the user to select the direction of the vertical displacement on the screen vs. the direction in which the board is tilted. For example, by selecting “Up” the pointer will move upward when the evaluation kit is tilted forward. Conversely, by selecting “Down” the pointer will move downwards when the board is tilted backward.
- Pointer speed - Sets the sensitivity of the pointer to the inclination of the board.
Figure 23. Axis orientation
7 Supported commands
The microcontroller mounted on the EK302DL board is equipped with dedicated firmware which supports a set of commands that allow the control of the 3-axis digital output MEMS sensor and permit the aquisition of the measured acceleration data. The firmware also handles the communication between the EK board and the PC through the USB bus. These features allow users to easily write their own applications to exploit the capabilities of the accelerometer. This section describes the commands that are supported by the firmware loaded in the microcontroller of the EK302DL Evaluation Kit.
7.1 Getting started
Before using the commands supported by the firmware, the following procedure must be performed: 1. connect the EK302DL to the USB port; 2. launch an application which allows the sending of commands through the Virtual serial port. The remainder of this document will assume the use of the Microsoft © Hyper Terminal program integrated in the Windows XP operating system; 3. create a new connection, enter a name (ex. “EK302DL ”), and click “OK”; 4. in the “Connect Using” field, select the Virtual COM port to which the USB port has been mapped, and click “OK”; 5. in Port Settings, set Bits per second to 1152 00, Data bits to 8, Parity to None, Stop bits to 1, and Flow control to None. Click “OK”; 6. in the Hyper Terminal select Files > Propert ies > Settings and then click on the “ASCII Setup” button; 7. select “Send line ends with line feeds” and “Echo typed characters locally”; 8. click the “OK” button to close the “ASCII Setup” window; 9. click the “OK” button to close the “Properties” window. Once this procedure has been completed the user can utilize the commands described in the following sections by typing them into the Hyper Terminal window.
7.2 Supported commands
I1, I2 : interrupt value on each axes.
7.2.1 Start command
while “X” “Y” “Z” represent, respectively, the acceleration data for the X, Y , Z axes. evaluation kit board, and they are set to 1 when the corresponding switch is pressed.
7.2.2 Debug command
separator between the different fields. Table 1. Supported commands
7.2.3 Stop command
The *stop command interrupts any acquisition session that has been started with either the *start or *debug commands.
7.2.4 Register read
The *rAA command allows the contents of the LIS302DL device registers in the evaluation kit board to be read. AA, expressed as hexadecimal value and written in upper-case, represents the address of the register to be read. Once the read command is issued, the board will return RAAhDDh, where AA is the address sent by the user and DD is the data present in the register. For example, to read the CTRL_REG1 the user would issue the command *r20, which returns R20hC7h.
7.2.5 Register write
The *wAADD command permits writing to the contents of the LIS302DL device registers in the evaluation kit board. AA and DD, expressed as hexadecimal values and written in upper- case, represent respectively the address of the register and the data to be written. To write 0xC7 to the CTRL_REG1, for example, the user would issue the command *w20C7.
7.2.6 Single bit write
Using this command it is possible to set/reset a single bit in a given register. The command *bwAA<0:7><0|1> requires the user to specify the address AA of the register in which to change the bit, with AA expressed as a hexadecimal value and written in lower-case, followed by the position of the bit to be changed, an integer between 0 and 7, and the value, either 0 or 1, to be associated to the specified bit. For example, to set to 1 the FS bit within the CTRL_REG2, the user would issue the command *bw2171.
7.2.7 Zon and Zoff
The *Zon and *Zoff commands are employed respectively to put into 3-state (i.e. high- impedance) and to exit (i.e. normal mode) the SPI lines of the ST7-USB microcontroller mounted on the evaluation kit. These commands allow the isolation of the sensor from the microprocessor in the event that an external control (from a different microcontroller mounted on a separate board) is needed. By default, when the kit is first turned on, the SPI lines are in 3-state mode and the user is required to send the command *Zoff to allow the communication between the sensor and the microcontroller.
7.2.8 Device name
The *dev command retrieves the name of the device mounted on the evaluation kit connected to the PC. For the EK302DL, the returned value is “LIS302DL ”.
7.2.9 Firmware version
The *ver command queries the evaluation kit and returns the version of the firmware loaded in the microprocessor.
7.3 Quick start
This section shows the basic sequence of commands to start a data communication session and retrieve the acceleration data from the evaluation kit: 1. connect the EK302DL to the USB port; 2. start Microsoft © Hyper Terminal and configure it as described in section 7.1; 3. inside the Hyper Terminal window, enter the command *Zoff to enable the control of the SPI line from the ST7-USB microcontroller; 4. send the *debug command to get the acceleration data measured from the sensor; 5. send *stop to end the continuous acquisition and visualization.
8 Schematic diagram
The schematic diagram of the EK302DL Evaluation Kit is shown in Figure 24. Figure 24. Schematic diagram of the EK302DL board
9 Bill of materials
The bill of materials for the EK302DL Evaluation Kit is provided in Table 2. Table 2. Bill of materials
Table 3. Revision history 24-Nov-2006 1 Initial release. 08-Jun-2007 2 Click Tab description added.