EmbeddedRelated.com
Forums

Looking for 9 bit RS485 solutions

Started by Unknown October 17, 2007
Hi,

We have various products that interface to Point Of Sale terminals
(a.k.a. cash registers).  These use IBM's 4683 protocol which is a 9
bit (address bit) RS485 bus.  We'd like to build some test tools so we
don't have to always use a POS terminal.

Anyone know of any 9bit 485 adapters, converters, etc.?  My strong
preference is a USB/Ethernet to 9 bit 485 adapter.  Second preference
would be an internal PCI adapter.  One more thing--we need to set the
baud rate to 187.5 kbaud (187500 baud).  An RS232 to 9 bit 485 (if one
exists) would be OK too.

Making something using a micro is not a good option (manpower
constraints).  A store bought solution is what's desired.

I've been searching for hours and found one solution.  It's a Windows
driver that uses the parity bit on the 16550 UART to emulate 9 bit.
We would then add an RS232 to 485 converter.  I don't know yet if the
PC can set its baud rate to 187.5 kbaud, but also I don't really care
much for that approach.  Portability is going to be an issue if that
driver can only be installed on one PC.  Also, PCs with RS232 are not
as common anymore.

So, can anyone help?


Thanks much,


Jim Rosetti

In article <1192631451.192804.36340@e34g2000pro.googlegroups.com>, 
james.ro123@yahoo.com says...
> Hi, > > We have various products that interface to Point Of Sale terminals > (a.k.a. cash registers). These use IBM's 4683 protocol which is a 9 > bit (address bit) RS485 bus. We'd like to build some test tools so we > don't have to always use a POS terminal. > > Anyone know of any 9bit 485 adapters, converters, etc.? My strong > preference is a USB/Ethernet to 9 bit 485 adapter. Second preference > would be an internal PCI adapter. One more thing--we need to set the > baud rate to 187.5 kbaud (187500 baud). An RS232 to 9 bit 485 (if one > exists) would be OK too. > > Making something using a micro is not a good option (manpower > constraints). A store bought solution is what's desired. > > I've been searching for hours and found one solution. It's a Windows > driver that uses the parity bit on the 16550 UART to emulate 9 bit. > We would then add an RS232 to 485 converter. I don't know yet if the > PC can set its baud rate to 187.5 kbaud, but also I don't really care > much for that approach. Portability is going to be an issue if that > driver can only be installed on one PC. Also, PCs with RS232 are not > as common anymore. > > So, can anyone help? > > > Thanks much, > > > Jim Rosetti >
Using a PC and forced MARK/SPACE parity is pretty much the "standard" way to emulate 9 bit addressing and that does not require any kind of driver to pull off. Any decent comm library is going to include such things. The baud rate, on the other hand, might be a bit tougher. Without looking up any data, the number seems a bit strange. Jim
On 2007-10-17, james.ro123@yahoo.com <james.ro123@yahoo.com> wrote:
> Hi, > > We have various products that interface to Point Of Sale terminals > (a.k.a. cash registers). These use IBM's 4683 protocol which is a 9 > bit (address bit) RS485 bus. We'd like to build some test tools so we > don't have to always use a POS terminal. > > Anyone know of any 9bit 485 adapters, converters, etc.? My strong > preference is a USB/Ethernet to 9 bit 485 adapter. Second preference > would be an internal PCI adapter. One more thing--we need to set the > baud rate to 187.5 kbaud (187500 baud). An RS232 to 9 bit 485 (if one > exists) would be OK too. > > Making something using a micro is not a good option (manpower > constraints). A store bought solution is what's desired. > > I've been searching for hours and found one solution.
Googling for "9-bit serial adapter" came up with some relevent hits: http://www.sealevel.com/categories.asp?category_id=7 http://www.connecttech.com/sub/Products/9bit_main.asp http://www.serialgear.com/1-Port-Serial-PCMCIA-RS232-PCMCIA1.html
> So, can anyone help?
Anything with a 16C950 UART should support 9-bit mode -- assuming a competent vendor did the device driver. -- Grant Edwards grante Yow! The entire CHINESE at WOMEN'S VOLLEYBALL TEAM all visi.com share ONE personality -- and have since BIRTH!!
>Using a PC and forced MARK/SPACE parity is pretty much the "standard" >way to emulate 9 bit addressing and that does not require any kind of >driver to pull off. Any decent comm library is going to include such >things. The baud rate, on the other hand, might be a bit tougher. >Without looking up any data, the number seems a bit strange. >
I did a design idea in EDN on the subject way back in 1998. http://www.edn.com/archives/1998/060498/12di.htm Scroll down to "Implement a nine-data-bit UART on a PC" I am sure the approach can be adapted to any modern PC provided the serial port driver allows access to the registers of the UART. (Beware of Microsoft's *.net tho' since the driver has been much reduced as does not allow direct access.) Also keep in mind there is some processing associated with each byte, and at higher baud rates there may be inter byte gaps depending on the operating system. -Aubrey
james.ro123@yahoo.com wrote:
> > We have various products that interface to Point Of Sale terminals > (a.k.a. cash registers). These use IBM's 4683 protocol which is a > 9 bit (address bit) RS485 bus. We'd like to build some test tools > so we don't have to always use a POS terminal. > > Anyone know of any 9bit 485 adapters, converters, etc.? My strong > preference is a USB/Ethernet to 9 bit 485 adapter. Second > preference would be an internal PCI adapter. One more thing--we > need to set the baud rate to 187.5 kbaud (187500 baud). An RS232 > to 9 bit 485 (if one exists) would be OK too.
RS485 is strictly a hardware protocol. You can transmit any software protocol you like on it. The cheapest and easiest way to get a 9bit UART is probably to bit bang it with a cheap chip, such as something from Microchip. Just use a suitable clock rate, and supply it from a crystal. -- Chuck F (cbfalconer at maineline dot net) Available for consulting/temporary embedded and systems. <http://cbfalconer.home.att.net> -- Posted via a free Usenet account from http://www.teranews.com
On Oct 17, 11:15 am, James Beck <j...@reallykillersystems.com> wrote:
> In article <1192631451.192804.36...@e34g2000pro.googlegroups.com>, > james.ro...@yahoo.com says... > > > > > Hi, > > > We have various products that interface to Point Of Sale terminals > > (a.k.a. cash registers). These use IBM's 4683 protocol which is a 9 > > bit (address bit) RS485 bus. We'd like to build some test tools so we > > don't have to always use a POS terminal. > > > Anyone know of any 9bit 485 adapters, converters, etc.? My strong > > preference is a USB/Ethernet to 9 bit 485 adapter. Second preference > > would be an internal PCI adapter. One more thing--we need to set the > > baud rate to 187.5 kbaud (187500 baud). An RS232 to 9 bit 485 (if one > > exists) would be OK too. > > > Making something using a micro is not a good option (manpower > > constraints). A store bought solution is what's desired. > > > I've been searching for hours and found one solution. It's a Windows > > driver that uses the parity bit on the 16550 UART to emulate 9 bit. > > We would then add an RS232 to 485 converter. I don't know yet if the > > PC can set its baud rate to 187.5 kbaud, but also I don't really care > > much for that approach. Portability is going to be an issue if that > > driver can only be installed on one PC. Also, PCs with RS232 are not > > as common anymore. > > > So, can anyone help? > > > Thanks much, > > > Jim Rosetti > > Using a PC and forced MARK/SPACE parity is pretty much the "standard" > way to emulate 9 bit addressing and that does not require any kind of > driver to pull off. Any decent comm library is going to include such > things. The baud rate, on the other hand, might be a bit tougher. > Without looking up any data, the number seems a bit strange. > > Jim
Jim, I'm a bit concerned about timing issues doing that at the user level (delays and race conditions on data going out since you must set the parity correct for each byte in the fifo). I'm really hoping for a different solution than that. Thanks for your input, Jim
In article <1192711571.615176.38550@k35g2000prh.googlegroups.com>, 
james.ro123@yahoo.com says...
> On Oct 17, 11:15 am, James Beck <j...@reallykillersystems.com> wrote: > > In article <1192631451.192804.36...@e34g2000pro.googlegroups.com>, > > james.ro...@yahoo.com says... > > > > > > > > > Hi, > > > > > We have various products that interface to Point Of Sale terminals > > > (a.k.a. cash registers). These use IBM's 4683 protocol which is a 9 > > > bit (address bit) RS485 bus. We'd like to build some test tools so we > > > don't have to always use a POS terminal. > > > > > Anyone know of any 9bit 485 adapters, converters, etc.? My strong > > > preference is a USB/Ethernet to 9 bit 485 adapter. Second preference > > > would be an internal PCI adapter. One more thing--we need to set the > > > baud rate to 187.5 kbaud (187500 baud). An RS232 to 9 bit 485 (if one > > > exists) would be OK too. > > > > > Making something using a micro is not a good option (manpower > > > constraints). A store bought solution is what's desired. > > > > > I've been searching for hours and found one solution. It's a Windows > > > driver that uses the parity bit on the 16550 UART to emulate 9 bit. > > > We would then add an RS232 to 485 converter. I don't know yet if the > > > PC can set its baud rate to 187.5 kbaud, but also I don't really care > > > much for that approach. Portability is going to be an issue if that > > > driver can only be installed on one PC. Also, PCs with RS232 are not > > > as common anymore. > > > > > So, can anyone help? > > > > > Thanks much, > > > > > Jim Rosetti > > > > Using a PC and forced MARK/SPACE parity is pretty much the "standard" > > way to emulate 9 bit addressing and that does not require any kind of > > driver to pull off. Any decent comm library is going to include such > > things. The baud rate, on the other hand, might be a bit tougher. > > Without looking up any data, the number seems a bit strange. > > > > Jim > > > Jim, > > I'm a bit concerned about timing issues doing that at the user level > (delays and race conditions on data going out since you must set the > parity correct for each byte in the fifo). I'm really hoping for a > different solution than that. > > Thanks for your input, > > > Jim >
Not that hard to do. Set UART to MARK parity, send address. Wait for it to go. My comm lib has an IO callback that lets you know. Set UART to SPACE parity, send data. You don't need to worry about setting the parity on each individual byte once the UART (or virtualized UART) is set up. The only switching time is when you go from address to data. Obviously, I don't know the exact nature of what you are trying to talk to, and it could be really picky about timings........ Jim
On Oct 17, 10:30 am, james.ro...@yahoo.com wrote:
> Hi,
...
> Anyone know of any 9bit 485 adapters, converters, etc.? My strong > preference is a USB/Ethernet to 9 bit 485 adapter. Second preference > would be an internal PCI adapter. One more thing--we need to set the > baud rate to 187.5 kbaud (187500 baud). An RS232 to 9 bit 485 (if one > exists) would be OK too. >
I'd like to thank everyone for their input! It looks like I'm giving up on USB to 9 bit 485 adapters. Does anyone know of any USB to 8 bit 485 adapters that will allow me to play the mark/space parity game to emulate the 9th bit (allows mark/space parity & must put byte with parity error in it's buffer)? Must work at the "odd" baud rate of 187500 baud. I contacted a few vendors and so far, no luck finding one that does both, but I'm still looking! :) Thanks, Jim
james.ro123@yahoo.com wrote:
> james.ro...@yahoo.com wrote: > ... >> Anyone know of any 9bit 485 adapters, converters, etc.? My strong >> preference is a USB/Ethernet to 9 bit 485 adapter. Second >> preference would be an internal PCI adapter. One more thing-- >> we need to set the baud rate to 187.5 kbaud (187500 baud). An >> RS232 to 9 bit 485 (if one exists) would be OK too. > > I'd like to thank everyone for their input! It looks like I'm > giving up on USB to 9 bit 485 adapters. Does anyone know of any > USB to 8 bit 485 adapters that will allow me to play the mark/ > space parity game to emulate the 9th bit (allows mark/space > parity & must put byte with parity error in it's buffer)? Must > work at the "odd" baud rate of 187500 baud. I contacted a few > vendors and so far, no luck finding one that does both, but I'm > still looking! :)
Why are you giving up? There is no problem interfacing any serial line with RS485 (which is purely a hardware specification). Your only problem would be to find a suitable UART to create and read the serial signal. All you are looking for is a UART that can generate 9 bit signals (plus start/stop bits). Then you need RS485 line drivers, in place of RS232 line drivers, all of which are available. If you really want to drive the whole thing from USB (why) look for USB driven UARTs. -- Chuck F (cbfalconer at maineline dot net) Available for consulting/temporary embedded and systems. <http://cbfalconer.home.att.net> -- Posted via a free Usenet account from http://www.teranews.com
On 2007-10-25, CBFalconer <cbfalconer@yahoo.com> wrote:

