The parity bit that this is referring to is a bit in an on-chip transmit control register. This register has to be modified to cause the chip generated parity bit to be set to indicate an address byte. And then be modified again to turn off address-mode.

My guess is the Device::SerialPort module doesn't use it's parity argument for this purpose.

Of course it does not. It becomes obvious when you read the POD of Device::SerialPort:

parity

One of the following: "none", "odd", "even".

To use the parity bit for non-parity purposes, you would need other values, e.g. "mark" and "space" or simply "0" and "1".

Also, parity() is one of the configuration parameter methods, not an operating method. It is not clear if changing the parity at operation time is supported:

Some individual parameters (eg. baudrate) can be changed after the initialization is completed. These will be validated and will update the serial driver as required.

Just to see an alternative implementation of a non-PC USART, here is a part of the documentation for the SERCOM peripheral of the Atmel/Microchip SAM D21 in USART Mode. It is also available in other SAMs, like the L21 and the D5x/E5x:

USART Features

Note that neither mark or space are supported for parity, but you can transfer 9 data bits. The data register is 16 bits wide to support using 9 data bits.

If you want to drive people really mad, you use 9 bit mode with parity enabled and two stop bits. This ends with a line format of 13 bits (1 start + 9 data + 1 parity + 2 stop bits), and only a few other U(S)ARTs will be able to send or receive that format.

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^6: 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.