11.0592MHz crystal problem

Thread Starter

AMIT_GOHEL

Joined Jul 13, 2010
67
I'm suppose to interface microcontroller with the pc.

So to match the boud rate(9600) i must have to use crystal of 11.0592MHz.
Now the problem is such a crystal is not avialable,12MHz is avilable everywhere.

So can how can i get required boudrate with available crystal ?
Or i must have to use 11.0592MHz crystal.
 

eblc1388

Joined Nov 28, 2008
1,542
You haven't told us which microcontroller you would be using.

For both AVR and PIC, getting a 9600 baud from a 12MHz crystal is perfectly acceptable as the baudrate error is only +0.16%, with the general acceptable limit among hobbyist being less than 3% for short communication.
 

Thread Starter

AMIT_GOHEL

Joined Jul 13, 2010
67
You haven't told us which microcontroller you would be using.

For both AVR and PIC, getting a 9600 baud from a 12MHz crystal is perfectly acceptable as the baudrate error is only +0.16%, with the general acceptable limit among hobbyist being less than 3% for short communication.
I'm using 89c51 mc.

Does this error level is also accepteble for 89c51 ?
Thanks...
 

Papabravo

Joined Feb 24, 2006
21,227
I think the answer is no. At 9600 baud the error is too large for reliable communications on the plain vanilla 8051. Those crystals are available from many suppliers by mail order. With an AT89C51CC01 at 18 MHz. you can get close enough to 9600 baud (9531) IIRC

The AVR does suffer from the same malady doing 115,200 baud with an 8 MHz crystal. That's why I use 7.3728 MHz in my AVR designs
 

eblc1388

Joined Nov 28, 2008
1,542
If you switch to the 89C52, then you can have 9600bps with 12MHz crystal. Actually its 9615bps, with +0.16% error.

You will need to use, for the baudrate generator, timer2 which is unavailable in 89C51.
 

Papabravo

Joined Feb 24, 2006
21,227
@eblc1388 I believe that you are correct. Using Timer2, which is not available on the original 8051, does allow the error to be reduced to a manageable level
 

rjenkins

Joined Nov 6, 2005
1,013
9.8304 MHz is an easily available part for generating standard baud rates. That gives the exact frequencies, eg. 64x the UART input of 153,600 Hz (9600 x16)

If the device has a programmable divider baud rate generator, 2MHz /13 is a common method of producing the 9600 Baud x16 clock for a UART, it's only about 2% off.

If the internal clock is higher than 2MHz, just divide further.
 
Top