Quantcast
Channel: LabVIEW topics
Viewing all articles
Browse latest Browse all 69019

Convert two U8 to single 12-bit hex

$
0
0

This should be really simple, but for some reason I'm struggling to find a solution.    I have some 12-bit Temperature sensor data embedded into two U8's.   I need to strip-out 4-bits from the MSB U8, and add them to the LSB U8 to get a temperature reading in HEX.  

 

I have attached a simple snippett VI which emulates the incoming data.   The MSB U8 is typically 04h, 14h, 84h, or 94h, depending on which sensor the FPGA is reading.   Currently, the reading goes bonkers when the  the MSB U8 switches from 04h to 14h, to read the second sensor.

 

Thanks

 


Viewing all articles
Browse latest Browse all 69019

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>