Click here to Skip to main content
15,890,336 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am using the .net SerialPort component for handling a 9 bit transfer (NRI S1).
The MSB=1 means at the sending side the address/command byte, the following bytes are MSB=0 datas.
I handle it with the Parity=mark and space. It works...
At the receiving side I handle the DataReceived and ErrorReceived events (ParatyReplace = 0). It also works, I can get all the characters.
The MSB=1 designates the last data byte, otherwise it is 0.
How can I locate it?
I have not found anything about the Parity error state if it is mark or space. I guess, it generates error if I set space and received mark or set to mark and received space. Is it true?
I tried it, I got parity error, but I cannot locate its position. I read, that if it is the last byte of the buffer, the component appends a byte to the buffer with value of 126. But if there is not exists this byte at the end, where is the parity error position?

Please, help me!

Thanks for advance...
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900