Maker Pro
Maker Pro

RS232 Voltage Levels

C

Charles Jean

Jan 1, 1970
0
I've got a datasheet for a chip that takes an RS232 serial input with
a protocol of 9600,N,8,1. It indicates the voltage level at this
input is hardware-selectable to either +/- 12V(as found from a PC
serial port), and either normal or inverted TTL level(0-5V). I plan on
feeding this chip a TTL level serial stream by bit-banging it rather
than using a UART. I am familiar with the polarities and V
requirements of the "real" RS232 as shown in the example below for
ASCII 65("A"):


+15V-|------<--8 character bits---->--------------
| ___ _______________ ___
| |S | | | | |
| |T | | | | |
| |A | | | | |
+3V-|--|R-|--|--------------|--|--|--------------
| |T | | | | |INDETERMINATE
| | | | | | |VOLTAGE
0V-|--|B-|--|--------------|--|--|--------------
| |I | | | | |REGION
| |T | | | | |
-3V-|--|--|--|--------------|--|--|--------------
| | | | | | |
| | | | | | | TWO
| | | | | | | STOP
| | | | | | | BITS
____|__| |__| | | | | |__| |__|__| | | |
| 0 1 0 0 0 0 0 1 0 1 1
-15V-|------LSB------------------MSB--------------

Bit width = 1/9600 seconds = 104.2 microseconds


Can someone please educate me as to what are:

1)"normal" TTL RS232 voltage levels
2)"inverted" TTL RS232 voltage levels

TIA
Charlie
 
G

Grant Edwards

Jan 1, 1970
0
I am familiar with the polarities and V requirements of the
"real" RS232 as shown in the example below for ASCII 65("A"):


+15V-|------<--8 character bits---->--------------
| ___ _______________ ___
| |S | | | | |
| |T | | | | |
| |A | | | | |
+3V-|--|R-|--|--------------|--|--|--------------
| |T | | | | |INDETERMINATE
| | | | | | |VOLTAGE
0V-|--|B-|--|--------------|--|--|--------------
| |I | | | | |REGION
| |T | | | | |
-3V-|--|--|--|--------------|--|--|--------------
| | | | | | |
| | | | | | | TWO
| | | | | | | STOP
| | | | | | | BITS
____|__| |__| | | | | |__| |__|__| | | |
| 0 1 0 0 0 0 0 1 0 1 1
-15V-|------LSB------------------MSB--------------

Bit width = 1/9600 seconds = 104.2 microseconds


Can someone please educate me as to what are:

1)"normal" TTL RS232 voltage levels

There is no such thing as "TTL RS232 voltage" levels.

UARTs send/receive a logic "1" (e.g. 5V or 3.3V) for a mark,
and a logic "0" (e.g. 0V) for a space.
2)"inverted" TTL RS232 voltage levels

You really don't know what it means to invert a TTL signal?
 
C

Charles Jean

Jan 1, 1970
0
There is no such thing as "TTL RS232 voltage" levels.

UARTs send/receive a logic "1" (e.g. 5V or 3.3V) for a mark,
and a logic "0" (e.g. 0V) for a space.


You really don't know what it means to invert a TTL signal?
___

Thanks Mark, for clearing that up. Does this look like the proper way
to send the chip an "A", then, with the mode set at "normal"
TTL(0-5V)? What are the indeterminate voltage limits? Any need for a
delay prior to sending the next character"?


|------<--8 character bits---->--------------
+5V_|___ ___ ___ ______
| |S | | | | | | | | | | |
| |T | | | | |2 STOP
| |A | | | | |BITS
+?V-|--|R-|--|--------------|--|--|--------------
| |T | | | | |
| | | | | | |INDETERMINATE
| |B | | | | |VOLTAGE
| |I | | | | |REGION
| |T | | | | |
+?V-|--|--|--|--------------|--|--|--------------
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
0V_| |__| |--|--|--|--|--| |__| | |
0 1 0 0 0 0 0 1 0 1 1
LSB MSB

Bit width = 1/9600 seconds = 104.2 microseconds



