Re: checking for parity bit in serial frame

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance




Pavel A. wrote:
"black_13" wrote:
i have a protocol with which the start of a message is indicated by the
parity
bit being set. the length of the message could be a single byte or
multiple bytes
but the parity bit indicates the start of an individual message. i
would like to know how to check whether or not parity bit has been set.

This sort of protocol was once quite common in micro controller world
but IMHO you can't use it with the "standard" PC UART and driver.
The other reply mentions some tricks that may help, but
not if you send 8 data bits + parity *and* the protocol
is time sensitive (like Modbus).

What you can do:
1. Find a ready uC board that can natively handle this protocol
and convert it to something usable by Windows PC.
2. Write a custom UART driver

Regards,
--PA

unfortunately i have no experience with
serial programming but i have purchase somed books but i have not
come across how to determine if the parity bit i set could someone
direct me to some only information or the correct api that
would address this.

thanks
black_13

here is a short excerpt of manual that describes the
protocol I am using

Communication between the master and slave are through a serial
data link operating at 19.2 kbaud in a "wakeup" mode.
The 11-bit data packat consists of one start bit, eight data bits a
ninth
'wakeup' bit, and one stop bit.

In wakeup mode the host sets the 9th wakeup bit each time the it sends
the
first byte of a message to the slave. For all additional bytes in the
message, this
bit is cleared. Slave machines use the wakaeup bit to determind whether

the received byte is the first byte of a new message or an additional
byte of the current message.

the manual goes on to state that the slave must
respond to the request in no less that 45 milliseconds. Also i do
know that a common pc UART have been succesfully used under
linux and i have seen a compative software product that did so
under win32 (not that i yet know how to do so).can you offer any advice
on how to read the wakeup wakeupbit.
Thanks
black_13

.



Relevant Pages

  • Serial communication, detecting parity bits
    ... I'm in the process of writing some code that will use RS-232 and a somewhat old protocol to speak to some external hardware. ... All serial communication programming I have done so far have beem blissfully unaware of parity bits, ... Is there some way that I can figure out if the wakeup or parity bit was set on a specific byte in the stream that I have read from the serial port? ...
    (comp.os.linux.development.system)
  • Re: Serial communication, detecting parity bits
    ... >>the wakeup or parity bit was set on a specific byte in the ... "parity" bit is used to mark the first byte in a frame. ... it has support for explicitly settign the ... interrupt with it's received as a 1. ...
    (comp.os.linux.development.system)
  • Re: Serial communication, detecting parity bits
    ... the Stick Parity bit in the 8250 -family of serial ... >bytes that has a parity error will be prefixed with the bytes ... >wakeup bit had for each byte. ... >data stream contains the combination 0xff 0x00. ...
    (comp.os.linux.development.system)
  • Re: Serial communication, detecting parity bits
    ... by-passes the parity generation, creating a ninth bit which can be controlled with the even/odd parity bit. ... Since the protocol that I have to use does not use any parity but uses the wakeup bit I can set my serial port to use either even or odd parity and then bytes that has a parity error will be prefixed with the bytes 0xff and 0x00. ... The only thing I worried about now is what will happen if my the data stream contains the combination 0xff 0x00. ...
    (comp.os.linux.development.system)
  • Re: DES key parity bits. What is the correct story?
    ... code that communicates with other systems using a well defined protocol: ... parity bits, it would be foolish to rely on that behavior. ... because DES is 40 years old and nobody should use it. ... DEA by IBM) ...
    (sci.crypt)