UART Reliability

Discussion in 'General Electronics Chat' started by plant_hehe, Nov 10, 2011.

  1. plant_hehe

    Thread Starter New Member

    Nov 10, 2011
    2
    0
    Hi,

    We are thinking of using UART interface in slightly non-standard way. The driver to the UART Rx is always the master and there is no two way communication between the master and the slave UART.

    1. Can this communication link be made deterministic. I mean for a given Baud rate and UART SYS CLK frequency, can we guarantee a 0% error rate.

    2. Is there a way to calculate the probability of an error? What factors does the error depend on?

    3. How can we estimate probability of frame errors, overrun errors etc?

    Appreciate any feedback. Thank you.
    Plant.
     
  2. MrChips

    Moderator

    Oct 2, 2009
    12,449
    3,367
    No, you cannot guarantee 0% error rate.

    There are many variables to consider and I will list as many that I can think of:

    1. There are two clock rates you have to consider, the UART clock of the transmitter and that of the receiver. Usually, these are controlled by a XTAL oscillator but the actual XTAL frequencies may not be the same on the two units. You have to determine the XTAL frequency and the divisor that is used to generate the UART clock. You also have to know the error in the XTAL frequency. The important thing to note here is that the baud rate may be different.

    2. The actual baud matters. Error rates will increase with higher baud.

    3. The transmission line plays a very important role, the length of wire and type of wire, the influence of other wires in the bundle.

    4. The switching characteristics of the driver circuit and the receiver circuit. No two RS-232 chips have the same characteristics.

    5. The voltage level used by the drivers, which can be anything from 5V to 15V.

    6. The presence of external EMI. The physical environment of the system and cable.

    Is there anything else I missed?
     
    Last edited: Nov 10, 2011
  3. crutschow

    Expert

    Mar 14, 2008
    13,056
    3,245
    The probability of error mainly depends upon the signal-to-noise ratio of the digital signal at the receiving end. So you have to measure that or makes some assumptions about that. From that here are standard formulas to calculate the error rate for a digital signal.

    It you want more certainty of sending the signal, then you could use digtial error correction techniques (of which there are many) which send extra bits that allow detection and correction of most single-bit errors.

    How far are you sending the signal, and how are you sending it?
     
  4. plant_hehe

    Thread Starter New Member

    Nov 10, 2011
    2
    0
    MrChips/crutschow,

    Thanks for the reply. You saved me on embarking on what seems to be an ultimately doomed project :)

    Thanks guys, appreciate your inputs.

    Plant.
     
  5. bertus

    Administrator

    Apr 5, 2008
    15,649
    2,348
    Hello,

    Also checksums of the message may help.
    If the checksum is incorrect, you can ask the sender to re-send the message.
    ( a kind of handshake mechanism ).

    Bertus
     
  6. nsaspook

    AAC Fanatic!

    Aug 27, 2009
    2,912
    2,180
    You can't guarantee a 0% error rate in a one-way link but you can have a "confidence" level of the received transmission with redundancy of transmission, error correction and bit error rate testing.

    A simple method used in medical trials sampling:
    [​IMG]

    http://en.wikipedia.org/wiki/Bit_error_rate
    http://en.wikipedia.org/wiki/Confidence_interval
     
Loading...