Page 1 of 1
Sending Data in DEC format
Posted: Wed May 21, 2014 6:07 pm
by jersagfast
Hi Guys, I have a piece of hardware that has an RS-232 connection, but requires data to be sent to it in decimal format (not ASCII numbers). I know I can send HEX data with a \x prefix, but is there a way to send data in decimal format? Any help would be greatly appreciated, thanks.

Re: Sending Data in DEC format
Posted: Mon May 26, 2014 8:58 am
by DemoPad
Just convert the decimal value to hex, and send the hex equivalent. At the end of the day, any data sent via DemoPad is sent as neither hex,ascii,or decimal, it is sent as binary data in bytes. You just need to decide which bytes to send, and you enter them in hex format in our software.
Eg: to send a decimal value of 7, send:
\x07
To send a decimal value of 255, send:
\xFF