extracting highbyte and lowbyte into 16 bit from serial port
Posted: Mon Aug 31, 2020 9:12 pm
I have 2 bytes from a serial port that represent a 16 bit number. They arrive as highbyte and lowbyte of a 16 bit word.
I need to convert the 2 bytes back into a 16 bit number so I can show it in a text field.
Does anyone have an example on how to get the 2 received bytes back into a 16 bit number?
It looks like the 2 bytes received in Live code are in a binary 8 bit byte.... just need to convert the 2 bytes back into a 16 bit number.
Thanks.
I need to convert the 2 bytes back into a 16 bit number so I can show it in a text field.
Does anyone have an example on how to get the 2 received bytes back into a 16 bit number?
It looks like the 2 bytes received in Live code are in a binary 8 bit byte.... just need to convert the 2 bytes back into a 16 bit number.
Thanks.