IS-S04G1LC-S User Manual
IS-S04G1LC User Manual C Page 11 of 13
•
1120
8. ASCII Hex
All USB data is sent as ASCII hex as a safety measure to avoid being interpreted as a command.
ASCII hex is a normal data byte split into two halves and converted to their ASCII equivalent (see
). Therefore, all data received will be in the 0x30-0x46 number range, and
anything received outside that is invalid. For example:
Data to be sent is 0x3D.
Each nibble is assigned its own byte: 0x3 and 0xD.
Each of those bytes is converted to ASCII equivalent: 0x33 0x44 (0x33 is the ASCII number ‘3’. 0x44
is the ASCII letter ‘D’).
Receiving is the same process reversed:
Data received is 0x41 0x37.
Each byte converted from the ASCII equivalent is 0xA 0x
7 (0x41 is the ASCII letter ‘A’, 0x37 is the
ASCII number ‘7’).
Combine the two bytes to get the data byte 0xA7.