According to the 8051 text book, in order to generate a standard baudrate used for serial rs232 coomunication, the XTAL frequency has to be 11.059MHZ. My current project uses a 14.318MHZ XTAL. Is there anyway I can get around this in order to generate a standard baudrate such as 9600 etc .... Thanks in advance Jimmy
Keil has a nice baud rate calculator at http://www.keil.com/c51/baudrate.asp. It shows you can achieve 9600bps with about 2.9% error using timer 1. If you are using a 8052 derivative, the text book (datasheet) shows how to use timer 2 as the baud rate generator. Timer 2 will get you closer to standard baud rates using oddball XTAL frequencies -- 9600bps with about 0.9% error in your case.
The link above does not exist. PLease check and re-post. Jimmy
http://www.keil.com/c51/baudrate.asp
Somehow, the original link includes a spurious '.' on the end!