0
登录后你可以
  • 下载海量资料
  • 学习在线课程
  • 观看技术视频
  • 写文章/发帖/加入社区
会员中心
创作中心
发布
  • 发文章

  • 发资料

  • 发帖

  • 提问

  • 发视频

创作活动
EK3LV02DQ

EK3LV02DQ

  • 厂商:

    STMICROELECTRONICS(意法半导体)

  • 封装:

    -

  • 描述:

    BOARD EVALUATION FOR LIS3LV02DQ

  • 数据手册
  • 价格&库存
EK3LV02DQ 数据手册
UM0382 User guide EK3LV02DQ Evaluation Kit Introduction The EK3LV02DQ is an Evaluation Kit designed to provide to the user a complete, ready-touse platform for the evaluation of the LIS3LV02DQ, a low-power 3-Axis linear accelerometer with digital output that includes a sensing element and an IC interface able to take information from the sensing element and to provide the measured signal to the external world. Besides the MEMS sensor, the evaluation board mounts an ST7-USB microcontroller which acts like a bridge between the sensor and the personal computer on which it is possible to run either a Graphical User Interface delivered with the kit itself or dedicated SW routines that implements customized applications. This user manual describes the HW composing the evaluation kit and gives the informations required to install and to run the evaluation kit user interface. For any detail about the features implemented by the LIS3LV02DQ sensor refer to LIS3LV02DQ datasheet and to the Application Note AN2041 January 2007 Rev 2 1/32 www.st.com Contents UM0382 Contents 1 Evaluation kit description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 2 EK3LV02DQ GUI installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 3 2.1 PC system requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 2.2 Software installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 2.3 Hardware installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 Graphical User Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 3.1 Connecting to Virtual the COM port . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 3.2 Registers Read/Write . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 3.3 Direction detection demo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 3.4 Data Acquisition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 3.5 3.4.1 Single Acquisition mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 3.4.2 Continuos Acquisition mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 About_EK . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 4 Data acquisition quick start . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 5 EK lite . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 6 MEMS pointer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 6.1 7 2/32 6.1.1 Right Side: Main Controls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 6.1.2 Left Side: Pointer Application Controls . . . . . . . . . . . . . . . . . . . . . . . . . 24 Supported commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 7.1 Getting Started . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 7.2 Commands Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 7.3 8 GUI description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 7.2.1 Supported Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 7.2.2 Acquisition Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 7.2.3 Configuration Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 Main communication command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 Schematic diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 UM0382 Contents 9 Bill Of Material . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 10 Revision history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 3/32 List of tables UM0382 List of tables Table 1. Table 2. Table 3. Table 4. Table 5. 4/32 Acquisition command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 Configuration Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 Data Field 1 configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 Bill Of Material . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 Document revision history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 UM0382 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. Evaluation board block diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 Top silk-screen for EK3LV02DQ kit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 Board photograph . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 Software installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 Notify icon . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 Driver installation through the device manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 USB driver installation with the Hardware Update Wizard . . . . . . . . . . . . . . . . . . . . . . . . . 10 Virtual COM driver port assignment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 Graphical User Interface: main window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 Registers Read/Write . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 EK Demo Mode window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 Threshold definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 Single Data Acquisition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 Continuos Data “Acquisition Control” . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 Plot Data and Show Data windows. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 Board Axis Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 Bar Chart . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 Inclinometer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 Axis Inclination . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 Map Browsing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 Evaluation Kit Info and About window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 EK3LV02DQ Lite GUI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 MEMS Pointer Demo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 Axis Orientation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 Schematic diagram for EK3LV02DQ board . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 5/32 Evaluation kit description 1 UM0382 Evaluation kit description The EK3LV02DQ is an Evaluation Kit designed to provide the user with a complete, readyto-use platform for the evaluation of the LIS3LV02DQ, a low-power 3-Axis linear accelerometer with digital output. The block diagram of the evaluation kit is given in Figure 1. Figure 1. Evaluation board block diagram Control Switches (Left, Right and Reset) MEMS Sensor SPI USB ST72F651 μC USB Connector Power On LED Data Ready LED General Purpose LED Besides the MEMS sensor, the evaluation board mounts an ST7-USB microcontroller which acts like a bridge between the sensor and the personal computer on which it is possible to run either a Graphical User Interface delivered with the kit itself or dedicated SW routines that implements customized applications. Few switches and LED indicators are also present to control and to monitor the functionality of the board itself. The top silk-screen of the board and the photo of the full board are shown respectively in Figure 2 and in Figure 3. 6/32 UM0382 Evaluation kit description Figure 2. Top silk-screen for EK3LV02DQ kit Figure 3. Board photograph In order to operate the EK3LV02DQ evaluation kit it is required the installation of a dedicated driver which is delivered onto the CD accompanying the kit itself together with a GUI interface which allows a simple interaction with the sensor itself. The steps that must be followed to install the driver and the SW are described in the following section 2.2. 7/32 EK3LV02DQ GUI installation 2 UM0382 EK3LV02DQ GUI installation The installation of Graphical User Interface (GUI) for the EK3LV02DQ implies two steps: 2.1 – the installation onto the PC of the Software delivered with the evaluation kit; – the installation of the Virtual COM driver needed to use the Evaluation Kit board. PC system requirements Both the hardware and software that compose the EK3LV02DQ Evaluation Software Kit have been designed to operate with: 2.2 – Microsoft® Windows® XP®; – Microsoft.NET Framework 1.1 (or higher); this software can be downloaded for free from the Microsoft web site (a). The installation of the “Microsoft.NET Framework” is not required when running on windows XP SP2 or higher. Software installation To install the SW distributed along with the EK3LV02DQ evaluation kit: 1. insert the MiniCD delivered with the Kit inside the CD-ROM drive; 2. if the Autorun screen does not appear, click on Start > Run, enter “D:\Autorun.exe” and click OK. “D” represents the letter of your CD-ROM drive; 3. click onto “Evaluation Kit SW Installation” from the “EK3LV02DQ Evaluation Kit” page which appears; 4. follow the instructions given by the Installer (Figure 4). Figure 4. Software installation a. http://www.microsoft.com/downloads and search for.Net framework Redistributable Package. 8/32 UM0382 2.3 EK3LV02DQ GUI installation Hardware installation To install the virtual COM driver insert the Evaluation Kit board into a free USB port, look at the “Notify” icon (Figure 5) and than wait for “Hardware Update Wizard”. Figure 5. Notify icon If the “Hardware Update Wizard” appears as shown in Figure 7 then follow the instructions given in Figure 7; otherwise follow the instructions indicated in Figure 6 and Figure 7. Figure 6. Driver installation through the device manager Right click on My Computer Right click on “ST MEMS UNIT” and choose for Update driver 1 2 9/32 EK3LV02DQ GUI installation Figure 7. UM0382 USB driver installation with the Hardware Update Wizard 3 4 6 5 7 Once the installation has finished, a COM port number will be assigned to the ST Virtual Com driver (Figure 8). The knowledge of this number is required to run the EK3LV02DQ Evaluation Software GUI. For additional details, check section 3.1. 10/32 UM0382 EK3LV02DQ GUI installation Figure 8. Virtual COM driver port assignment 11/32 Graphical User Interface 3 UM0382 Graphical User Interface To execute the EK3LV02DQ Evaluation Software Graphical User Interface: 1. click on Start > All Programs; 2. select the folder EK3LV02DQ > Executables; 3. launch the program “EK3LV02DQ Ver.1.0”. With these operations the GUI main window will appear (Figure 9); the window is composed of four main sections as detailed below: 1. the graphical panel (ref1), where the data coming from the sensor are graphically represented; 2. the upper-right corner of the window (ref2), which allows to open and to close the communication port of the PC connected to the Evaluation Kit; 3. the right side, which contains the “Register Read/Write” and “Direction Detection Demo” (ref3), “Single Acquisition” (ref4) and “About EK” (ref5) blocks; 4. the bottom of the window, which handles the continuous acquisition of the acceleration data and displays them inside the graphical panel (ref6). Figure 9. Graphical User Interface: main window ref1 ref2 ref3 ref4 ref5 ref6 12/32 UM0382 3.1 Graphical User Interface Connecting to Virtual the COM port Before using the functions of the Evaluation Kit Software it is necessary to open the connection with the EK3LV02DQ board. This is achieved through the following procedure: 1. connect the EK3LV02DQ to desired USB port; 2. in the pop-menu “USB ---> Virtual COM” choose the Virtual COM number on which the board has been mapped. For additional information on how to get this value check section 2.3; 3. open the connection by clicking on “Connect” (Figure 9 ref2). Once this procedure is completed, the General Purpose LED of the board will switch from red to green. Once the procedure has been completed, the user can acquire, plot and save the acceleration data measured by the sensor and he/she can access the content of the registers embedded in the device. Further details about each single function are provided in the sections hereafter. Note: Due to Virtual COM driver communication speed limits, the maximum Output Data Rate allowed for the device is 640 Hz. Higher Output Data Rate could result in a possible data loss. 3.2 Registers Read/Write Through the “Register Read/Write” panel (Figure 9, ref3), the user can either directly write or read the registers value inside the LIS3LV02DQ device. In particular, by clicking on the “Read/Write” button a new window appears (Figure 10). To perform a register read out, the user must select the desired register name into “Reg Name” pop up menu (ref4) and then he/she must click on the “Read” button (ref2). The result of the reading will appear in the text box “Reg Value” (ref3). To write a data into a register, the user must select the desired register name (ref4), choose the desired value in the text box “Reg Value” (ref3) and then click on the “Write” button (ref1). In case of read-only registers, the write button is not enabled. Figure 10. Registers Read/Write ref4 ref1 ref3 ref2 13/32 Graphical User Interface 3.3 UM0382 Direction detection demo The LIS3LV02DQ allows the implementation of motion-controlled functions such as gaming and terminal control while requiring reduced computational power to the application controller. The device, in fact, may be programmed to generate an interrupt signal when a tilt is detected and to return the information of the direction in which the sensor has been tilted. With the same feature the LIS3LV02DQ sensor is able to return the information about the spatial orientation of the board without requiring the reading and the further post-processing of the acceleration data. This feature is demonstrated through the Direction Detection demo mode panel (Figure 11) which is activated by clicking on the “Dir Detect” button present in the main GUI window. Figure 11. EK Demo Mode window ref2 ref1 ref4 ref 3 ref5 In order to configure the event which will trigger the interrupt event, the user must select the desired inner/internal and outer/external threshold (ref1), defining in this way an hysteresis region that allows to avoid false detections and/or bouncing produced for example by either spurious vibration or tremor. Whenever the inner thresholds is greater than the outer one, the hysteresis region will be null and the threshold employed to detect the tilt direction will be the outer one. A graphical representation of the internal and external thresholds is given in Figure 12. Whenever the absolute value of the acceleration signal measured by the sensor either exceeds the outer threshold or returns below the inner threshold an interrupt signal will be generated and the General Purpose green LED will blink. If the user wants to detect the orientation changes removing the DC level of the acceleration signal applied to the device (i.e. removing the gravity vector), it is possible to enable the High Pass Filter embedded inside the device by acting on the “High Pass Filter” pop-up menu (Figure 11, ref2). The cut-off frequency of the filter, which is shown inside the Cutoff Frequency text box (ref5), is user selectable acting on the High Pass coefficients (ref3) and on the Output Data Rate (ODR). For further details, please refer to AN2041. To start the Direction Detection demo mode click on “Start Direction Detection” (ref4). 14/32 UM0382 Graphical User Interface Figure 12. Threshold definition 3.4 Data Acquisition The Data Acquisition panel is split in two sections: 3.4.1 1. “Single Acquisition” mode (Figure 9, ref4); 2. “Continuos Acquisition” mode (Figure 9, ref6). Single Acquisition mode The “Single Acquisition” mode panel allows the user to perform the measurement of the acceleration acting on all the three axes. A single read of the acceleration data measured by the device is done by clicking on the “Acquisition” button (Figure 13, ref1). This panel allows also to activate and to disable the Self-Test function of the device using the two radio buttons “Self Test ON” and “Self Test OFF” (Figure 13, ref2). Whenever the self-test is activated, the proof mass of the sensor is electrostatically deflected and the acceleration data measured by the sensor will exhibit a change in their DC level as specified on the datasheet of the part. This function allows to check whether the sensor is working properly without requiring any mechanical movement of the board mounting the sensor itself. Figure 13. Single Data Acquisition ref2 ref1 15/32 Graphical User Interface 3.4.2 UM0382 Continuos Acquisition mode The section related to “Continuos Acquisition” allows the user to perform a sequence of acquisitions, to plot and to save the acquired acceleration data under different formats. In order to start and to stop the data acquisition (and to activate the plotting of data in the afore said panels) it is necessary to push onto the “START/STOP” button (Figure 14, ref2). Figure 14. Continuos Data “Acquisition Control” ref3 ref4 ref2 ref5 ref1 ref6 ref7 ref8 During a Continuous Acquisition Mode, the user can watch the data coming from the EK3LV02DQ in different graphical windows(b). The windows corresponding to “Plot Data” and “Show Data” are shown in Figure 15. Figure 15. Plot Data and Show Data windows The sign of the acceleration measured by the sensor is related to the axis definition given in Figure 16. b. The computational power of the PC on which the GUI is running may affect the maximum number of windows that can be opened at the same time. 16/32 UM0382 Graphical User Interface Figure 16. Board Axis Definition Z USB CONNECTOR Y X Clicking on the “Setup” button (Figure 14, ref1) the “Acquisition Setup” window will open. This window allows to program the output data rate of the LIS3LV02DQ device. By default it is set to 40Hz (corresponding to a signal bandwidth @ -3dB of 10Hz); to modify this parameter the user has to select the desired value from the related pop up menu (Figure 14, ref3). The “Acquisition Setup” window allows to change also the device Full Scale (Figure 14, ref4) and to put in tri-state mode the SPI (serial interface) lines of the microcontroller (Figure 14, ref5). The latter feature has been implemented to guarantee to advanced users the fullcontrol of the MEMS lines through a different source (i.e. from a separate controller). The section related to “Graphics Amplification” (Figure 14, ref6) allows to zoom the data plotted on the screen. Please notice that the horizontal and vertical gains do not change the resolution of the device; they only impact the way in which data are shown on the screen. Last but not least, the “Acquisition Setup” window allows the user to select the file where the acquired data values have to be stored (Figure 14, ref7). In particular, the file in which the data are saved reports the informations about each acquisition session and contains the acquired samples in three different fields. In order to apply the settings defined with the “Acquisition Setup” window it is necessary to push on the “OK” button (Figure 14, ref8). These settings will be used for any subsequent acquisition (until their next modification) and can not be changed while the acquisition is running. The main panel of the GUI allows also to plot the acceleration data in three ways (Figure 9, ref6): 17/32 Graphical User Interface 1. UM0382 as a Bar Chart (Figure 17); Figure 17. Bar Chart 2. as Inclinometers (Figure 18), where the inclination is related to the axes definition given in Figure 19; Figure 18. Inclinometer Figure 19. Axis Inclination +90° 0° x,y,z -90° 18/32 horizontal plane UM0382 Graphical User Interface 3. to navigate through a map (Map Browsing) (Figure 20). The image to be shown is selected through the “Load Image” button. A map stored inside the file “mapamundi.jpg” is provided as an example. Figure 20. Map Browsing 3.5 About_EK Clicking on the “About_EK” button located into the “About EK” section (Figure 9, ref5) it is possible to obtain informations about the version of the GUI, about the firmware running on the Evaluation Kit and about the version MEMS accelerometer mounted onto the board. These information are retrieved by using the buttons “Mounted Device” and “Software Version” which are shown in “Evaluation Kit Info” window (Figure 21). Once the information about the device are displayed on the screen it is possible to get an explanation of their meaning by moving the mouse over the different parts of the device name (LIS 3LV 02 DQ). Please notice that if the connection is not working properly an error message will be shown. This feature allows to test the connection between the board and the host computer. 19/32 Graphical User Interface UM0382 Figure 21. Evaluation Kit Info and About window The second button (“About”) of the “About EK” section (Figure 9, ref5) opens the “MBU_info” window which shows general informations about the software and provides the user with a direct link to the ST MEMS page. 20/32 UM0382 4 Data acquisition quick start Data acquisition quick start This section describes the basic steps that have to be performed to acquire the acceleration data from the EK3LV02DQ: 1. connect the EK3L02DL to the USB port; 2. start the EK3LV02DQ GUI; 3. select the Virtual COM port and then click on the “Connect” button (Figure 9, ref2); 4. select the destination file in which the acceleration data must be saved by clicking onto “Setup” (Figure 14, ref1) and “Destination File” (Figure 14, ref7) buttons; 5. optionally select the desired decimation factor, Horizontal and Vertical gain and then click on the “OK” button (Figure 14, ref8); 6. click on “Plot Data” or “Show Data” (Figure 9, ref6) to activate the corresponding Data Display window (Figure 15); 7. click on “Browsing” button to activate the function of map browsing (Figure 9, ref6) and then load the desired image by clicking on “Load Image” button; 8. click on “START” (”STOP”) button to activate (stop) the collection of data from the sensor, their saving onto file and plotting on the screen; 9. to close the application click on Disconnect and then click on Exit. 21/32 EK lite 5 UM0382 EK lite The mini-CD delivered with the EK3LV02DQ contains also a lite version of the previous GUI together with its source code. The source code can be found in the directory: ($Home)\STM\EK3LV02DQ\EK3LVDQ_lite where ($Home) represents the directory in which the SW delivered with the evaluation kit has been installed (C:\Program Files by default). The intention is to provide to the user a guidance to the development of his/her own customized application. The evaluation kit is started by launching the executable EK3LV02DQ Lite which is contained in the EK3LV02DQ > Executables folder. The graphical aspect of the GUI associated to the application is shown in Figure 22. Figure 22. EK3LV02DQ Lite GUI In order to operate the SW it is suggested to follow these instructions: 1. connect the EK3LV02DQ to the USB port 2. start the GUI for EK3LV02DQ Lite; 3. select the Virtual COM port and then click on the “Connect” button; 4. optionally select the destination file in which the acceleration data must be saved by clicking onto “Setup” and “Destination File” buttons; 5. click on “Plot Data” to activate the corresponding Data Display window; 6. click on “START” (”STOP”) button to activate (stop) the collection of data from the sensor, their saving onto file and plotting on the screen; 7. to close the application click on Disconnect and then click on Exit. The GUI allows also the Read/Write the registers embedded in the LIS3LV02DQ device mounted on the board and to perform a single read of the acceleration data measured by sensor. 22/32 UM0382 6 MEMS pointer MEMS pointer This section describes the usage of a simple pointer application which employes the acceleration data provided by the LIS3LV02DQ MEMS 3-axis linear accelerometer to control the position of a pointer on the screen of the PC. More in details, the SW provided with the kit itself allows to employ the board provided with the EK3LV02DQ Evaluation Kit as an inertial mouse where the tilt of the board is transformed into a movement of the pointer. The board emulates also the left and right buttons of the mouse. 6.1 GUI description The GUI window (see Figure 23) may be split up into two sections: the right side contains the main controls to open the connection to the Evaluation Kit and to start/stop the data acquisition whereas the left side is dedicated to the pointer application controls. Figure 23. MEMS Pointer Demo 23/32 MEMS pointer 6.1.1 UM0382 Right Side: Main Controls The buttons present on the right side of the GUI and their related function are described hereafter: 6.1.2 – Connection control: selects the COM port on which the EK board is connected to. – Acquisition control: starts and stops the acquisition. – Exit: exits from the MEMS Pointer Demo application. Left Side: Pointer Application Controls The controls present on the left side of the GUI and their related function are the followings: – Left Button/Right Buttons: inform on whether the left/right button present on the Evaluation Kit is pressed. – X/Y-Position: shows the actual 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 directions which are defined as depicted in Figure 24. – Tilt Control: allows to select the direction of the vertical displacement on the screen Vs. the direction in which the board is tilted. In particular, by selecting UP the pointer will move upward by forward tilting the Evaluation Kit. Vice versa, by selecting DOWN the pointer will move downwards whenever the board is tilted backward. – Pointer Speed: sets the sensitivity of the pointer to the inclination of the board. Figure 24. Axis Orientation Y X 24/32 UM0382 7 Supported commands Supported commands The EK3LV02DQ board is equipped with a dedicated firmware which supports a set of commands that allow to control the 3-axis digital output MEMS sensor mounted on the board and to acquire the measured acceleration data. The firmware handles also the communication between the EK board and the PC through the USB bus. Through the usage of these commands it is possible to control the 3-axis digital output MEMS sensor mounted on the board and to acquire the measured acceleration data, thus allowing the user to easy write his/her own applications which exploit the mounted accelerometer. This section describes the commands that are supported by the firmware loaded onto the microcontroller of the EK3LV02DQ Evaluation Kit. 7.1 Getting Started Before using the commands described in the next paragraphs, the following procedure must be performed: 1. connect the EK3LV02DQ to the USB port; 2. start an appropriate software which allows to send the command through the Virtual serial port. The remaining part of this document will suppose the usage of the “Hyper Terminal”; 3. create a new connection; for example name it “EK3LV02DQ” and click OK; 4. in the “Connect Using” field select the right Virtual COM port onto which the USB port has been mapped; 5. set the port to 11500 Bit per second, 8 Data bits, Parity None, 1 Stop bit, Flow control None and then click OK. Once this procedure has been completed the user can send to the EK3LV02DQ the commands described in the following sections by typing the commands themselves in the “Hyper Terminal” window. 7.2 Commands Description The EK3LV02DQ board is equipped with “eklvdq-ver1.0.0” firmware. This firmware supports a set of commands which allow to control the 3-axis digital output MEMS sensor mounted on the board and to acquire the measured acceleration data. The firmware handles also the communication between the EK board and the PC. In particular the communication of the EK3LV02DQ evaluation kit is implemented upon USB ver 2.0. 7.2.1 Supported Commands The commands supported by the EK3LV02DQ FW are divided into two different classes: – Acquisition commands; – Configuration commands. 25/32 Supported commands UM0382 Each command sent to the Evaluation Kit is composed of four fields. Before and between the different field it is located a fixed code “ek” ASCII “65hex 6Bhex”, the whole string is reported below: 65h 6Bh OpCode 65h 6Bh DF 1 65h 6Bh DF2 65h 6Bh DF3 The “OpCode” (Operative code) field defines the command given to the evaluation kit, while DF1, DF2 and DF3 defines the commands attribute, the fixed field is used as a trigger for the communication. In the next paragraphs will be explained only the OpCode and DF. 7.2.2 Acquisition Commands The commands belonging to the Acquisition class commands are described in the following table: Table 1. Acquisition command Cmd Code Cmd name Description ASCII Hex Start Oonn 4F 6F 6E 6E start data acquisition Stop Ooff 4F 6F 66 66 stop data acquisition SD Ooua 4F 6F 75 61 single data acquisition SV Oovs 4F 6F 76 73 retrieve EK software version DI Oodi 4F 6F 64 69 retrieve device information Start: the start command is used to start data acquisition. When the start command is sent the board returns the acceleration data measured by the LIS3LV02DQ device. In particular the output string is composed of eight bytes: “s t Xh Xl Yh Yl Zh Zl SD”. The first two bytes “s” and “t” are always the hexadecimal values {73 74}, while “Xh” “Yh” “Zh” represent the upper part of the acceleration data on the X, Y, Z axes and “Xl” “Yl” “Zl” describe the lower part of the acceleration data on the X, Y, Z axes, the “SD” “Service Data” gives to the user further information about the switches mounted on the board: in detail bit#1 and bit#0 of the “service data” correspond to switches SW3 and SW2 on the Evaluation Kit board (see EK3LV02DQ_User_Guide_ver.1.0.pdf). Stop: the stop command is used to interrupt the acquisition session. SD: the SD command activate a single data coming from LIS device. The output string is the same of the start and F start command but the output string is sent just one time. SV: the SV command is used to retrieve the version of the firmware loaded onto the Evaluation Kit. The output is an ASCII string looking like this: “eklvdq-vx.x.x”. DI: the DI command is used to retrieve informations about the MEMS device mounted on the Evaluation Kit Board. The output is an ASCII string looking like this: “LIS3LV02DQ QFN 28". 26/32 UM0382 7.2.3 Supported commands Configuration Commands The Configuration class commands are described in the following table. Table 2. Configuration Command Command Code Cmd Description ASCII Hex Write w (adr) (data) (xxx) 77 (adr) (data) (xxx) write data byte into register adr WriteBit W (adr) (bit #) (t/f) 57 (adr) (bit #) (t/f) write bit # into the reg adr Read r (adr) (xxx) (xxx) 72 (adr) (xxx) (xxx) read data byte from register adr ReadBit R (adr) (bit #) (t/f) 52 (adr) (bit #) (t/f) read bit # from reg adr Set S(DF1)(DF2)(DF3) 53 (DF1) (DF2) (DF3) special mode setting Write: this command is used to write a byte inside an accelerometer register. The address is identified by the byte (adr) while the data to be written is represented by the third field (data). WriteBit: this command is used to write a single bit inside an accelerometer register at position bit #. The address is identified by the byte (adr) while the data to be written is represented by the third field (t/f) true (to set the bit high) and false (reset the bit) where the two data are t {74} and f {66}. Read: read command allows to read the data present inside the LIS device register. The (adr) value is the EK3LV02DQ register address that the customer desires to read. The output string is composed by nine fields “RV reg_data reg_adr”, with R and V is the string with value {52 56}, the reg_data is the register content and reg_adr is its address. The other five fields can be considered as don’t care. ReadBit: read command allows to read the data present inside the EK3LV02DQ device register. The (adr) value is the LIS register address of the register that the customer desires to read. The output string is composed by “bit#7 bit#6 bit#5 bit#4 bit#3 bit#2 bit#1 bit#0 reg_data “, where bit#0....bit#7 are the eight bit contained in the register with address given by reg_adr. Set: this command allows the user able to change some settings of the firmware of the Evaluation Kit. DF1, Data Field1, is used to identify which feature the user wants to change; DF2, Data Field 2 and DF3, Data Field 3 contains the new data value to associate to the function specified by DF1. In particular DF1 is composed by the following configuration command:. Table 3. Data Field 1 configuration Cfg Code Cfg Cmd 3-state Description ASCII Hex A 41 SPI three state function 27/32 Supported commands 7.3 UM0382 Main communication commands This section shows the basic sequence of commands to start a data communication session and to retrieve the acceleration data from Evaluation kit: The first step is to connect the board and to bring the microcontroller out from 3-state mode: ek S ek A ek 0 ek 0 (ASCII) --> 65 68 53 65 68 41 65 68 30 65 68 30 (Hex) with these two command user can start the single data acquire session: ek O ek o ek u ek a (ASCII) --> 65 68 4F 65 68 6F 65 68 75 65 68 61 (Hex) or continue data acquisition: ek O ek o ek n ek n (ASCII) --> 65 68 4F 65 68 6F 65 68 6E 65 68 6E (Hex) the command to stop the acquire session is: ek O ek o ek f ek f (ASCII) --> 65 68 4F 65 68 6F 65 68 66 65 68 66 (Hex) In the same way the user can retrieve informations from the Evaluation Kit such as the version of the Firmware loaded onto the microcontroller. Note: 28/32 The commands supported by the Evaluation Kit are intended for the usage with a dedicated SW written by the user and running on PC. The method described above involving the usage of the hyper terminal is only intended to help the user to understand how to handle the communication with the board and not to acquire, to set and to manipulate data. USB_B V+ DM DP GND J1 D1 1 2 3 4 C8 47nF R6 1K5 R1 180R C9 220nF C10 + 10uF Rled Gled Vddf + VCC C1 10uF R7 10K 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 C4 C2 100nF 4u7F + C5 100nF UV ss UD M UD P UV cc UV dd Vd d f Vs sf PE5 PE6 PE7 PB0 PB1 PB2 PB3 PB4 PB5 64oscout 63osci n 62 61 60 59 58iccdata 57iccclk 56 55 54 53 52 51nRESET 50iccsel 49 SW2 SW3 R8 10K C3 4u7F PW M 0 AI N 6 AI N 5 AI N 4 AI N 3 AI N 2 OC M P2 OC M P1 PD 3 PD 2 PD 1 PD 0 PC 7 PC 6 PC 5 PC 4 OS C OU T OS C I N V ss2 V ssa Vd d a Vd d 2 I CCD A T A ICC C L K US B EN AI N 1 AI N 0 SD A SCL RE SET V pp /I CCSE L PW M1 PB6 PB7 PA 0 PA 1 PA 2 PA 3 PA 4 PA 5 PA 6 PA 7 SS MI SO MO SI SCK Vd d 1 Vs s1 17 18 19 20 cs_pad 21 22 23 data_read 24 25 26 27 28 29 30 31 32 + VCC 48 47 46 45 44 43 42 41 40 39 38 37 36 CS1 35 CS2 34 33 C6 100nF U2 ST7265X_TQFP64 MPD Cosc1 33pF oscin Gled D4 Rled R2 100R Vddf 12MHz Yoscm1 R3 100R Application Lab. EK3LV02DQ G Vddf miso mosi sck R J3 SPI Cosc2 33pF oscout CS2 CS1 sck miso mosi data_ready cs_pad TP1 VCC D3 ICP 1 3 5 7 9 J2 2 4 6 8 10 R5 100R iccdata iccclk nRESET iccsel data_ready Vddf NC GND Vdd Reserved GND RDY/INT NC Riccsel 10K 1 2 3 4 5 6 7 28 27 26 25 24 23 22 SW1 NReset C7 100nF NC Reserved Vdd Reserved GND CK NC NC NC NC NC NC NC NC NC SDO SDA/SDI/ SDO Vdd_IO SCL/SPC CS NC 8 9 10 11 12 13 14 miso mosi Vddf sck cs_pad 21 20 19 18 17 16 15 Vddf U1 LI S3LV0 2DQ 8 7 6 5 4 3 2 1 UM0382 Schematic diagram Schematic diagram The schematic diagram of the EK3LV02DQ evaluation kit is shown in Figure 25. Figure 25. Schematic diagram for EK3LV02DQ board 29/32 Bill Of Material 9 UM0382 Bill Of Material The Bill of Material for the EK3LV02DQ evaluation kit is given in Table 4. Table 4. 30/32 Bill Of Material Designator Description Comment Footprint C1 Capacitor 10u C1206_POL C2 Capacitor 4u7 C1206_POL C3 Capacitor 4u7 C1206_POL C4 Capacitor 100n 0805 C5 Capacitor 100n 0805 C6 Capacitor 100n 0805 C7 Capacitor 100n 0805 C8 Capacitor 47n 0805 C9 Capacitor 220n 0805 C10 Capacitor 10u C1206_POL Cosc1 Capacitor 33p 0805 Cosc2 Capacitor 33p 0805 D1 LED_SMD SMD_LED red SMD_LED D3 LED_SMD SMD_LED green SMD_LED D4 LED_SMD SMD_LED red/green SMD_LED_3C J1 USB connector USB_B USB_B J2 Header, 5x2 ICP HEADER_5X2_A J3 Header, 7-Pin SPI HDR1X7 R1 Resistor 180R 0805 R2 Resistor 100R 0805 R3 Resistor 100R 0805 R5 Resistor 100R 0805 R6 Resistor 1k5 0805 R7 Resistor 10K 0805 R8 Resistor 10K 0805 Riccsel1 Resistor 10k 0805 SW1 Button NReset SMT_Button SW2 Button SMT_Button SMT_Button SW3 Button SMT_ButtonQ SMT_Button U1 Accelerometer LIS3LV02DQ QFN28LD_NODIE5x5 U2 ST7 microcontroller ST72F651AR6T1E TQFP64_10x10 Yoscm1 Crystal 12MHz OSC_SMD UM0382 10 Revision history Revision history Table 5. Document revision history Date Revision Changes 2-Jan-2007 1 Initial release. 26-Jan-2007 2 The document now contains the User Manual, the Command Description, the Schematic and the BOM. 31/32 UM0382 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 32/32
EK3LV02DQ 价格&库存

很抱歉,暂时无法提供与“EK3LV02DQ”相匹配的价格&库存,您可以联系我们找货

免费人工找货