Home

PDF document

image

Contents

1. a AN 002 Interfacing the KXP94 or KXR94 Tri Axis Accelerometer Klo n ix R with the Texas Instruments MSP430F149 Microprocessor to Measure Tilt and Other Motions This application report describes how to integrate the Kionix KXP94 or the KXR94 tri axis accelerometer with the MSP430F149 to capture and utilize the motion sensing capabilities of the accelerometer Example code is provided for capturing and using tilt sensing vibration sensing and acceleration Source code is provided for the MSP430F149 as well as source code for the demonstration software drivers and applications Introduction Kionix linear accelerometers function on the principle of differential capacitance Acceleration causes displacement of a silicon structure resulting in a change in capacitance A signal conditioning CMOS technology ASIC detects and transforms changes in capacitance into an analog output voltage which is proportional to acceleration The output voltage is sent to the MSP430F149 ADC for conversion to a digital signal This signal can then be sent to a serial port an IR chip a flash NAND for storage a USB port through SPI or C to another processor etc A serial port is used for the following examples In the examples that follow the MSP430F149 waits for user input via the serial port to retrieve the requested data from the accelerometer The analog output voltages generated by the KXP94 or KXR94 are sent to the MSP430F149 ADC for conversion to a dig
2. proportional to acceleration These outputs can then be sent to a micro controller for integration into various applications Kionix technology provides for X Y and Z axis sensing on a single silicon chip One accelerometer can be used to enable a variety of simultaneous features including but not limited to e Drop force modeling for warranty management e Hard disk drive shock protection e Tilt screen navigation e Theft man down accident alarm e Image stability screen orientation e Computer pointer e Navigation mapping e Game playing For product summaries specifications and schematics please refer to the Kionix accelerometer product sheets at http www kionix com sensors accelerometer products html Kionix 2007 q 5 June 2007 Kionix Page 5 of 5
3. com sensors evaluation kits html The schematic for the KX 94 DEV V1 is shown on the following page Kionix 2007 q 5 June 2007 Kionix Page 3 of 3 AN 002 AN 002 puoog Q v 01495 mun Ou Xiuoly ANYdNOD ASn3 104 8I40BOZ 41v sn TID eo ax MID Di Db aD P wD sD TID rb AbD a xvv1 Uid SRB BUA p q EY iat sur En Qd 3 oo Lapis pa BRIITTEISLNS m n o o e 2 c 2 9 5 June 2007 Page 4 of 4 AN 002 Software Demos for the Development Board A variety of small applications which work with the development board and will run on a Windows based PC is available at http www kionix com sensors downloads html Download the latest version of the file named Kionix Demonstration Software An executable installer will install the demonstration software on your computer For more information about how to use the software with the development board please refer to the User s Manual for the KX_94 DEV V1 Development Board available at http www kionix com sensors evaluation kits html Theory of Operation Kionix MEMS linear tri axis accelerometers function on the principle of differential capacitance Acceleration causes displacement of a silicon structure resulting in a change in capacitance A signal conditioning CMOS technology ASIC detects and transforms changes in capacitance into an analog output voltage which is
4. ital signal The MSP430F149 moves the digital data to a buffer and then sends the data via the USART to the serial port The data now in numerical format is received by the software driver see example code converted to actual g force and then sent to the calling program see example code Software Implementation Example Software Drivers and Demos MSP430F 149 Code skkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk MSP FET430P140 Demo ADC12 Sequence of Conversions non repeated Description This program will show how to convert a non repeated sequence of channels This example shows how to perform A D conversions on a sequence of channels A single sequence of conversions is performed one conversion each on channels AO A1 A2 and A3 Each conversion uses AVcc and AVss for the references The conversion results are stored in ADC12MEMO ADC12MEM1 ADC12MEM2 and ADC12MEMS respectively and are moved to R5 R6 R7 and R8 respectively after the sequence is complete Test by applying voltages to pins AO A1 A2 and A3 then setting and running to a break point at jmp Mainloop To view the conversion results open a register window in C Spy and view the contents of R5 R6 R7 and R8 Note that a sequence has no restrictions on which channels are converted For example a valid sequence could be AO A3 A2 A4 A2 A1 AO and AT 36 Thornwood Dr Ithaca NY 14850 Kion
5. ix 2007 tel 607 257 1080 fax 607 257 1146 5 June 2007 www kionix com info kionix com Page 1 of 1 AN 002 See the MSP430x1xx User s Guide for instructions on using the ADC12 Note This example only functions on MSP production silicon not PMS pre production silicon Production silicon will be noted on the chip as M430F 149 whereas pre production silicon will be marked P430F 149 MSP430F 149 AQ lt Vind A1 lt Vin1 A2 lt Vin2 A3 lt Vin3 M Mitchell Texas Instruments Inc January 2004 ee hee e he he e e he hee e he e he e e ehe k hee hee e hee ehe hee he hee ehe hee hee ehe ehe ehe ehe ehe e hee hee heec ehe ee ehe ehe hee eee e include msp430x14x h Standard Equations main ORG 01100h Program Start RESET mov 0A00h SP Initialize stackpointer StopWDT mov WDTPW WDTHOLD amp WDTCTL Stop watchdog bis b BITO BIT1 BIT2 BIT3 amp P6SEL Enable A D channel inputs SetupADC12 mov ZADC120N MSC SHTO 2 amp ADC12CTLO Turn on ADC12 set MSC mov ZSHP CONSEQ 1 amp ADC12CTL1 Use samp timer single sequence bis b ZINCH 0 amp ADC12MCTLO AVcc ref channel A0 bis b ZINCH 1 amp ADC12MCTL1 AVcc ref channel A1 bis b ZINCH 2 amp ADC12MCTL2 AVcc ref channel A2 bis b INCH_3 EOS amp ADC12MCTL3 AVcc ref channel A3 end seq mov BIT3 amp ADC12IE Enable ADC12IFG 0 for ADC12MEMO bis ENC amp ADC12CTLO Enable conversions eint Enable interrupts Mainl
6. oop bis ADC12SC amp ADC12CTLO Start conversions bis CPUOFF SR Wait in LPMO for seq to complete nop Only Required for CSPY jmp Mainloop SET BREAKPOINT HERE bic CPUOFF 0 SP mov amp ADC12MEMO R5 Move AO result mov amp ADC12MEM1 R6 Move A1 result mov amp ADC12MEM2 R7 Move A2 result mov amp ADC12MEM3 R8 Move A3 result IFG is reset reti i Kionix 2007 q 5 June 2007 Kionix Page 2 of 2 ORG OFFFEh MSP430 RESET Vector DW RESET i ORG OFFEEh ADC12 Interrupt Vector DW ADC12ISR END Software Driver Example Pseudo code For Retrieving An Acceleration Reading SerialPort send x For this example the requested axis will be X Reading SerialPort recieve 2 bytes Nalue is sent as a 2 byte integer Voltage Reading 4096 This ratio is defined by the A D converter Acceleration Voltage 1000 Sensitivity Sensitivity is in mv g Acceleration AdjustmentX Center reading based on earlier calibration return Acceleration Acceleration is returned in g s Hardware Implementation Kionix has designed and built a small development board that interfaces a KXP94 or KXR94 with the Texas Instruments MSP430F149 The KXP94 DEV V1 KXP94 2050 Development Board or the KXR94 DEV V1 KXR94 2050 Development Board allows users to rapidly develop motion based applications using the processing capabilities of the MSP430F149 boards and evaluation boards are available at http www kionix

Download Pdf Manuals

image

Related Search

Related Contents

User manual Boot manager Boot−US  Intel SR1690WBR server barebone  ECONOMINDER MODELO 9000  Manual del usuario industrial de REACH-IT - ECHA  Business Objects Upgrade to Crystal Reports Developer Edition XI  Manuel d`utilisation – BioSpectrometer kinetic  Guía del Usuario  LIGHTING CONSOLE  Toshiba Satellite P755-S5395  

Copyright © All rights reserved.
Failed to retrieve file