"Sic hoc legere scis nimium eruditionis habes."
(If you can read this, you're overeducated.)
 
G

Grant Edwards

Jan 1, 1970
0
___

Thanks Mark, for clearing that up.

Who's Mark?
Does this look like the proper way to send the chip an "A",
then, with the mode set at "normal" TTL(0-5V)? What are the
indeterminate voltage limits?

You'll have to look at the electrical specs for the UART in
question. For standard TTL, a "0" has to be below 0.7V and a
"1" has to be above something like 2V. For CMOS, it's usually
1/3 and 2/3 of the supply voltage.
Any need for a delay prior to sending the next character"?

Not usually, no.
|------<--8 character bits---->--------------
+5V_|___ ___ ___ ______
| |S | | | | | | | | | | |
| |T | | | | |2 STOP
| |A | | | | |BITS
+?V-|--|R-|--|--------------|--|--|--------------
| |T | | | | |
| | | | | | |INDETERMINATE
| |B | | | | |VOLTAGE
| |I | | | | |REGION
| |T | | | | |
+?V-|--|--|--|--------------|--|--|--------------
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
0V_| |__| |--|--|--|--|--| |__| | |
0 1 0 0 0 0 0 1 0 1 1
LSB MSB


It looks like a 0x41 to me.
 
T

techie_alison

Jan 1, 1970
0
Grant Edwards said:
Who's Mark?

Must be a spurious random message being generated by those TTL RS232
signals.

Hi Charlie, have a look at the MAX232 or MAX233 (no caps).

The only thing that springs to mind from reading your post is, "What on
earth does this mysterious chip do, what is it called, who makes it?"
 
D

David Tweed

Jan 1, 1970
0
Charles said:
Thanks Mark, for clearing that up. Does this look like the proper way
to send the chip an "A", then, with the mode set at "normal"
TTL(0-5V)? What are the indeterminate voltage limits? Any need for a
delay prior to sending the next character"?

|------<--8 character bits---->--------------
+5V_|___ ___ ___ ______
| |S | | | | | | | | | | |
| |T | | | | |2 STOP
| |A | | | | |BITS +2.0V-|--|R-|--|--------------|--|--|--------------
| |T | | | | |
| | | | | | |INDETERMINATE
| |B | | | | |VOLTAGE
| |I | | | | |REGION
| |T | | | | | +0.8V-|--|--|--|--------------|--|--|--------------
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
0V_| |__| |--|--|--|--|--| |__| | |
0 1 0 0 0 0 0 1 0 1 1
LSB MSB

Bit width = 1/9600 seconds = 104.2 microseconds

No delay should be required.

-- Dave Tweed
 
J

Jim Thompson

Jan 1, 1970
0
[snip]

Space's brother ?:)

...Jim Thompson
 
J

Jasen Betts

Jan 1, 1970
0
I've got a datasheet for a chip that takes an RS232 serial input with
a protocol of 9600,N,8,1. It indicates the voltage level at this
input is hardware-selectable to either +/- 12V(as found from a PC
serial port), and either normal or inverted TTL level(0-5V). I plan on
feeding this chip a TTL level serial stream by bit-banging it rather
than using a UART. I am familiar with the polarities and V
requirements of the "real" RS232 as shown in the example below for
ASCII 65("A"):


+15V-|------<--8 character bits---->--------------
| ___ _______________ ___
| |S | | | | |
| |T | | | | |
| |A | | | | |
+3V-|--|R-|--|--------------|--|--|--------------
| |T | | | | |INDETERMINATE
| | | | | | |VOLTAGE
0V-|--|B-|--|--------------|--|--|--------------
| |I | | | | |REGION
| |T | | | | |
-3V-|--|--|--|--------------|--|--|--------------
| | | | | | |
| | | | | | | TWO
| | | | | | | STOP
| | | | | | | BITS
____|__| |__| | | | | |__| |__|__| | | |
| 0 1 0 0 0 0 0 1 0 1 1
-15V-|------LSB------------------MSB--------------

Bit width = 1/9600 seconds = 104.2 microseconds


Can someone please educate me as to what are:

1)"normal" TTL RS232 voltage levels

As shown above

