Microcontroller clocking - RC oscillator, crystal or tank?[Copy link]
Crystal oscillators, ceramic resonant tanks, RC oscillators, and silicon oscillators are four types of clock sources suitable for microcontrollers. Optimizing the clock source design for a specific application depends on factors such as cost, accuracy, and environmental parameters.
Microcontroller clock sources can be divided into two categories: clock sources based on mechanical resonant devices, such as crystal oscillators and ceramic resonant tanks; and RC (resistance, capacitance) oscillators.
Discrete oscillator circuits
Oscillators based on crystal oscillators and ceramic resonant tanks generally provide very high initial accuracy and low temperature coefficients. RC oscillators have fast startup and are relatively low cost, but they generally have poor accuracy over the entire temperature and operating supply voltage range, varying from 5% to 50% of the nominal output frequency.
When used, the ceramic resonant tank and the corresponding load capacitors must be optimized for the specific logic family. Crystal oscillators with high Q values are not sensitive to the choice of amplifier, but are prone to frequency drift (and even damage) when overdriven. Environmental factors that affect oscillator operation include electromagnetic interference (EMI), mechanical vibration and shock, humidity, and temperature. These factors increase output frequency variations, increase instability, and in some cases, cause the oscillator to stop.
Most of the above problems can be avoided by using oscillator modules. These modules have their own oscillator, provide a low impedance square wave output, and are guaranteed to work under certain conditions. The two most common types are crystal modules and integrated RC oscillators (silicon oscillators). Crystal modules provide the same accuracy as discrete crystal oscillators. Silicon oscillators are more accurate than discrete RC oscillators and in most cases can provide the same accuracy as ceramic resonant tanks. Another
consideration when choosing an oscillator is power consumption. The power consumption of discrete oscillators is mainly determined by the supply current of the feedback amplifier and the capacitance value within the circuit. The power consumption of CMOS amplifiers is proportional to the operating frequency and can be expressed as the power dissipation capacitance value. For example, the power dissipation capacitance value of the HC04 inverter gate circuit is 90pF. When operating at 4MHz and 5V, this is equivalent to a supply current of 1.8mA. Add 20pF of crystal load capacitance and the total supply current is 2.2mA. Ceramic resonant tanks generally have larger load capacitance and require more current accordingly. In contrast, crystal modules generally require a supply current of 10mA to 60mA. The supply current of a silicon oscillator depends on its type and function, ranging from a few microamps for low-frequency (fixed) devices to several milliamps for programmable devices. A low-power silicon oscillator, such as the MAX7375, requires less than 2mA when operating at 4MHz.