Re: Cheap Processors with Fast USARTs for RS485?

From: Paul Keinanen (keinanen_at_sci.fi)
Date: 01/10/05


Date: Mon, 10 Jan 2005 09:33:16 +0200

On Mon, 10 Jan 2005 05:13:51 GMT, CBFalconer <cbfalconer@yahoo.com>
wrote:

>Christopher Graham wrote:
>>
>> I want to implement low cost rs485-connected data collection nodes,
>> and need to choose a microcontroller for them that will support
>> baud rates of more than say 400 kbps, preferably up to 1 mbps. I
>> know there are some PIC18Fxxxx's that have an "Advanced UART" that
>> are claimed do this. Other alternatives?

If you can limit the speed below 250 kbit/s, the slew-rate limited
RS-485 transceivers could be used, with a reduced risk of all kinds of
EMC problems.

>Having the terminals handle the rates is not the major problem.
>However getting a clean signal from point to point is another
>matter. You should first do some experiments with the actual
>wiring and line terminations etc, put some signals on and see how
>they appear at various points. Haul out the scopes.

Profibus-DP is essentially asynchronous characters over RS-485, thus
following those wiring rules should give good results on any RS-485
bus. Profibus-DP is not very picky about the hardware up to about 1.5
Mbit/s, but running it at 12 Mbit/s @ 100 m requires quite a lot
attention to the details (minimal intermediate node stub length,
series inductors in each node connector to compensate for the stub
stray capacitance etc.).

>Watch out for how the lines get turned around.

The critical parameter is the transmitter turn off. Preferably, this
should be handled directly by the UART hardware, if not, an interrupt
should at least be available, when the last character has _actually_
been transmitted. It should be noted, that on 16550 UART clones, an
interrupt is available only when the last byte has been inserted into
the Tx-shift register and you have to constantly poll for a separate
status bit to check when the last stop bit of the last byte has
actually been sent, before turning off the transmitter.

Depending of the kind of application, constant polling at the last
character may or may not be an option. Thus, it is very important to
check the behaviour of the internal UART before selecting the micro
controller.

>The protocols you use will also make a major difference.

In any high speed half-duplex system, the Tx/Rx and Rx/Tx turnaround
delays are critical for any decent throughput. In a multidrop network,
each node listens to all the traffic, but is only interested in
messages addressed to it, thus, some processing power is lost
monitoring the line in order to skip uninteresting data, so that the
next addressing information can be detected. Thus, the protocol should
be designed in such a way that nodes that are not addressed, can skip
whole messages without too much processing.

Paul
 



Relevant Pages

  • Re: Model 15 RO Teletype available (OT) [telecom]
    ... transmitter at the M.I.T. radio club, W1MX, in the Sixties. ... slight delay in the echo-back of the character. ... Standard manual typewriter keyboards didn't match standard electric ... a contractor I hired. ...
    (comp.dcom.telecom)
  • Re: Got UART Working!!! need syntax help with using ascii/buffer scheduling.
    ... composition techniques you know and love. ... after the clock edge. ... in the UART that says "send a character". ...
    (comp.arch.fpga)
  • Re: RS232 or USB to RS485
    ... Once the last character has started to be transmitted, ... for controlling the RS-485 transmitter, ... transferred from the Tx register to the Tx shift register, ... the driver would run in a busy loop constantly checking the UART ...
    (comp.arch.embedded)
  • Re: Looking USB to RS-232 + RS-422/485 Module ?
    ... When the control micro is locked to the baud rate ... This means the micro understands the protocol. ... with propagation delays and badly terminated lines, the transmitter ... If the bit rate is known, but not the character length, you must ...
    (comp.arch.embedded)
  • Re: 11bit or 12 bits ?
    ... writing a VHDL code for uart with parity check. ... times to give the mechanism more time to finish printing a character. ... They include the power inverter to generate the ...
    (comp.lang.vhdl)