Hello, I have a C# application which send somebytes to PC via serialport. I observe that bytes which are higher than 0x7F are converted to 0x3F (which is '?' in ASCII). I tried to set serialport's encoding to UTF8 in miniarm, but it didn't help. Do you have any suggestions?
Serialport Problem
Thank you but the method is special to Franson's API. I tried something similar to that as follows, but didn't work. I still receive 0x3F for values higher than 0x7F. .... .... byte[] buffer = new byte[16]; buffer[0] = 0xA7; buffer[1] = 0x03; buffer[2] = 0x04; buffer[3] = 0x00; buffer[4] = 0x88; buffer[5] = 0x01; string str2Send = System.Text.Encoding.UTF8.GetString(buffer, 0, 6); serialPort.Write(str2Send); ... ...
And for every value lower than 0x3f works ok? I recommend you try all the values. If all the values are ok, verify serial ports, in txer and receiver, are both configured as 8 data bits.
Yes, they are all ok (lower than 0x3f). How do we verify transmitter and receiver? Do you mean driver or c# code? Thank you, Jashgowie
Your problem is not baudrate, because if it was a baudrate problem, you would have some databytes (maybe) received ok, and some other received not ok. 0x3F is six bits long... one question... did you try to send bytes "individually", and not with the getstring function?