Reply by Peter Jakacki November 1, 20072007-11-01
james.ro123@yahoo.com wrote:
> Very good--that pretty much sums it up! Unfortunately, it appears > some have lost site of my original post. I'm really looking for a > store bought solution--no hw mods, fw development, etc. We can do > that here, but it costs $$ (manpower). But, as it stands now, if this > PCI card that's under eval doesn't pan out (we didn't receive any > documentation on how to talk to its driver), we'll probably convert > one of our devices that talks this protocol into a test tool. It'll > require firmware, custom cables, etc. though. :(
I haven't been on these groups much in the last couple of years but if you are still interested I have a few products that will cover your requirements. The RS-485 ports are fully programmable in terms of word size and baud rate etc. These products all use Propeller multi-processor chips and emulate hardware devices by dedicating some of it's processors for the job. So they are happy to handle any weird formats etc. I use them myself for diagnosing serial coms problems, especially RS485 networks. BTW, these are all early spec sheets but the products are available. The CE0072 is designed as a super usb-serial isolated convertor and will handle any odd baud rates with a simple menu selection. http://www.cescom.com.au/new/products/CE-0072/CE0072DS.html The CE0074 iCONSOLE is more of a standalone computer complete with dual SD cards. http://www.cescom.com.au/new/products/CE-0074/CE0074DS.html Perhaps this is all that is necessary though, it was designed as a RS-232 to RS-485 network adaptor. http://www.cescom.com.au/new/products/CE-0075/CE0075DS.html *Peter*
Reply by October 26, 20072007-10-26
On Oct 25, 2:36 am, Paul Keinanen <keina...@sci.fi> wrote:

...

> Implementing that kind of protocol with an ordinary ISA or PCI card > under MS-DOS should not be hard, if you use busy loops to poll the > various UART status bits. With multitaskin operating systems, such as > Windows and Linux, there should be hardware support for automatic data > direction control, but fiddling the parity bits should be doable with > any UART, at least if you disable the TX and RX FIFOs. > --- > One possible source for 9 bit RS-485 converters might be manufacturers > of development equipment for 8051, 68360 etc. systems that use such > transfer formats. > > Paul
Paul, Very good--that pretty much sums it up! Unfortunately, it appears some have lost site of my original post. I'm really looking for a store bought solution--no hw mods, fw development, etc. We can do that here, but it costs $$ (manpower). But, as it stands now, if this PCI card that's under eval doesn't pan out (we didn't receive any documentation on how to talk to its driver), we'll probably convert one of our devices that talks this protocol into a test tool. It'll require firmware, custom cables, etc. though. :( Thanks for clearing things up for people, Jim
Reply by Paul Keinanen October 25, 20072007-10-25
On Wed, 24 Oct 2007 20:02:41 -0400, CBFalconer <cbfalconer@yahoo.com>
wrote:

>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.
I very much doubt that this could be done with some USB device due to the unpredictable delays. First of all, the USB/serial converters are these days quite integrated products (no separate standard, well documented UARTs), so getting sufficient information to effectively program it might be a problem. After setting the Mark parity for sending the address byte, you may (or may not) have to wait that the address byte actually has been shifted out from the Tx shift register, before setting the UART to space parity. When this has successfully been done, then you can think about transmitting the actual data bytes. If you play on the safe side, the delay between the address and data bytes might be too large for the other end. Unless the UART has some kind of automatic data direction control, you have to wait, until the last byte has _actually_ been shifted out of the TX shift register, before turning of the transmitter. If you turn off the RS-485 transceiver chip e.g. with the RTS line when the last byte is loaded into the shift register, it is quite likely, that the most significant bits of the last byte are cut off and the bus floats to Mark ("1") condition due to the "fail-safe" termination. Even if you have some automatic data direction handling, the UART must be configured to odd/even parity after the last request byte was sent, but prior to receiving the response from the slave. If the slave responds immediately, before the parity has correctly been set up, the parity error info may be lost. The same problem applies also if your system is the slave. While the slave can delay the response to properly set up the parity settings, it must be able to quickly receive the next request from the master, unless some minimum delay (say 10-100 ms) must elapse, before sending the next response. Even if you get the parity settings correct, I very much doubt that any standard USB/serial converter would actually send the parity error bit synchronously within the same USB frame as the actual data bits. Most likely you would get a separate frame telling that a parity, overrun etc. error occurred during the reading of some of the last few bytes received, but it might be impossible to know, which byte had the parity error. It is quite unlikely that you could put any standard USB/serial converter for this kind of operation even after replacing the crystal (which might not be an option, if both the USB and serial clock is derived from the same crystal). Polling the UART status bits over the USB will cause quite unpredictable delays. Implementing that kind of protocol with an ordinary ISA or PCI card under MS-DOS should not be hard, if you use busy loops to poll the various UART status bits. With multitaskin operating systems, such as Windows and Linux, there should be hardware support for automatic data direction control, but fiddling the parity bits should be doable with any UART, at least if you disable the TX and RX FIFOs. --- One possible source for 9 bit RS-485 converters might be manufacturers of development equipment for 8051, 68360 etc. systems that use such transfer formats. Paul
Reply by Grant Edwards October 25, 20072007-10-25
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!!
Reply by CBFalconer October 24, 20072007-10-24
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
Reply by October 24, 20072007-10-24
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
Reply by James Beck October 18, 20072007-10-18
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
Reply by October 18, 20072007-10-18
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
Reply by CBFalconer October 17, 20072007-10-17
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
Reply by antedeluvian51 October 17, 20072007-10-17
>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