Electronic – Use of crystal oscillator

oscillatorpcb-design

I'm still new to PCB design so don't mind this question if it sounds silly . What exactly is the function of the oscillator in the arduino board? Is it clock speed ? If it is, why doesn't it come inbuilt the IC? (The avr chips) what if I have two ICs that require an oscillator of same frequency on one board, can I use the single crystal for both ICs or do I need two ?

Best Answer

why doesn't it come inbuilt the IC?

Slower clock speeds usually mean slower code execution times but if that is OK then quite often slower clock speed = smaller power consumption. It makes sense therefore to have the crystal external so the designer can optimize current consumption especially if powered from a battery.

Quite often you'll find an MCU with two crystal circuits - one might be a regular 1MHz to 50MHz interface and the other might use a 32,768 Hz watch crystal - when the MCU has done its fast computational stuff it might fall back to the much lower speed wristwatch crystal where overall power consumption is many times smaller than when using the fast crystal.

Yes, many crystal ocillator circuits provide the output that can be fed into another MCU via the xtal input on that 2nd device.