12-11-2012 07:45 AM
Hello,
I need to send a bitstream to a Arduino with rs232 ,the bitstream has to be converted in to Hex nybbles and send as a hex character/
the bitstream looks like this 0,0,0,1,1 etc as a I8 array.
I have to send a string with characters T1A followed by the Bitstream in Hex terminated with a X.
How can i convert the bitstream to Hex characters?
Anyhelp is deeply appreciated,
Philip
Holland
Solved! Go to Solution.
12-11-2012 08:04 AM
Any particular reason the bitstream is an I8 array instead of a boolean array?
If you were working with booleans, you could Boolean to Number and be done.
With the I8, you'll have to do some bitwise manipulation.
Brute force would be to loop through and use shifts and ORs to pack your 8-bit hex number.
12-11-2012 08:06 AM
I get the bitstream from a pocsag encode vi, can i convert this bitstream to booleans?
12-11-2012 08:10 AM
There are two LabVIEW functions you want to learn to use:
12-11-2012 08:11 AM
As a quick thought, you could loop through your I8 and use a selector to build an array of Booleans. Then use the Boolean Array to Number function on the array of Booleans. This seems a bit Rube Goldbergish though.
12-11-2012 03:44 PM
Solved it, made U8 to Boolean array in a loop ,had to reverse the bit order.
Tnx all