LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

MSB first or LSB first

Solved!
Go to solution

Hi,

 

How can I write an easy program (on Labview) that the word i send , on SPI, is on configuration LSB first or MSB first depending the user's choice.

 

Kind Regards

0 Kudos
Message 1 of 3
(7,927 Views)
Solution
Accepted by Julie26000

You would use the Swap Bytes function.

 

 

Use a Boolean control to allow for selection between LSB and MSB. LabVIEW is big endian (MSB LSB) internally. To send the word as LSB MSB, use the Swap Bytes function before passing the data over SPI. This could be done by passing the word through a case structure.

 

 Swap Bytes.jpg

Message 2 of 3
(7,908 Views)

Thanks!!!!

 

it's really easy, I have searched more difficult than that!

 

kinds regards

0 Kudos
Message 3 of 3
(7,898 Views)