split a 2 digit number into seperate digits

BeanieBots

Moderator
Or use the "bintoascii" command but note that it will give you the ascii values (for sending to terminal or display) ie. "2" & "3" rather than 2 & 3.
 

westaust55

Moderator
Or use the "bintoascii" command but note that it will give you the ascii values (for sending to terminal or display) ie. "2" & "3" rather than 2 & 3.
If you do not need them as ASCII coded values but as simple digits (0 to 9),
just subtract 48 ($30) from each separated byte value
 
Top