5
\$\begingroup\$

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

\$\endgroup\$
  • 3
    \$\begingroup\$ An inverting amplifier.You can find about this sort of things if you read the MCU datasheet. \$\endgroup\$ – Oldfart Sep 18 at 8:05
  • 2
    \$\begingroup\$ So does it work like a Pierce Oscillator? \$\endgroup\$ – Kinka-Byo Sep 18 at 8:10
  • 2
    \$\begingroup\$ @Kinka-Byo Yes, that is most common. \$\endgroup\$ – Rev1.0 Sep 18 at 8:20
  • 2
    \$\begingroup\$ This answer has a lot of theory and may help. \$\endgroup\$ – Andy aka Sep 18 at 8:36
  • 1
    \$\begingroup\$ Some doubt everybody had at one stage while studying circuits .. \$\endgroup\$ – Mitu Raj Sep 18 at 11:36
8
\$\begingroup\$

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.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.