Author Topic: USB-Serial converters using 9-bit data / parity bit - will it work?  (Read 10693 times)

MJL

  • Member
  • ***
  • Posts: 2
I'm writing a Windows application in C# that will interface with an embedded device that I've made using the SerialPort class. The device is RS-485, so I have a RS-485 -> RS-232 -> USB setup. I'm using 8-bit data, but need to use the parity bit as a 9th data bit for command/data signalling purposes (so am using "mark/space" parity to signal the change of state in the parity bit). The device sends the 9th bit fine, and the application senses it when I connect the RS-485 -> RS-232 adapter directly to a legacy DB-9 serial port. The problem I'm having is in using the RS-232 -> USB adapter; it doesn't appear to be passing the parity bit (the application does not then sense the change in state). I've tried four different adapters now (a $1.99 special from eBay, and one each from Staples, Office Depot, and Radio Shack) -- none of them work with the parity setup. They all pass the 8 data bits just fine, though. Thanks for any ideas!

Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 2747
    • Lakeview Research
Re: USB-Serial converters using 9-bit data / parity bit - will it work?
« Reply #1 on: June 02, 2010, 04:48:02 pm »
Most adapters use chips and drivers from either FTDI or Prolific. FTDI says it supports parity. I don't know about Prolific. Look in Windows Device Manager to find out which driver your adapter is using.

You might try experimenting with adding delays between changing the parity and sending data.

You can buy FTDI adapters from FTDI or saelig.com.

Jan

MJL

  • Member
  • ***
  • Posts: 2
Re: USB-Serial converters using 9-bit data / parity bit - will it work?
« Reply #2 on: June 08, 2010, 03:48:31 pm »
The Prolific PL-2303 chip doesn't support it. I think they claim it does (and maybe newer versions do), but I've tried a generic adapter using that part and it doesn't work using the supplied driver.

I just got an FTDI-based adapter in last week, and it DOES pass the parity bit on through. Works like a charm. There's very little information on this issue to be found (probably because USB doesn't use parity error checking), so maybe you could included a blurb about it in the next edition of your book. Or somewhere on your website.

Thanks again, Jan!

Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 2747
    • Lakeview Research
Re: USB-Serial converters using 9-bit data / parity bit - will it work?
« Reply #3 on: June 09, 2010, 10:36:40 am »
I'm glad to hear you got it working. Thanks for the suggestion.

Jan