RS232 Pull Up/Down/Indeterminant ?

Go To Last Post
14 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I'm adding a Max232, (or equivalent), type chip to a circuit, and thought I would stick a Pull Up or Pull Down resistor on the RS-232 Input line.

If there is no device connected to the RS-232 line, the resistor will hold the line at whatever level, and it won't float, or worse yet, bounce back and forth between High and Low.

I looked at the Max220-Max249 data sheet and it shows that there is an INTERNAL Pull Down to Ground resistor on the RS-232 inputs. Max220-249 Data Sheet

OK. So I don't need the resistor. BUT:

Why is the line pulled to Ground? Ground is an indeterminant state. Anything between -2 and +2 V is in no-mans-land, neither High nor Low.

Shouldn't the internal Pull Down, or my own external Pull down, tie to -5 V?

JC

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The first thought that comes to mind, is that the current flow for both a mark and space condition will be the same, so the transmission lines remain balanced around zero volts.

The second thought that comes to mind is that it has to do with transmission line principals and effects.

The third thought that comes to mind is that it might have something to do with some form of Thevenin theory and balanced impedance.

And, the fact that the inputs have some measure of hysteresis probably negates the concern that the input is biased in the undefined area.

You can avoid reality, for a while.  But you can't avoid the consequences of reality! - C.W. Livingston

Last Edited: Tue. Jul 15, 2008 - 01:22 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

digitool wrote:
They are on the "input" side not on the "output" side(rs232 levels) of the transmit buffer.

And do you not terminate a transmission line at the receiving (the input) end with an impedance that is equal to the transmission line characteristic impedance? I would say so...

Edit:
Where did you go, digitool?

You can avoid reality, for a while.  But you can't avoid the consequences of reality! - C.W. Livingston

Last Edited: Tue. Jul 15, 2008 - 01:26 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

If we wind back the clock a little, before the time of max232s etc to the time when we had 1488/89 which were THE rs232 interface chips of choice. Only the 1488 transmitter chip had dual power rails whereas the 1489 receiver chip was only single rail. It could only bias the input between 0v and 5v. So it must've been kosher then.

Also consider that an open input is not the normal signaling condition! In this instance you want to ensure the signaling state reverts to idle.

I see no reason to add any external bias resistor - unless you have some overriding reason. Look at any commercial piece of hardware that uses RS232 - I doubt you'll find any bias resistors.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Page 2 of the datasheet holds the answer:
Min RS-232 Input Threshold Low = 0.8V
Max RS-232 Input Threshold High = 2.4V

So anything below +0.8V on the RS232 inputs leads to a high (default) state on the TTL output side.

Regards
Sebastian

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

..and if we go back far enough in time... :) the receiver chips had some form of bias to "speed up" the line, effectively a pull up so that the input would be trigger happy.

It could also double as a line break detection system. If the line was physically broken then you get a continous low at the RX pin as the bias would pull the receiver high.

But those days are gone (along with hair) -sigh- and we all agree no resistor is really necessary.

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi everyone, Thank you for the input!

I'm still confused , however...

The Wiki RS-232 states:

Quote:
The RS-232 standard defines the voltage levels that correspond to logical one and logical zero levels. Valid signals are plus or minus 3 to 15 volts. The range near zero volts is not a valid RS-232 level; logic one is defined as a negative voltage, the signal condition is called marking, and has the functional significance of OFF. Logic zero is positive, the signal condition is spacing, and has the function ON.

*+*+*+ Here is the issue: *+*+*+
Quote:
Unused interface signals terminated to ground will have an undefined logic state. Where it is necessary to permanently set a control signal to a defined state, it must be connected to a voltage source that asserts the logic 1 or logic 0 level. Some devices provide test voltages on their interface connectors for this purpose.

This reference, and others, note that the EIA standard defines a dead zone of -2 to +2 V, undefined, no-mans-land. (Or +/- 2.5 V, depending on the specific reference, valid signals being defined as outside +/- 3V).

It also states that if unconected, one should insure a defined input. I take this to mean that the signal should be tied to a valid range, typically Mark, -3 to -15 V.

