OK then, so i'll stop it here and skip the USART interrupt. In meantime, maybe you could use/read some part of what i've include.
What i did is to use a fixed string format using DEC5 modifier on the PIC side
So it always send 7 bytes to the PCCode:hserout ["aa",DEC5 WordA]
and on the PC side, i split the incoming string in 2 parts
Where IncommingData = MSComm1.Input, sWichOne hold the "aa", "bb" or else 2 character header, wValue hold the decimal value after the header.Code:sWichOne = Mid(IncommingData, 1, 2) ' get the header (two first character) wValue = Val(Right(IncommingData, 5)) ' get the value (5 last character)
no big deal.







Bookmarks