01-07-2017 10:34 PM
I am really confused with this project. I have D/L the code and wired it accordingly:
VDD -- > Pin 33
GND --> PIN 30
SCL -- > PIN 21
SDA -- > PIN 25
SDO --> PIN 23
CS -- > PIN 13
I have little experience with MyRIO and LabVIEW so I may be in over my head but I have reviewed the code and it appears that I am not reading any values through the SPI ports. I noticed that the code calls for the DIO pin on channel B but the SPI terminals are set for channel A. Is the normal, or something I was supposed to configure?
01-09-2017 02:25 PM
Hi ZachTay25,
It looks like you have the setup wired correctly. I do not think that the differences in channels is going to cause any problems or need to be reconfigured. Could you describe a little more about what exactly happens when you run the example? Are you running into any specific errors when you run the code?
01-17-2017 02:39 PM
Nolan,
So if I hook up my IMU to channel A, but the digital outputs point to channel B and the SPI is configured to channel A, that is ok? Kind of contradicts the tutorials on NI's site.
I am not receiving any errors when I run the code. However the plots on the front panel of the main IV stay flatlined. I was told to try and hook up a digital analyzer to determine if something is wrong with the SPI communication. I am not familiar with this process but I'm coming up to speed. I would figure if there was a timing error in the code, then other on the forum would have mentioned but it seems other have had success.
Thanks for responding,
Zach
01-18-2017 04:59 PM
That should be fine. The digital output just needs to be low at the start of the data transmission and high at the end. Does your wire going to nCS pin on the MPU go to the same pin that is called in the code (pin 13 of channel B)? As long as the wiring matches what is called in the code, there should not be a problem there.
01-18-2017 09:28 PM
I have solved the problem. The Sparkfun breakout board comes with the ADO/SDO soldered to gound. So you have to desolder this SJ2 jumper and solder it to the left side in order to use SPI. For further explanation read this page: https://learn.sparkfun.com/tutorials/mpu-9250-hookup-guide?_ga=1.25846013.1927120872.1478207686
05-24-2017 11:21 AM - edited 05-24-2017 11:22 AM
I find that no matter what I write to the registers, I am receiving the same set of data starting from Acceleration, Temperature, Gyro and Compass.
in Read_data sub VI (see zero.JPG):
for example, I am sending zeros except the first byte (BB, if I send this as zero, I do not receive any data), I am still receiving the output in the above order. May I know why this happens?
And also what is the importance of 6401 bits?
in Initialize_loop sub VI (see init.JPG):
why do you have to send FFFF in the first 6 instances? and is there a specific order that I have to send the rest of the bytes?
05-31-2017 10:34 AM
Hi kumarasova,
Are you using the MPU-9250 IMU? If you are, please look at the MPU-9250-Register-Map for a list of corresponding hex values.
Please create a new post with your questions as this post will not generate as many views.
Josh
Applications Engineer
National Instruments
05-31-2017 10:50 AM
Hey Josh,
I am using MPU9250 IMU sparkfun breakout board. I am already using the register map document you are pointing me to.
I will create a new post as you mentioned.
08-14-2017 01:20 PM
Hi IllinoisControl
I adapted your code to run a on a raspberry + LINX together with MPU9250, but only the magnetometer part is not working.
Found on the web that to initialize the mag I need to send 0x02 to the 0x37 register (inside the 0x68 address). Do you know how can I do this?
I attached my code.
Thanks in advance.
08-15-2017 01:25 PM
If you want to reach IllinoisControls, you might send a direct message to them since this a fairly old forum post.
As far as your question goes, I think that this is something specific to the LINX protocol. You might want to try the LINX forums on Makerhub. People who use LINX are going to be more likely to be active on that forum, and they might have more insight on how to do something in LINX specifically.