This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

UART Example Problem when changing pins

Using the UART example of the 52DK with the TX and RX pins set as 8 and 6 the example works.  If I try to change the pins to different pins such as 22 and 23, it does not work by giving an UART Comm Error.  Problem is reported from the UART ISR.

Parents
  • Why do you change the TX/RX pin? Do you connect it to something else?
    If you connect it to something else, do you also connect the other device to ground?

    If you just change the pin number, but don't connect anything to it, it will be left floating in the wind and will pick up noise. The UART will then believe that the noise is actual data, but not be able to make sense of it. Then it generates a Communication error. 

    Best regards,
    Joakim

Reply
  • Why do you change the TX/RX pin? Do you connect it to something else?
    If you connect it to something else, do you also connect the other device to ground?

    If you just change the pin number, but don't connect anything to it, it will be left floating in the wind and will pick up noise. The UART will then believe that the noise is actual data, but not be able to make sense of it. Then it generates a Communication error. 

    Best regards,
    Joakim

Children
Related