As Steve said, post your code so we do not have to guess. If your data is in ASCII, then
Decimal 0 = 48 in ASCII
Decimal 1 = 49 in ASCII
Decimal 2 = 40 in ASCII
etc.
You can convert your received ASCII numbers to decimal by
Code:
X VAR Byte ' Received value
X = X – 48 ' convert from ASCII to decimal (or X = X - “0” does the same thing)
If X < 7 THEN Something ' your compare
or you could do your compare like this
Code:
X VAR Byte ' Received value
If X < “7” THEN Something ' “7” = decimal 55 but is 7 in ASCII
Again, post your code if you cannot make yours work.
Paul Borgmeier
Salt Lake City, Utah
USA
Bookmarks