Announcement

Collapse
No announcement yet.

Comm and Width

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #21
    Tom and CC,
    <<With 8 bits, you can only have "N" parity.>>

    The following works fine in PB3.5.
    I can confirm it sends out 11 bits, 1 start bit, 8 data bits, 1 Even parity and 1 stop. Change the "E" to "O" in the OPEN COM and it works with Odd parity too.
    Code:
    open "com2:9600,E,8,1,cs0,cd0,ds0" as #1
    There is no reason for any restriction in the data format, the number of bits and the type of parity are not linked, they have independent control bits in the UART Line Control Register.

    Paul.

    Comment


    • #22
      With the original PC UARTs, the only option supported for "8 bits"
      was "no parity". It may be that this is no longer a typical hardware
      limitation, I don't know.

      ------------------
      Tom Hanlin
      PowerBASIC Staff

      Comment


      • #23
        Tom,
        perhaps there was some software reason for that in early PC's, but I'm not aware of any (at the time I wasn't into PC stuff).

        As far as I know the 8250 UART has no trouble parity and 8-bits, it's problem was the 9600 baud limit. If I get around to it I'll dig my 8088 PC out of the loft and confirm it!

        Paul.

        Comment


        • #24
          Originally posted by Paul Dixon:
          ...I'll dig my 8088 PC...
          Make sure you have a copy of "War & Peace" handy while it's booting


          ------------------
          There are no atheists in a fox hole or the morning of a math test.
          If my flag offends you, I'll help you pack.

          Comment


          • #25
            Mel,
            without timing it first I'd bet you a pint it boots to a DOS prompt quicker than yours boots to WinXP!

            Paul.

            --The edit--
            Well, I suppose all bets are off. I've dug the computer out.
            The hard disk doesn't work so I'm at a disadvantage booting from floppy.

            On the other hand, it turns out it's a 8086 8MHz so I'm at a huge advantage over an 8088!

            But it only takes 34 seconds from power on to DOS3.2 prompt, beat that with XP! (or98 even)

            As for the serial port, it has the option for 8 bits and Even, Odd or No parity!

            Paul.


            [This message has been edited by Paul Dixon (edited September 15, 2003).]

            Comment


            • #26
              As far as I know the 8250 UART has no trouble parity and 8-bits, it's problem was the 9600 baud limit.
              There was no such limit. The chip could support up to 115,200 bps. Odds are, the CPU
              couldn't keep up with anything close to that for very long, but it wasn't due to a UART
              limitation.

              As for the serial port, it has the option for 8 bits and Even, Odd or No parity!
              The software might not have complained, but the hardware did not offer that support, to the best
              of my knowledge, and I used to write interrupt-driven serial comm drivers. Could be I'm mistaken,
              as it's been a few years. The QB4 docs do have this to say: "If you set the data bits per byte
              to eight, you must specify no parity (N)."


              ------------------
              Tom Hanlin
              PowerBASIC Staff

              Comment


              • #27
                Mel,

                I think too there is no need to fix the bug (if it is a bug...). If you don't peek the Rx chars, your program doesn't care about the Rx activity. For instance, the ERROR 69 (communication buffer overflow) is only raised when you INPUT the Rx chars (as are raised all the other Rx errors, like parity error). Hence if you open the comm, there is a Rx activity and you don't poll it, you'll never have unexpected Rx errors - this is true if you open the comm either FOR OUTPUT or not.

                --------------------

                [This message has been edited by Aldo Cavini (edited September 16, 2003).]
                Rgds, Aldo

                Comment

                Working...
                X