locked
Serial port - Bit error rate

    Question

  • hi

    I am sending ascii characters to my serial port and and i receive the characters back because i have the loopback connector on my RS232. is there any way to find out if there is any bit loss?  for now, i just compare the send characters with the recieved ones.... but how to do that with bits?
    Monday, April 12, 2010 5:10 PM

Answers

  • Since the UART convert bytes to bits and visa versa there is no difference. If you receive the same characters as you transmit, there are no errors.

     


    Everything should be made as simple as possible, but not simpler. Any fool can write code that a computer can understand. Good programmers write code that humans understand.
    • Marked as answer by Jeff Shan Monday, April 19, 2010 2:32 AM
    Monday, April 12, 2010 6:33 PM
  • The loss of bits would most likely not occur in the loopback test unless the cable length and the run is the same as what is used when you have supspected bit loss. Bit loss usually occur in, the cable, the connections or interference induced into the cable and /or system at some point.

    Carsten is correct if the byte sent is 11010000 and you have the first bit lost when recieved then the byte is now 01010000 makeing the number or character different.

    Curtis


    Always Lost in Code, Always mark answers as correct if they answer you question and solve your problem. This way others when searching for similar problems can find the answer faster.
    • Marked as answer by Jeff Shan Monday, April 19, 2010 2:32 AM
    Monday, April 12, 2010 8:38 PM

All replies

  • Since the UART convert bytes to bits and visa versa there is no difference. If you receive the same characters as you transmit, there are no errors.

     


    Everything should be made as simple as possible, but not simpler. Any fool can write code that a computer can understand. Good programmers write code that humans understand.
    • Marked as answer by Jeff Shan Monday, April 19, 2010 2:32 AM
    Monday, April 12, 2010 6:33 PM
  • The loss of bits would most likely not occur in the loopback test unless the cable length and the run is the same as what is used when you have supspected bit loss. Bit loss usually occur in, the cable, the connections or interference induced into the cable and /or system at some point.

    Carsten is correct if the byte sent is 11010000 and you have the first bit lost when recieved then the byte is now 01010000 makeing the number or character different.

    Curtis


    Always Lost in Code, Always mark answers as correct if they answer you question and solve your problem. This way others when searching for similar problems can find the answer faster.
    • Marked as answer by Jeff Shan Monday, April 19, 2010 2:32 AM
    Monday, April 12, 2010 8:38 PM
  • I seem to remember a parity bit. It was supposed be a checksum?

    Renee

    Monday, April 12, 2010 9:46 PM
  • Yes, but the parity bit can only detect an odd number of errors. Even number of errors goes undetected and you cannot count the actual number of error bits. Besides, Microsoft throws the parity error bit from the UART away after raising the event so it is impossible to tell on which character the error is.

     


    Everything should be made as simple as possible, but not simpler. Any fool can write code that a computer can understand. Good programmers write code that humans understand.
    Tuesday, April 13, 2010 5:37 AM