mark (binary 1) 1s -12V(ish) stop bits, 1 in the data and idle time
space (binary 0) is +12V(ish) start bits, 0 the data and the break signal
2)"inverted" TTL RS232 voltage levels

for +12V read "0V" logic low
for -12V read "+5V" logic high

Chips like max232 and LM1488+LM1489 convert between the two.
not that you'll need to do that, but the data sheets may prove
informative.

Bye.
Jasen
 
R

Robert Baer

Jan 1, 1970
0
Charles said:
I've got a datasheet for a chip that takes an RS232 serial input with
a protocol of 9600,N,8,1. It indicates the voltage level at this
input is hardware-selectable to either +/- 12V(as found from a PC
serial port), and either normal or inverted TTL level(0-5V). I plan on
feeding this chip a TTL level serial stream by bit-banging it rather
than using a UART. I am familiar with the polarities and V
requirements of the "real" RS232 as shown in the example below for
ASCII 65("A"):


+15V-|------<--8 character bits---->--------------
| ___ _______________ ___
| |S | | | | |
| |T | | | | |
| |A | | | | |
+3V-|--|R-|--|--------------|--|--|--------------
| |T | | | | |INDETERMINATE
| | | | | | |VOLTAGE
0V-|--|B-|--|--------------|--|--|--------------
| |I | | | | |REGION
| |T | | | | |
-3V-|--|--|--|--------------|--|--|--------------
| | | | | | |
| | | | | | | TWO
| | | | | | | STOP
| | | | | | | BITS
____|__| |__| | | | | |__| |__|__| | | |
| 0 1 0 0 0 0 0 1 0 1 1
-15V-|------LSB------------------MSB--------------

Bit width = 1/9600 seconds = 104.2 microseconds


Can someone please educate me as to what are:

1)"normal" TTL RS232 voltage levels
2)"inverted" TTL RS232 voltage levels

TIA
Charlie
There is no such thing as a TTL RS232 level; there are the nominal
TTL levels (0 to 0.8V for a low or "zero" and 2.4V to 5.0V for a high or
a "one"), and there are the levels for RS-232 which you have so
elegantly demonstrated.
There may still be some devices that will convert RS-232 levels to
TTL and some that go the other way.
 
R

Robert Baer

Jan 1, 1970
0
Grant said:
There is no such thing as "TTL RS232 voltage" levels.

UARTs send/receive a logic "1" (e.g. 5V or 3.3V) for a mark,
and a logic "0" (e.g. 0V) for a space.




You really don't know what it means to invert a TTL signal?
I believe a logic 1 is negative and a logic zero is positive as per
the elegant diagram provided by the O.P. .
For a teletype, i think (it has been a few daze) a mark was current
flowing for a logic one.
 
P

Paul Keinanen

Jan 1, 1970
0
Thanks Mark, for clearing that up. Does this look like the proper way
to send the chip an "A", then, with the mode set at "normal"
TTL(0-5V)? What are the indeterminate voltage limits?

How long distances do you intend to transfer the TTL signal ?

Is there a cable between the devices or is this just a PCB track above
a continuous ground plane ?

The standard TTL maximum receiver "0" state voltage is 0.8 V, so if
you have some ground potential differences, such as ground bounce due
to fast peak currents or feeding both equipment from a single DC power
supply with common 0 V causing large ground return currents, your "0"
state noise marginal can be quite quickly ruined.
Any need for a delay prior to sending the next character"?

If you are using bit banging, you usually have some degree of
uncertainty about your timing. I would suggest that you on transmit
generate at least 2 (or even more) stop bits and on receive, always
accept a new start bit after 1 stop bit (or even 0.5-0.7) stop bit
time, regardless what the specification says about the number of stop
bits in each case. This ensures a reliable connection even if the
sampling points are a bit off and only reduces the throughput about 10
% on transmit.

Paul
 
C

Chuck F.

Jan 1, 1970
0
Paul said:
.... snip ...


If you are using bit banging, you usually have some degree of
uncertainty about your timing. I would suggest that you on
transmit generate at least 2 (or even more) stop bits and on
receive, always accept a new start bit after 1 stop bit (or even
0.5-0.7) stop bit time, regardless what the specification says
about the number of stop bits in each case. This ensures a
reliable connection even if the sampling points are a bit off
and only reduces the throughput about 10 % on transmit.

