问题
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