11.0592MHz crystal problem

Discussion in 'Embedded Systems and Microcontrollers' started by AMIT_GOHEL, Aug 26, 2010.

  1. AMIT_GOHEL

    Thread Starter Member

    Jul 13, 2010
    67
    7
    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.
     
  2. eblc1388

    Senior Member

    Nov 28, 2008
    1,542
    102
    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.
     
    AMIT_GOHEL likes this.
  3. AMIT_GOHEL

    Thread Starter Member

    Jul 13, 2010
    67
    7
    I'm using 89c51 mc.

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

    Senior Member

    Nov 28, 2008
    1,542
    102
    No idea on 8051.

    However, you can search for "8051 baudrate calculator" in Google and check the results yourself.
     
  5. Papabravo

    Expert

    Feb 24, 2006
    10,142
    1,790
    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
     
  6. eblc1388

    Senior Member

    Nov 28, 2008
    1,542
    102
    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.
     
  7. Papabravo

    Expert

    Feb 24, 2006
    10,142
    1,790
    @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
     
  8. mushin123

    New Member

    Aug 28, 2010
    13
    0
    You can also use a 22.1184MHz crystal. Maybe this is more easily available than 11.0592MHz ?

    Mushin
     
  9. rjenkins

    AAC Fanatic!

    Nov 6, 2005
    1,015
    69
    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.
     
Loading...