Crystal oscillator

Hi all, I am building a circuit and I'd like to save space, the crystal is an issue, the chip in the circuit, a atmega328 will be communicating with a Bluetooth via tx/rx, can I not use an external crystal?, how dependable will the communication of the chip be?, will relying on the chips oscillator degrade the life of the chip and/or create more heat in the chip?. I saw some small crystal chips, about 3X5, 4X8, and the larger ones for DIP, and the small crystal chips that have 4 outputs, are they just as good as the 2 output crystals?
thanks all!

Hi, welcome to the forum.

The baudrate depends on the clock. The internal oscillator of the ATmega328P might not be good enough. It's frequency depends on the voltage and the temperature.

Any crystal or resonator is better than the internal oscillator of the ATmega328P.

Table 28-10 in the datasheet suggests the internal RC oscillator is +/-10% from the factory,
but can be calibrated to +/- 1% individually for a particular supply voltage and chip. You
want 2% or better for serial comms IIRC. Look for the OSCCAL register in the datasheet

How small do you really want? I've used the HC-46X package size from ECS before, they're a good bit smaller than the usual through-hole variants (6.8mmx4mm and shorter in height). For SMT, there's a million options (3mmx5mm is about the smallest I've found). Or use the internal oscillator if 8MHz is OK. I personally always use a crystal so I don't have to mess with tuning the internal oscillator (my main project these days relies on high-speed comms so I prefer to remove a source of potential error).

An HC-46X crystal on Mouser.

You asked about the 4-pin versus 2-pin crystals. I don't believe there is any difference (someone correct me if I'm wrong), at least none I've ever detected looking at datasheets. Edit: see TomGeorge's reply. My memory is not as good as I like to think sometimes :wink:

The 4 pin crystals are actually crystal oscillators with logic level output.

The pins are +5Vdc, gnd x2, and output.

Tom.... :slight_smile: