TTL vs RS232

Thread Starter

TBayBoy

Joined May 25, 2011
148
I'm scratching my head on this, probably searching for the wrong thing, but in rs232, binary is sent with idle bits, start bit, parity LSB to MSB, start, idle.

TTL is MSB to LSB parity but is there any idle, start and stop?
 

kubeek

Joined Sep 20, 2005
5,794
TTL UART is the same as RS232 only with different leves, so MSB and LSB have the same positions. Look in MAX232 datasheet.
 

t06afre

Joined May 11, 2009
5,934
Rs232 have different voltage levels than TTL. Therfore communication with real RS232 devices we need a TTL to RS232 level converter. If you want to send data between two UARTS both working with the same voltage. No level conversion is needed
 

samin

Joined Oct 14, 2011
32
The RS232 uses to represent the 1 at between (-3V and-25V) and 0 to between (3 V and 25 V). Usually out of our PCs found-12V to +12 V.

As against with TTL, 0 is represented by a voltage between 0 and 0.7V. while 1 is between 2.2V and 5V.
 

RiJoRI

Joined Aug 15, 2007
536
Don't confuse the voltage levels/signal descriptions with the message format. RS-232 & TTL are voltage levels. What you send over the comm. lines is up to you: 5,6,7,8,9,etc. bits per byte, Odd, even, fixed-level or no parity; 1, 1.5, 2, 3, 4, etc. stop bits/idle. You could even start with more than one start bit.

The common formats allow equipment by different manufacturers to communicate with each other, but if you do not care about that, you can use any format your heart desires.

--Rich
 

samin

Joined Oct 14, 2011
32
Proof by example, here is a PC serial port connected to a MAX3235 , all connected to an oscilloscope.

In red channel 1, a probe x10 on the wire 3 of the DB9, so Tx of RS232 .
In blue channel 2, a probe x10 on the leg of a max3235 , so Rx of TTL .

The PC is sending two characters in C 9600-8N1.

So:
* In Idle line is at 1. -10V in RS232 & +5V in TTL
* The start bit S is set to 0
* 8 bits of data for C, the ASCII character 0x43 or b01000011, knowing that the LSB is transmitted first
* The stop bit S' at 1.
* To the next character ...
 

Attachments

Top