On Monday 17 March 2008, Dave Hylands wrote:
> Hi Laurent,
> > I'd like to use a Gumstix-based computer as a central processing unit in
> > a multidrop system. All components in the system communicate through an
> > RS485 bus, so I'm looking for solutions to provide RS485 connectivity to
> > the Gumstix board.
> > The RS485 bus transceivers can be connected directly to one of the
> > Gumstix serial ports but require a direction control signal. Some UARTs
> > support automatic direction control using the RTS signal. Even though at
> > least one serial port of the Gumstix supports RTS/CTS, it seems those
> > signals can only be used for flow control and not for direction control.
> > Is that right ?
> > Has any of you connected a Gumstix-based computer to a RS485 bus ? What
> > kind of solution have you used ? I would like to find a solution that can
> > easily be integrated in a custom expansion board.
> Like Terry, I've used one of t the FTDI to do this. But I've also done
> it from the robostix with no additional hardware. I'll describe the
> technique I used on the robostix, since I believe that the same
> technique could be used on the gumstix.
> You can connect the Tx from the gumstix to the Rx from the gumstix,
> and to the RS485 bus.
> When you're not transmitting, you configure the Tx pin as a GPIO input
> pin, and the Rx gets all of the data.
> When you want to transmit you configure it back to being a Tx pin,
> send your data and then convert it back to an input pin.
> The trick is getting the timing right, which would probably require a
> driver mod.
> You could also probably play games with the RxD line by configuring it
> as a GPIO while you're transmitting, then you wouldn't see your own
> transmission, although seeing your own transmission could be used to
> turn off the transmitter.
There are inexpensive RS485 transceivers that I will probably use to convert
from CMOS/TTL levels on the Gumstix side to RS485 on the bus side. The only
problem is that the transceiver has a direction control input that I must
drive from the Gumstix side.
Some UARTs have an Auto-RS485 mode that outputs the data direction signal on
the RTS pin. Unfortunately the PXA UARTs don't seem to have that capability.
As you noted the tricky part is to get the direction control signal timings
right. I'm a bit scared of handling that in software as I need very fast
response time to transmit data at 115.2 kbds. I will probably use a very
small external microcontroller to perform that task. Programmable logic would
have been nicer, but CPLDs have more complex power requirements.