Electronic – Crystal Oscillators in MCU

crystaldigital-logicmicrocontrolleroscillator

let's consider a MCU (for instance ATMEGA328) with a crystal.

enter image description here

I know that the electrical model of a crystal is this one:

enter image description here

My question is: which is the circuit that makes it oscillate? I do not see it because it is connected to two pins of the MCU. What is there between them? Power supply, a logic gate etc

Best Answer

Indeed as stated in the comments, a Pierce oscillator is most commonly used for a simple crystal oscillator circuit used in for example a MicroController.

Here's a typical example of such a circuit:

enter image description here

Source: this presentation.

The top part (the NMOS, PMOS and both resistors) are on the IC.

The crystal and both loading capacitors are on the PCB.

What isn't shown is where the actual clock signal output is. I would simply use the output of the inverter, the node between Rf and R1. I would connect that point to an inverter so it is not loaded much. That extra inverter would then be suitable to use as a clock in the rest of the chip (on a real chip a clock distribution circuit would be used).

Since I don't have schematics of the on-chip circuit of the ATMega328, there's no guarantee that the actual circuit on that IC is like this. However, since this circuit is quite commonly used since it is well known, chances are that it is exactly like this.