Hi Henrik,
Success, but..........!
First of all the success. I changed the PIC code to:
Then changed this line in the VB program:Code:SEROUT2 PORTC.3, 16780, [ z]
To:Code:Me.AddListBoxItem(SerialPort1.ReadExisting)
And away it went reading and displaying Random Bytes, brilliantCode:Me.AddListBoxItem(SerialPort1.ReadByte)
Now for the but part. I actually want the VB program to read a WORD sent from the PIC (a short in VB?) however for the AddListBoxItem(SerialPort1.Readxxxx there is:
ReadByte
ReadChar
ReadExisting
ReadLine
ReadTo
No ReadShort
Now I'm thinking somehow it's send a High Byte from the PIC then a Low Byte and join them together in VB, unless there's a 'ReadShort' option.
Dave






Bookmarks