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

INFO UART

Dear All,

Is possible to have informations on this code?

int sendchar (int ch) { /* Write character to Serial Port */

while (!(UxLSR & 0x20)); Why??

return (UxTHR = ch); Why??
}

Thanks

Parents
  • You forgot to mention what processor you are using.

    The data sheet or the user manual will tell you exactly what the symbols UxLSR and UhTHR means.

    But are you sure that you have the correct names?

    UxLSR normally stands for U0LSR, U1LSR, U2LSR, ... depending on what UART you need to access.

    If there is something you don't understand un the data sheet/user manual - please ask, and we can help you.

Reply
  • You forgot to mention what processor you are using.

    The data sheet or the user manual will tell you exactly what the symbols UxLSR and UhTHR means.

    But are you sure that you have the correct names?

    UxLSR normally stands for U0LSR, U1LSR, U2LSR, ... depending on what UART you need to access.

    If there is something you don't understand un the data sheet/user manual - please ask, and we can help you.

Children