your stated data format looks funny. 1 start bit is ok. 1 stop bit is ok. 8 data bits dictates no parity, not odd parity. Serial data bytes are 8 bits, not 11.

That's not quite correct. With a PC-standard serial port (i.e. 8250, 16450, 16550, and generations of clones embedded in various chipsets), you can freely choose any combination of 5 to 8 data bits, 1 or 2 stop bits, and None, Even, or Odd parity. There is always only one start bit. Combined, the minimum number of bits in one serial frame is used in 5N1, i.e. one start bit, 5 data bits, No parity bit, 1 stop bit, for a total of only 7 bit. The maximum number is 8E2 or 8O2, i.e. one start bit, 8 data bits, 1 parity bit (even or odd), 2 stop bits, for a total of 12 bit. (Note: Nobody uses the total number of bits. Only the number of data and stop bits are specified.)

5 data bits are nearly exclusively used for old teletypes, I've never seen anything using 6 data bits, 7 and 8 data bits are quite common for general communication. 7 data bits are often used with parity, 8 data bits are often used without parity, but as I wrote: data bits and parity bits can be used in any combination.

When using other serial ports (e.g. on embedded systems), you can often also select mark or space in place of the parity bit (i.e. fixed 0 or fixed 1). Some UARTs also support 9 data bits, just to confuse you further. Also, 1.5 stop bits are possible, but rare.

See also Serial port.

Update: Mark and Space in place of the parity bit is supported by PC-standard serial ports, so you can choose from None, Even, Odd, Mark, Space for the parity bit. Some embedded controllers do not support mark and space for the parity bit.

Alexander

--
Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)

In reply to Re^2: How to read serial port with WIN32:SerialPort? by afoken
in thread How to read serial port with WIN32:SerialPort? by mastertone

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.