The receiver will normally sample the incoming line at 1/2 bit time
from the nominal transition. Once the stop bit has been sampled,
it should immediately go into a 'hunt' mode for the start bit of
the next character. This automatically yields 1/2 bit of timing
slop. So there is never any point to using more than two stop bits
at the transmitter.

--
Some informative links:
http://www.geocities.com/nnqweb/
http://www.catb.org/~esr/faqs/smart-questions.html
http://www.caliburn.nl/topposting.html
http://www.netmeister.org/news/learn2quote.html
 
J

Jim Thompson

Jan 1, 1970
0
On Fri, 06 Jan 2006 09:46:11 GMT, Robert Baer

[snip]
There may still be some devices that will convert RS-232 levels to
TTL and some that go the other way.

RS-232 -> TTL = MC1489

TTL -> RS-232 = MC1488

These chips are still available more than 40 years after I designed
them ;-)

These chips adhere to the original RS-232 spec.

Later versions, such as some of those from Maxim, are "one-sided",
5V-only devices.

...Jim Thompson
 
G

Grant Edwards

Jan 1, 1970
0
I believe a logic 1 is negative and a logic zero is
positive

No. TTL didn't use any negative voltages. Logic 0 is <0.7 and
logic 1 is >2.X.

Inverting a TTL signal means you convert a Logic 0 to a Logic 1
and vice versa. A Boolean "not".
as per the elegant diagram provided by the O.P. . For a
teletype, i think (it has been a few daze) a mark was
current flowing for a logic one.

He's asking about TTL. I think.
 
R

Richard Crowley

Jan 1, 1970
0
These chips are still available more than 40 years after I designed
them ;-)

Do you have a "top-10" list of Thompson's Greatest Hits?

I see your air freshener puffing away frequently on TV.
How did they select thost (odd) intervals?
 
J

Jim Thompson

Jan 1, 1970
0
...

Do you have a "top-10" list of Thompson's Greatest Hits?

MC1488/89 RS-232... still in manufacture

MC1530/31 OpAmp... still in manufacture

MC1650/51 HS Comparator... still in manufacture

All the PLL stuff, VCO's, VCM's, phase detectors... most still in
manufacture

Automotive stuff in the '60's, early '70's

USB driver/receiver for Intel

Roughly 160 custom chips (ASIC's)... the largest source of my income
;-)
I see your air freshener puffing away frequently on TV.
How did they select those (odd) intervals?

I designed the combination flyback power supply / driver for the piezo
pump, and the low power clock.

Two associates of mine in Columbus, Ohio, did the "microprocessor".
The odd intervals probably came from how rudimentary the uP is.

...Jim Thompson
 
E

Everett M. Greene

Jan 1, 1970
0
Robert Baer said:
There is no such thing as a TTL RS232 level; there are the nominal
TTL levels (0 to 0.8V for a low or "zero" and 2.4V to 5.0V for a high or
a "one"), and there are the levels for RS-232 which you have so
elegantly demonstrated.
There may still be some devices that will convert RS-232 levels to
TTL and some that go the other way.

EIA RS232 spec says that the max. voltage level is 15V.
It also says that the minimum non-space voltage level
is (7.5V?), but most devices will work at lower levels
so TTL signal levels work but not be in conformance
with the standard.
 
J

Jonathan Kirwan

Jan 1, 1970
0
On Fri, 06 Jan 2006 09:46:11 GMT, Robert Baer

[snip]
There may still be some devices that will convert RS-232 levels to
TTL and some that go the other way.

RS-232 -> TTL = MC1489

TTL -> RS-232 = MC1488

These chips are still available more than 40 years after I designed
them ;-)

These chips adhere to the original RS-232 spec.
<snip>

1488 requiring several supplies -- and runs hot as a pistol, too. I've
got a box of both; they were about all there was to use in the market
and worked well when I was using them; but don't use them much now
because of the power requirements (especially the 1488) and the
serious heat to be removed (again the 1488 much more than the 1489, if
memory serves, but neither of them slouches in the heating
department.)

Jon
 
Top