length and speed of Uart

Discussion in 'Embedded Systems and Microcontrollers' started by Fanfire174, Mar 20, 2018.

  1. Fanfire174

    Thread Starter Member

    Mar 13, 2018
    204
    0
    What is the length in uart ? what is Uart length and what is Uart Speed

    I think speed means the transmission speed but I am confused with length. Does it depend on cable length ? or it is distance for transmission ?

    Do we refer cable length or communication distance length ?
     
  2. MaxHeadRoom

    Expert

    Jul 18, 2013
    18,841
    5,884
  3. MrChips

    Moderator

    Oct 2, 2009
    19,117
    6,146
    What is the length of a UART?

    The original General Instrument AY-3-1015D UART is about 2" long (5cm).

    [​IMG]

    What are you referring to when you ask for "length"?

    Length of what?
     
  4. MaxHeadRoom

    Expert

    Jul 18, 2013
    18,841
    5,884
    @Fanfire174 If looking for data used via a UART there is RS232 :


    upload_2018-3-20_11-43-24.png

    There are also UART's used in microprocessors that will detect and auto-set the Baud (bit) rate.
    Max.
     
    Fanfire174 and cmartinez like this.
  5. MrChips

    Moderator

    Oct 2, 2009
    19,117
    6,146
    Ah! ... Length. Thanks for that @MaxHeadRoom.:)

    Length = number of bits
    5, 6, 7, 8, 9,10 bits
     
  6. jpanhalt

    Expert

    Jan 18, 2008
    7,666
    1,870
    And, length in milliseconds depends on the baud rate. Thus, looking at 8-bit with start and stop bits at 9600 baud, a single character takes 1o/9600 = 1.04 ms (i.e., each bit takes 104 us).
     
    Fanfire174 and cmartinez like this.
  7. spinnaker

    AAC Fanatic!

    Oct 29, 2009
    7,815
    3,716

    Whats a henway? ;)
     
  8. Sensacell

    Moderator

    Jun 19, 2012
    2,425
    803
    UARTs directly create single-ended, low voltage signals that cannot be sent more than a few 10's of meters reliably.
    But... if you use additional circuits to increase the voltage, or create differential signals, this range can be increased to 1000's of meters.
    There are several "standards" for converting and sending these signals longer distances:

    RS-232 converts the small voltages from the UART into large (+ and - 10V typical) signals that are strong enough to overcome about 50 feet.

    RS-485 converts the small voltages into a balanced differential signal that can be sent many KM's under the right conditions.

    In all cases, increasing data speed decreases the possible transmission distance.
     
    BR-549 and cmartinez like this.
  9. Fanfire174

    Thread Starter Member

    Mar 13, 2018
    204
    0
    I am just trying to understand the few things
    1. Distance of Uart communication
    2. Speed of Uart communication
    3. Cable length for Uart communication
    lets say I am sending data from computer to microcntroller using Uart communication. I am using usb to Rs232 cable to connect computer and PIC-16f877a

    What should be Cable length for Uart communication ?
    What will be the Speed of Uart communication ?
    what will be the Distance of Uart communication ?

    I am not looking for the calculation, just trying to understand what's the important key to know about uart communication
     
  10. cmartinez

    AAC Fanatic!

    Jan 17, 2007
    6,370
    7,993
    https://www.lammertbies.nl/comm/info/RS-232_specs.html

    Screenshot_20180320-225300.jpg
    As you can see, the longer the cable, the slower the maximum attainable transmission speed.
     
    MaxHeadRoom likes this.
  11. be80be

    AAC Fanatic!

    Jul 5, 2008
    1,898
    394
    If you add 2 max 232 you could get the above usb serial is 5 volt the 2 max 232 raise that to the older serial level.
     
  12. miniwinwm

    Member

    Feb 2, 2018
    67
    25
    You haven't understood it yet. A UART is an electronic device that converts a byte to a stream of bits as electrical pulses. It then goes into a line driver when creates the correct line voltages for the standard being used, for example RS-232, RS-422 etc. The question you should be asking is 'what's the cable length versus transmission speed for...' - whatever standard you are interested in. For RS-232 cmartinez has given the table of values.
     
    Last edited: Mar 21, 2018
  13. Fanfire174

    Thread Starter Member

    Mar 13, 2018
    204
    0
    I confuse when I try to combine all these things rs232-TTL, Max-rs232, DB connector and Uart
    Max Rs232 is IC
    Uart is protocol for serial communication
    DB9 connector

    What is rs232-TTL. I think its circuit that inbuilt in max Rs232 IC for the data transmission ?
     
  14. jpanhalt

    Expert

    Jan 18, 2008
    7,666
    1,870
    @fanfire,
    "RS232" and U(S)ART have been in use for so long that they are often misused and have become part of the jargon. For example, the routine I use with MCU's is labeled "Put232". It is just a label for 1-wire serial communication. Rather than initiate a lengthy discussion to define those terms exactly, I think the place to start is for you to describe more specifically what you are trying to do.

    DB9 is just a type of connector that was (is?) common. For my MCU's, I use an ordinary 3-pin servo connector with middle pin for +V and outer pins for ground and signal.
     
    jjw likes this.
  15. miniwinwm

    Member

    Feb 2, 2018
    67
    25
    Rather than getting confused with all the terms, look at the problem from what you need to do for your system to do what it needs to do (communicate with another device)...

    You need a microcontroller, which almost certainly will have a UART module on it. You need to find which pins it outputs data on. Connect these pins to a line driver, for example a MAX232. Connect this to a connector, usually a DE9 for RS-232. Plug one end of your serial cable into this and the other end into what you are talking to.

    For software on the microcontroller you will need a driver. There are plenty of examples of these on the internet. Your application code calls functions in the driver to send and receive data.
     
  16. MaxHeadRoom

    Expert

    Jul 18, 2013
    18,841
    5,884
    @Fanfire174 As already mentioned you only need to use a 9pin (DB9) plug/socket if the system you are connecting already has this, nowadays the handshake pins are rarely, if ever used, so if designing the RX and TX ends then a 3 wire connecting system can be used.
    Rx-Tx- Gnd.
    Max.
     
    Fanfire174 and cmartinez like this.
Loading...