Can someone explain me HOW TO CHOOSE CRYSTAL VALUE..??

I know that a CRYSTAL is an oscillator used to keep track of time, which is present with many MICROCONTROLLERS' internally. We sometimes use it externally too according to our application..

Can someone please explain this that how to select the correct value of the CRYSTAl for my application..??

Your microprocessor has a maximum clock speed. The software written for your microprocessor needs to know what the clock speed is if it is to do any time-dependent settings like serial baud rate. If you are writing all of the code for your processor you can use whatever clock speed you like up to the maximum (ther may also be a minimum).

If you are using third-party libraries such as the Arduino core you may be restricted to just a few supported clock rates. The Arduino software works correctly at only 16 MHz and 8 MHz but works fairly well at 20 MHz (maximum for ATmega328p).

how to select the correct value of the CRYSTAl for my application

Only if you say what your application actually is, otherwise we have nothing to work on.
Why do you think you want to make it faster or slower than the standard?

if serial is required you might consider using 7.3728 or 14.7456 instead of the normal arduino crystals. imo these were a bad choice for the original design. 115kbaud at 16mhz is barely within limits and at 8mhz not even. in fact the internal rc clock is considerably more reliable in this respect than the standard crystal.

To a large extent, the choice of crystal frequency is pretty arbitrary. I bought a large quantity of 13.5MHz crystals once, because they were cheap.
(however, this was stupid. Because a crystal is cheap, anyway.)

The Arduino probably uses 16MHz because that was the maximum frequency for the ATmega8 chip used on the first Arduino. That's a common way to pick a crystal: as fast as it will take. (After that, there was too much momentum to change easily, even though the max frequency is 20MHz on m168 and m328.)

You CAN learn by looking at things that are annoying at a particular frequency. For example, the 16MHz used by Arduino does not divide evenly (ie by a power of 2) into 1ms, making the implementation of "millis()" more complicated than it could be. Nor does 16MHz divide easily into any of the common serial baud rates (multiples of 300.) Some peripherals like specific clock rates; USB likes 12MHz, and Ethernet likes 25MHz, for example. (but not exclusively.) Clocks tend to like 32768 Hz, because that divides evenly to give a 1s pulse (you might notice that having a clock that divides to 1ms, and also divides to 1s, both using powers of two, is likely to be a problem :slight_smile: 32768Hz crystals are also of a particular type that makes it possible to build very low-power oscillators.

personally i agree with everything you said. EXCEPT cheap being stupid. lol! but i must admit crystals are amazingly low cost today compared to the old days. ie 16mhz 4 cents. i remember when ceramic resonators cost less. not anymore.