This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Programming UART0/1 on uPSD3354

I cannot seem to get anything out of UART0 or 1 using printf(). What is the correct way to program these UARTS?

Thank you,
Stephen Blair

Parents Reply Children
  • I'm using Timer2 to get the 19,200 baud. I tried adding the line:

    TI = 1;

    before:

    printf("Testing");

    In the Keil simulator, I got "Testing" in the UART #1 debug window. On the actual board I keep getting a never ending stream of spaces.

  • The simulator will not have to decode the output from the simulated UART.

    When testing serial communication on real hardware, you should always verify the baudrate with an oscilloscope. That will catch rounding or spelling errors that may result in incorrect baudrates. Even when the PC is able to receive data, the baudrate should be checked - only with a perfect baudrate will the receiver have maximum probability of correctly receiving the data in a noisy environment.

    Anyway - if the PC only shows spaces, the scope should tell what is actually sent on the serial cable.