>> I'd like to thank everyone for their input! It looks like I'm >> giving up on USB to 9 bit 485 adapters. Does anyone know of >> any USB to 8 bit 485 adapters that will allow me to play the >> mark/ space parity game to emulate the 9th bit (allows >> mark/space parity & must put byte with parity error in it's >> buffer)? Must work at the "odd" baud rate of 187500 baud. I >> contacted a few vendors and so far, no luck finding one that >> does both, but I'm still looking! :) > > Why are you giving up? There is no problem interfacing any > serial line with RS485 (which is purely a hardware > specification). Your only problem would be to find a suitable > UART to create and read the serial signal. All you are > looking for is a UART that can generate 9 bit signals (plus > start/stop bits).
And which can do automatic control of the RTS line for a half-duplex line (I'm assuming you're using RS-485 instead of RS-422 because it's a rwo-wire half-duplex interface).
> Then you need RS485 line drivers, in place of RS232 line > drivers, all of which are available. If you really want to > drive the whole thing from USB (why) look for USB driven > UARTs.
You can get an odd baud rate by replacing the crystal on the serial board. Most high-speed serial boards (that can support speeds higher than 115.2K) have an on-board crystal oscillator. You can usually replace the crystal in order to get custom baud rates. If the board supports 230.4K baud, then replace the crystal with one that's slower by a factor of 187.5/230.4, tell the board you want 230.4K baud, and you're cooking with gas. Or you could replace it with a crystal that's a factor of 187.5/115.2 faster, and then tell the board you want 115.2K baud. Of course you might end up needing a very odd frequency crystal, which is a whole different problem.. I used to work for a manufacturer of high-speed serial boards, and vendors won't "officially" support such a thing. But, if you can talk to the right person they'll usually tell you off the record that it will work. I know we had customers that did it regularly. Just don't try to return the board after you've been soldering on it. -- Grant Edwards grante Yow! NEWARK has been at REZONED!! DES MOINES has visi.com been REZONED!!