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

buad rate timer setting

I am using timer 2 for baud rate generater, mode 1. When I use the code below to calcultate the value, it gave wrong results.
WORD w = 65536-OSC/(12L*Baudrate);

With OSC = 110592, and Baudrate = 19200, w = 65488
But the correct result is 65518.

Could you tell me how to resolve this?

0