
Originally Posted by
PlantBob
I am using MAX32 between the PC and PIC.
HSEROUT works every time no matter what I send. Thank makes me assume that the BAUD issue is OK.
Ok, just checking, didn't have that info before.
Like I said before, don't send the raw hex data back and forth, just send the characters themselves.
Code:
MyVars VAR BYTE[8] : temp var byte
Main: HSERIN 5000,NoData,[STR MyVars\6\":"]
HSEROUT ["Received:", STR myvars\8",13,10] : goto main
NoData: HSEROUT ["Timeout",$0d,$0a]
for temp = 0 to 8 : myvars[temp]=0 : next temp 'clean out myvars
Goto main
At the PC, type in a few characters (no hex codes, nothing crazy, just a few alpha or number characters), followed by the : character.
The code above should wait for 5 seconds to 1)get no data, 2) get 6 bytes of data, or 3)will kick out and send back the data you just sent if you sent a : before you sent a total of 6 bytes.
Bookmarks