Analyze XTAL1 and XTAL2, and the formed clock circuit

The 18 and 19 pins XTAL1 and XTAL2 of the 51 single-chip microcomputer are used to provide an external oscillator source to the on-chip clock circuit.

XTAL1 and XTAL2 pins, the microcontroller can use an external clock or an internal clock.

When using the internal clock, these two lead terminals are used for external quartz crystal and trimming capacitor;

When using an external clock, it is used to connect an external clock signal, NMOS connects to XTAL2, and CMOS connects to XTAL1.

principle:

XTAL1 and XTAL2 are the input and output of an inverter, respectively. The NMOS inverter is a circuit with the so-called ED structure (an enhanced MOS provides logic and a depletion MOS provides pull-up). In the case of analog applications, it is not good to provide an external clock from XTAL1 (feedback network generation Undesirable side effects), and XTAL1 is grounded and the internal circuit is driven directly from XTAL2 without additional driving capability.

The CMOS inverter is connected as an oscillating circuit, a much larger feedback resistance can be used, there is no problem in driving XTAL1 directly, and no other driving source is allowed to be connected to XTAL2, so an external clock is provided from XTAL1.

In electronics, circuits containing transistor components are usually referred to as "active circuits" (such as active speakers, active filters, etc.), while circuits consisting of only RC components are called "passive circuits". Crystal oscillators are also divided into passive crystal oscillators and active crystal oscillators. Passive crystal oscillators and active crystal oscillators have different English names. Unbounded crystal oscillators are crystal (crystals), while active crystal oscillators are called oscillators. A non-edge crystal oscillator is a non-polar component with two pins. It needs the help of a clock circuit to generate an oscillating signal and cannot oscillate by itself. Therefore, the term "passive crystal oscillator" is not accurate; an active crystal oscillator has 4 pins. A complete oscillator, in addition to the quartz crystal, there are transistors and resistance-capacitance components, so the volume is relatively large.

Analyze XTAL1 and XTAL2, and the formed clock circuit

Active crystal

The usual usage of active crystal oscillator: one pin is floating, two pins are grounded, three pins are connected to output, and four pins are connected to voltage.

Active crystal oscillator does not require the internal oscillator of DSP, the signal quality is good, relatively stable, and the connection method is relatively simple (mainly to do a good job of power filtering, usually a PI type filter network composed of a capacitor and an inductor, and a small resistor at the output The value of the resistance can filter the signal), no complicated configuration circuit is required. Compared with passive crystals, the disadvantage of active crystal oscillators is that their signal level is fixed, and a suitable output level needs to be selected, which is less flexible and expensive.

The active crystal oscillator is composed of quartz crystal. The reason why a quartz crystal can be used as an oscillator is based on its piezoelectric effect; adding an electric field to the two poles of the crystal will cause mechanical deformation of the crystal; Adding an alternating voltage to the crystal will produce mechanical vibration, and at the same time, mechanical deformation and vibration will produce an alternating electric field. Although the voltage of this alternating electric field is extremely weak, its vibration frequency is very stable. When the frequency of the applied alternating voltage is equal to the natural frequency of the wafer (determined by the size and shape of the wafer), the amplitude of the mechanical vibration will increase sharply. This phenomenon is called "piezoelectric resonance".

MCU's internal clock and external clock

The single-chip microcomputer has two internal clock modes and external clock modes: (1) The XTAL1 and XTAL2 of the single-chip microcomputer have an internal oscillator structure, but it is still necessary to connect a crystal oscillator and two capacitors at both ends of XTAL1 and XTAL2 to form a clock circuit. One method of using crystal oscillator to generate signal is internal clock mode; (2) MCU can also work in external clock mode. The external clock mode is relatively simple. You can directly input square wave of clock signal to XTAL1 pin of MCU, while XTAL2 pin is floating. . Since the external clock mode is more convenient than the internal clock mode, why do most MCU systems still choose the internal clock mode? This is because the internal oscillator of the single-chip microcomputer can form a very good clock signal source with the crystal oscillator and capacitors. If such a signal is to be generated as an external clock signal and input to the single-chip microcomputer, more than one crystal oscillator and two components need to be added. A capacitor is so simple. The clock circuit is very important in the single-chip microcomputer system. It can control the working rhythm of the single-chip microcomputer and is an essential part.

Perfume Lotus Tea Perfume Lotus TeaPerfume Test

development, production and sales. We have improved quality control processes of L Shape Standing Desk to ensure each export qualified product.
If you want to know more about the products in L Shape Standing Desk, please click the product details to view parameters, models, pictures, prices and other information about L Shape Standing Desk,Standing Desk L Shape,development, production and sales. We have improved quality control processes of L Shape Standing Desk to ensure each export qualified product.
If you want to know more about the products in L Shape Standing Desk, please click the product details to view parameters, models, pictures, prices and other information about L Shape Standing Desk,Standing Desk L Shape,

2222Bossgoo(China)Tecgnology.
(Bossgoo(China)Tecgnology) , https://www.cn-gangdao.com