I need help with my serial port routine. if I send any character above 0x7F it send out the serial port as 0x3F. What am I doing wrong? here's my code
|
|
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Danatas GerviPosted Sep 16, 2009, 8:44 AM
you should use
serialPort1.ReadByte();
not
serialPort1.ReadExisting();
Reason - .ReadExisting(); - converts your bytes to string, based on the encoding....