EmbeddedRelated.com
Forums
The 2024 Embedded Online Conference

RS232 Voltage Levels

Started by Charles Jean January 5, 2006
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







On 2006-01-05, Charles Jean <alchemcj@earthlink.net> wrote:

> 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? -- Grant Edwards grante Yow! Yow! at visi.com
On Thu, 05 Jan 2006 23:41:28 -0000, Grant Edwards <grante@visi.com>
wrote:

>On 2006-01-05, Charles Jean <alchemcj@earthlink.net> wrote: > >> 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?
___ 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.)
On 2006-01-06, Charles Jean <alchemcj@earthlink.net> wrote:

>>> 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? > ___ > > 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. -- Grant Edwards grante Yow! .. I at feel... JUGULAR... visi.com
"Grant Edwards" <grante@visi.com> wrote in message
news:11rrh9c2vse2h8d@corp.supernews.com...
> On 2006-01-06, Charles Jean <alchemcj@earthlink.net> wrote: > > 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?"
Charles Jean wrote:
> 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
On Fri, 6 Jan 2006 02:47:13 +0000 (UTC), "techie_alison"
<techie_alison@yahoo.com> wrote:

>"Grant Edwards" <grante@visi.com> wrote in message >news:11rrh9c2vse2h8d@corp.supernews.com... >> On 2006-01-06, Charles Jean <alchemcj@earthlink.net> wrote: >> >> Who's Mark? >>
[snip] Space's brother ?:-) ...Jim Thompson -- | James E.Thompson, P.E. | mens | | Analog Innovations, Inc. | et | | Analog/Mixed-Signal ASIC's and Discrete Systems | manus | | Phoenix, Arizona Voice:(480)460-2350 | | | E-mail Address at Website Fax:(480)460-2142 | Brass Rat | | http://www.analog-innovations.com | 1962 | I love to cook with wine. Sometimes I even put it in the food.
"Jim Thompson"  wrote ...
> "techie_alison" wrote: >>"Grant Edwards" wrote ... >>> Charles Jean wrote: >>> >>> Who's Mark? >>> > [snip] > > Space's brother ?:-)
ROTFL! :-)) (But likely lost on the younger crowd.)
On 2006-01-05, Charles Jean <alchemcj@earthlink.net> wrote:
> 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
Charles Jean wrote:

> 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.

The 2024 Embedded Online Conference