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
Code:
hserout ["aa",DEC5 WordA]
So it always send 7 bytes to the PC
and on the PC side, i split the incoming string in 2 parts
Code:
sWichOne = Mid(IncommingData, 1, 2) ' get the header (two first character)
wValue = Val(Right(IncommingData, 5)) ' get the value (5 last character)
Where IncommingData = MSComm1.Input, sWichOne hold the "aa", "bb" or else 2 character header, wValue hold the decimal value after the header.
no big deal.
Bookmarks