DEC may work or not, depending how your terminal will send your data. If he send CR+LF, this will screw your data for sure.
i've tried with
And it's working just fine, with terminators (CR+LF) or notCode:Command var byte SerialByte var byte hserout ["---- Ready ----",13,10] Start: while 1 if pir1.5 then hserin 10,jump,[Command, DEC3 SerialByte] gosub ManageBytes endif Jump: wend goto start ManageBytes: hserout ["Command=",Command,_ " SerialByte=", #SerialByte,13,10,13,10] return
depending of your Baudrate, 3.58 MHz may work fine or not. Worth to use the PicMultiCalc to see the error %




Bookmarks