LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

most or least sign.bit first in serial comm

Hi!

Maybe simple but i wonder it anyway. When you send or recieve a byte with visa serial write/read;
how do the bits come? With the most or least significant bit first?

/Fred
0 Kudos
Message 1 of 4
(2,660 Views)
Does it matter? You cannot read individual bits from a serial com port anyway. You get the whole byte with the significant bits in the right order. You can then convert the byte to a bit array. If this is still important, I would say the least significant is sent first. You can verify this by sending a byte at an extremely low speed (300 baud) and use a breakout box to see the bit pattern, or use a scope to display the waveform.
- tbob

Inventor of the WORM Global
0 Kudos
Message 2 of 4
(2,653 Views)
Hi!

I recieve a 16 bit sampled value from hardware and the readfunction take 8 bit at a time (1 byte).
When I get these 2 bytes from readfunction I must put them together correctly or a totally "wrong"
value will be plotted!!

/Fred
0 Kudos
Message 3 of 4
(2,645 Views)
The two bytes can be put together to form one number by using the Join Numbers function found in Functions Palette - Advanced - Data Manipulation. Try putting your first byte on top, second on bottom of Join Numbers input. If this gives incorrect results, swap the inputs.
- tbob

Inventor of the WORM Global
0 Kudos
Message 4 of 4
(2,641 Views)