Academic Hardware Products (myDAQ, myRIO)

cancel
Showing results for 
Search instead for 
Did you mean: 

24 bit frame size SPI serial communications

Hi,

 

I am currently working on a digital weather station connected to a myRIO.

 

All the coding of the myRIO is done on Labview.

 

I have a pressure sensor that I have connected to the myRIO via the SPI interface. Unfortunately on completing the connection and after successfully writing commands to the pressure sensor I noticed that the pressure sensor replies in 24 bit frames. The maximum frame size labview seems to be able to read is 16 bit. 

 

Just wondered if anyone knew whether it was possible to work around this or whether I'm better off using I2C serial communication instead or getting a different pressure sensor.

 

Many Thanks

 

 

0 Kudos
Message 1 of 3
(5,804 Views)

Hey Simon,

 

You should be able to configure the amount of data that comes back from the device in chuncks of 8 bits.

Are you using the MyRIO SPI vis or did you write your own?

You may need to convert them to binary and reassemble them in a correct pattern but it should be possible without having to switch sensor or apis. 

Kyle Hartley
Senior Embedded Software Engineer

0 Kudos
Message 2 of 3
(5,799 Views)

Hi thanks for your response.

 

I have been using the SPI express Vis on labview.

 

I've been looking into how to up the frame size manually but no matter far I go into the express VIs code I seem unable to go above the 16 bit frame limit.

 

I think the best way is to set the reading frame size to 8 bits and see if I can make the myRIO stop transmitting until the three parts of the frame have been returned from the pressure sensor. 

 

Hopefully that will work! 

 

Thanks for letting me know its possible! 

0 Kudos
Message 3 of 3
(5,784 Views)