RS232 TTL = UART??

Discussion in 'General Electronics Chat' started by mcgyvr, Mar 6, 2015.

  1. mcgyvr

    Thread Starter AAC Fanatic!

    Oct 15, 2009
    4,771
    971
    Looking at a 2D barcode scanner to incorporate in a Arduino new project..
    Description from Honeywell says its RS232 TTL... (they have 2 cables.. "true rs232" and "rs232 TTL")
    Would RS232 TTL be the same as UART?
     
  2. djsfantasi

    AAC Fanatic!

    Apr 11, 2010
    2,812
    834
    As far as an Arduino is concerned, the answer is yes.

    From the Arduino page:
    "Used for communication between the Arduino board and a computer or other devices. All Arduino boards have at least one serial port (also known as a UART or USART): Serial. It communicates on digital pins 0 (RX) and 1 (TX) as well as with the computer via USB. Thus, if you use these functions, you cannot also use pins 0 and 1 for digital input or output."
    ...and:
    "to use them to communicate with an external TTL serial device, connect the TX pin to your device's RX pin, the RX to your device's TX pin, and the ground of your [Arduino] to your device's ground. (Don't connect these pins directly to an RS232 serial port; they operate at +/- 12V and can damage your Arduino board.)"
     
    mcgyvr likes this.
  3. MaxHeadRoom

    Expert

    Jul 18, 2013
    10,564
    2,379
    UART is a hardware part of the transmission device, RS232 is the protocol method for the data.
    Max.
     
    mcgyvr likes this.
  4. mcgyvr

    Thread Starter AAC Fanatic!

    Oct 15, 2009
    4,771
    971
    It just threw me that they call it RS232 TTL...
    Why leave the RS232 part in there?

    You don't think its something like -5/+5 for high low?
     
  5. djsfantasi

    AAC Fanatic!

    Apr 11, 2010
    2,812
    834
    No, it uses 0v to represent a 0 bit and 5v (Vcc) to represent a 1 bit.
     
    mcgyvr likes this.
  6. GopherT

    AAC Fanatic!

    Nov 23, 2012
    6,061
    3,834
    mcgyvr likes this.
  7. mcgyvr

    Thread Starter AAC Fanatic!

    Oct 15, 2009
    4,771
    971
    Thanks Guys...
    I'm gonna just treat it as RS232TTL = "arduino approved serial" and move on without needing any additional circuitry..
     
  8. MrChips

    Moderator

    Oct 2, 2009
    12,449
    3,364
    Sometimes folks confuscate RS-232 with TTL and UART.

    A UART chip sends and receives NRZ data at TTL voltage levels, 0-5V. The idle voltage level (MARK) is 5V (logic 1). The first bit transmitted is the START bit and is a 0V (logic 0) or (SPACE).

    RS-232 is a voltage standard. Various voltage schemes have appeared in practical usage such as ±3, ±5, ±10, ±12 and ±15V.

    To convert from RS-232 voltages to TTL voltages and vice-versa you need an RS-232 receiver-transmitter chip.
    These converter chips usually perform a logic inversion.

    Hence idle voltage (MARK) is -15V (for ±15V system) and the START bit is +15V (SPACE).

    So in a nutshell:

    UART is a serial communications hardware and protocol
    TTL is logic represented by 0-5V voltage levels
    RS-232 is logic represented by -15V to +15V voltage levels or similar voltages.

    Edit: I got distracted while typing this. Gopher has nice pictures to illustrate this.
     
    cmartinez and djsfantasi like this.
  9. djsfantasi

    AAC Fanatic!

    Apr 11, 2010
    2,812
    834
    Mr. chips has it right. Arduino and others have confused the issue, by using terms incompatible or incorrectly. They've mixed them up.
     
Loading...