Unusual pattern of data corruption over serial port

扶醉桌前 提交于 2019-12-11 09:34:25

问题


I'm testing my application's receipt of data over a serial port by sending data from Windows HyperTerminal and this mostly works. For example if I send :

The Quick Brown Fox

I receive :

The Quick Brown Fox

However, if I send :

UUUUUUUUUUU

I receive

UUÕUÕUÕUÕUÕ

or if I send :

aaaaaaaaaaa

I receive :

aaáaáaáaáaá

so for any repeated character string longer than 2, then the 3rd, 5th, 7th etc. characters are corrupted by having their high bit set.

The serial port settings on both machines are identical.


回答1:


I've found this: http://seetron.com/archive/html/ht_tip1.htm

The last paragraph says:

Saved configurations can be corrupted in odd ways. The most obvious symptom is that typing the same character three times in a row causes the third instance of the character to be sent incorrectly. In other cases, the terminal program fails to work altogether. The only fix we know of is to create a new configuration from scratch, as described above.

Sound familiar?



来源:https://stackoverflow.com/questions/27174898/unusual-pattern-of-data-corruption-over-serial-port

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!