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

UART

Hi,

I'm using a Internal oscillator of 11059200 Hz and i set my desired baud rate.
When i'm going to test the serial communication with the application "hyperterminal" from windows, i can't receive the information i send correctly, just strange characters, and i can send information to my uC but just funny characters too. And this only "works" when the baud rate from hyperterminal is less than the baud rate defined in my uC.

How can i receive the correct information? The only guess i have is that the baud rate defined in uC isn't the baud rate 100% correct, maybe only 98%! But with the formula it should be correct.

Thank you!

Parents Reply Children
  • Check your variant and be sure you have all the possible options for the timing source configured correctly. (For example, the Dallas 4-clocks-per-instruction parts have a bit to select either a 4 clock or 12 clock prescaler for the timers; if that bit were wrong, the baud rate would be off by a factor of 3.)

    You may have to read the data sheet carefully to find all the configuration bits. If the documentation is good, they'll all be described in the timer section, but there might be some global bits discussed elsewhere.

    Then check the math, and make sure it's correct -- including doing operations in the right order and having enough bit width in the intermediate values for the computation.

    Async serial ports can tolerate a fair amount of slop in the baud rate and still work. Sounds like to me you're significantly off.