allsopp
asked on
Reading Binary Data from Serial Port
I need to read binary data from a serial port. The data is in the format of 23 single byte values. After the values are read I need to combine pairs of byte values (high and low) to get a 16 bit value.
I have read text values from the serial port before but have no experience in binary data. How do I ....
1) read binary data into a variable?
2) convert high and low single byte values into one 16 bit value?
Some simple code examples would be appreciated.
I have read text values from the serial port before but have no experience in binary data. How do I ....
1) read binary data into a variable?
2) convert high and low single byte values into one 16 bit value?
Some simple code examples would be appreciated.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
thinking
the parallel port is much easier to manipulate in vb, if you get dlportio from DriverLINX you can just use a function to return a value for the port,, but if the equiptment you are using will only support the serial port then it will be quite a bit harder to do
ASKER
The equipment is a radio tx/rx unit with a receiver that outputs to RS485 serial.
The code example you provided worked perfectly first time so the points are yours
The code example you provided worked perfectly first time so the points are yours
Sounds like fun whatever you're doing!
ASKER