maybe this can help you :
in = "4D4D4953434F4F4C"
gosub [sub.from.hex]
print out
end
'input variable in
'output variable out
[sub.from.hex]
out = ""
for i = 1 to len(in)
a = asc(mid(in,i,1)) - 48
if (a > 9) then a = a - 7
i = i + 1
b = asc(mid(in,i,1)) - 48
if (b > 9) then b = b - 7
c = a << 4 or b
out = out & chr(c)
next i
return
This is a simple function that converts a string containing hex chars in text format to a string that contains the equivalent chars in binary format.
fill the string in the variable 'in' (ex. in = "C30D0A") ; the chars must be upper case and in couple (multiple of 2)
then call the sub (gosub [sub.from.hex])
the result will be in the variable out (ex. serialprint out)
Hoping this can be useful also to other people
CiccioCB