Re: checking for parity bit in serial frame
- From: "black_13" <jjosburn@xxxxxxxxx>
- Date: 12 Jun 2006 08:41:35 -0700
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
.
- Follow-Ups:
- Re: checking for parity bit in serial frame
- From: Scott McPhillips [MVP]
- Re: checking for parity bit in serial frame
- References:
- checking for parity bit in serial frame
- From: black_13
- checking for parity bit in serial frame
- Prev by Date: Re: SetWindowsHookEx Question.
- Next by Date: Re: checking for parity bit in serial frame
- Previous by thread: Re: checking for parity bit in serial frame
- Next by thread: Re: checking for parity bit in serial frame
- Index(es):
Relevant Pages
|