Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

crystal selection criteria

Status
Not open for further replies.

the moon is back

Member level 2
Member level 2
Joined
Apr 29, 2012
Messages
42
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
1,566
hi, guys can anybody tel me how exactly crystal frequency is selected for a microcontroller?
n for 8051 everybody normally use 11.0592Mhz why exactly such complex value rather than using 11M or 12M?
 

the efficiency of the crystal first

the axis resonating frequency of the crystal are concerned here

i don't know much about this but they affect the frequency of the crystal vibrations and the need they serve in the ckt also plays a major role
 

8051 uses 12 crystal clocks for one instruction to execute. Both 11.0592MHz or 12MHz can be easily divided by 12.
Not only 8051, other uC's requires either 6 clocks, 4 clocks, 1 clocks. All these can be divided by 11.0592 and 12. It helps in accuracy in time delays and other time-critical situations.
 

it's because two things...

1. a common MCS-51 architecture uses a 12 clock cycles per instruction (or multiple ...) so a crystal of 12 MHz will have 1us time per instruction... and anything near, will have something like 1us per instruction... (mmm that still didn't explain it huh?)

2. a common application of this microcontroller involves communication between devices (commonly a PC) as this device implements a hardware UART, a common RS232 communication should be possible... Now, a PC COM-RS232 communication have very specific communication speeds or 'baudrate', most of them a multiple of 1200 bps (2400, 4800, 9600, 19200, 57600 and so)... (.-. I still don't understand...)

IF we use a crystal of 12MHz, our time per instruction will be exactly 1us, BUT we will never achieve an exact baudrate and there will be always some error... ( if you get over 2% of difference on the baudrate, you will have many issues in the communication)

So, we need a crystal mult of 1200 bps and near 12MHz, that's 11.0592MHz!!!!!!
with it, you can have, in theory, 0% error at the baudrate, and still something near at 1us per instruction...

(so, you can use 12MHz for exact timing functions (something very specific, or too lazy to do your calcs with the 11.0592) or other RS232 Crystal... (there are many... on is one at 7.3728 MHz or another at 3.6864 MHz, but with them, you loose your almost 1us per instruction)
 

Yes, true, the main reason for 11.0592 MHz as clock is related to convenience in achieving standard baud rates with minimal error.
 

Although some of the previous replies have touched upon the fact, the main reason for the use of a 11.0592 MHz crystal is that the resulting frequency is factorable by all the common Baud rates and the value 16.

In other words 11, 059,200 is even divisible by the common Baud rates: 115,200, 57,600, 38,400, 19,200, 9,600, 4,800, 2,400, 1,200, 300 and 16.

While crystal frequencies like 8 MHz, 10 MHz, 12 MHz, etc are not. Any remainder in the division results in the Baud rate error mentioned by Kurenai_ryu.

Why 16? The reason is due to most UARTs requirement to overclock/oversample 16x during the sampling of the incoming signal at the required Baud rate.



BigDog
 
u mean the reason for choosing such complex values of crystal is to achieve standard baud rates, right?
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top