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
(6,953 Views)
Solution
Accepted by topic author 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


Now is the right time to use %^<%Y-%m-%dT%H:%M:%S%3uZ>T
If you don't hate time zones, you're not a real programmer.

"You are what you don't automate"
Inplaceness is synonymous with insidiousness

Message 2 of 3
(6,934 Views)

Thanks!!!!

 

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

 

kinds regards

0 Kudos
Message 3 of 3
(6,924 Views)