If it is NOT tied to a valid range, it could bounce high and low with noise, etc., generating bogus logic level inputs, (and hence interrupts... :( ).

Sebastian, I see those statements in the data sheet, but I don't think they apply to the bi-polar, RS-232 input voltage. If so, the logical high output from the chip should state that the valid RS-232 input range is MINUS x to y volts, (typically -3 to -15V). Negative voltage, Mark, generating a +1, logical High. Both of the spec's you point out are of Positive polarity. The line above those in the data sheet notes a valid input range of +/- 30V.

Quote:
Also consider that an open input is not the normal signaling condition! In this instance you want to ensure the signaling state reverts to idle.

Kartman, I agree, but doesn't this then imply that I SHOULD tie the line to -5 V???, This would insure that the signal is idle, Mark, when not connected.

Hi Carl,
And to think, this is a "trivial" question, on an easy part of the circuit! Fortunately, at the low speeds, and short distances I run my stuff at, I'm hoping transmission line effects, reflections, impedance matching, and all 'that stuff', can be ignored... (Famous last words...)

JC

Edit: Hi John, sorry I missed your comment while writing mine.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

While it is great to adhere to the standard... what you really need to adhere to is the chip specs.

If the chip still defines a valid logic level as GND, then that will be fine. In any case, if the chip has its own internal biasing, it will be biased for the correct state, so no need to second guess what the chip manufacturer has already done.

Writing code is like having sex.... make one little mistake, and you're supporting it for life.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

DocJC wrote:
Hi Carl,
And to think, this is a "trivial" question, on an easy part of the circuit! Fortunately, at the low speeds, and short distances I run my stuff at, I'm hoping transmission line effects, reflections, impedance matching, and all 'that stuff', can be ignored... (Famous last words...)
Hi Doc,

Well, that may be true in your case. But I frequently push up to 230.4K BAUD (those magic frequencies are really nice for this) using 15 to 20 foot cables. I'd have to think that transmission line effects do start to come into play at these BAUD rates.

You can avoid reality, for a while.  But you can't avoid the consequences of reality! - C.W. Livingston

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:

And, the fact that the inputs have some measure of hysteresis probably negates the concern that the input is biased in the undefined area.

Carl got it right. The resistor to ground makes sure that the output stays in the previous state (not undefined) in the absence of an input signal. (btw. RS232 hysteresis is not to be sneered at).

If you think education is expensive, try ignorance.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hello again, everyone!

Hi Glitch,

Guess I was just surprised that, by my interpretation, the de facto standard chip did not appear to follow the EIA Standard.

Hi Carl,

I agree with you at those speeds! Good thing you have the scopes and such to trouble shoot those signals. At my speeds I can watch the LEDs flicker :)

Carl, Emuler, Sebastion, JS, Kartman; Thanks for the guidance!

JC

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Not all RS232 tranceiver chips do not follow the EIA standard by the book - some claim they are only compatible with it, not compliant.

0V on a RS232 input is as good as -15V. 5V on a RS232 input is as good as +15V. Basically if a 5V AVR could invert the TXD output, it could be directly used to interface a RS232 input. Many people just use a inverter like 74hc14 for the job, and another one in the other direction but with a series resistor in the receiver input.

And not all RS232 receivers have resistors to ground, but most of them do. Most of them have pull-up resistors on the TTL side, but again, not all. (MAX232 has pull-ups, MAX3232 does not). So to get consistent levels on the RS232 outputs too, you might want to add a pull-up on the TTL side, so that RS232 output is negative as early as possible, instead of something random due to the floating input.

- Jani

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I always found the RS232 infos from
Texas Instruments helpful.

From

http://focus.ti.com/lit/an/slla0...

Quote:

All 232 circuits carry voltage signals, with the voltage at the connector pins not
to exceed ±25 V. All pins must be able to withstand a short circuit to any other pin
without sustaining permanent damage. Each line should have a minimum load
of 3 kΩ and a maximum load of 7 kΩ, which usually is part of the receiver circuit.
A logic 0 is represented by a driven voltage between 5 V and 15 V and a logic 1
of between –5 V and –15 V. At the receiving end, a voltage between 3 V and 15 V
represents a 0 and a voltage of between –3 V and –15 V represents a 1. Voltages
between ±3 V are undefined and lie in the transition region. This effectively gives
a 2-V minimum noise margin at the receiver.

This note clearly differentiates between
RS232 outputs = driven-signals and inputs.

outputs:
must deliver less than -5V or higher than +5V

inputs:
must correctly interpret less than -3V or higher than +3V

If the chip-spec tells you, that 0V (or open input)
at a receiver-input of that particular IC is
interpreted in particular way, it's ok and you may
use it, but that is not part of the standard.

(Just my 2 cents)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hello Jani and Ossi,

Good to hear from you both, and thank you for the input!

JC