Hi all,
I've been able to get error free comms by sending the variables as high and low bytes (debug "aa", stepcnt.byte1, stepcnt.byte0). The same is not true when I send the variable as
DEBUG "aa", stepcnt
My steps taken to covert for display;
cmdword = Left(displaystr, 2) ' rip out the command 'aa'
newstring = asc(mid$, 3, 2)) ' put the rest of the word into var
Lbyte = newstring AND &H255
Hbyte = (newstring - Lbyte) / &H100
word = (Hbyte * &H100) OR Lbyte
Text.text=word
This seems to work on paper. I've also swapped high and low around as I think the PIC sends the low order byte first?
Even though I've got the project working well, could someone explain the correct way to strip data using VB.
Most appreciated
John




Bookmarks