01-22-2014 06:04 PM
Good evening,
I am attempting to use an NI-8452 to communicate with an Invensense MPU-6000-EVB using an SPI protocol. It's an accelerometer/gyrometer/magnetometer sensor. I'm a bit rusty with LV, and so I'm trying to modify existing code (specifically, the examples found in General SPI Read.vi and General SPI Write.vi as the first steps in my development. I was wondering if any in the community had experience in this area, and could offer advice.
For reference, I can offer:
MPU-6000 Evaluation Board User Guide (which is the physical board to which I am connecting the 8452)
MPU-6000 Product Specification (which details the chip information)
MPU-6000 Register Map (which defines where the information is accessed)
Thanks!
01-23-2014 07:34 PM
Hi gpsmith,
The examples in the Example Finder are the best resource for getting started. Below are a few more resources that may be helpful. The follow link is to a FAQ article for using SPI and the 845x series modules:
http://www.ni.com/white-paper/7448/en/
Also, the following manual describes the SPI LabVIEW API pretty thoroughly and may also be a good resource:
http://www.ni.com/pdf/manuals/371746e.pdf
01-23-2014 07:56 PM
Thanks for the advice. I'd already found and read those resources. However, much of the information seems discrete in nature, and hard to translate to a general case.
For example, the SPI Read example VI sets up an array that is transmitted to an EEPROM. The contents of this array consists of the read instruction, the memory address, and the bits to transfer. I'm uncertain if this structure applies to all SPI devices, or if the header on each device is customized for the device. In other words, do all SPI devices share the same read instruction??
Thanks!
01-24-2014 12:55 PM
Hi gpsmith,
To communicate with your device, you will need to delete all of the parts in the examples that configure the write for EEPROM. Instead, you will just feed the raw bytes containing the instructions/commands/data into the SPI Write Read VI. The proper format for the write command is device specific. You will need to contact the device manufacturer for further insight as to how exactly the write and read need to be configured.