Crystal oscillator, clock signal, phase-locked loop, divider

Source: Internet
Author: User

Andrew Huang
[Email protected]

Driving the digital circuit is the clock signal, the timing circuit requires an external clock signal to drive, complete the timing, synchronization, counting, timing control and other functions. Like the CPU is also a sequential signal driven to complete a variety of operations, and like Arm band module is mostly related to timing, so understanding the clock signal is very important for the underlying programming.

I.---------Crystal oscillator at the source of the clock signal
----------------------------------------------------------------------------

What is the source of the clock signal for the digital circuit? The mainstream design is to use an external device such as a crystal oscillator to produce a stable current waveform. This is the highest sexual efficiency, crystal is a piece of crystal with some circuit of small equipment, but it only need to input a very small current is to continuously stabilize the clock waveform.

This is because the crystal has a peculiar characteristic, if give him power, he will produce mechanical oscillation, conversely, if give him mechanical force, he will produce electricity, this characteristic is called electromechanical effect,. This is called piezoelectric effect.

What is more wonderful is that the alternating voltage is added between the plates, which will produce mechanical deformation vibrations, and the mechanical deformation vibration will produce alternating electric field. In general, the amplitude of this mechanical vibration is relatively small, and its vibration frequency is very stable. However, when the frequency of the applied alternating voltage is equal to the natural frequency of the wafer (determined by the size of the wafer), the amplitude of the mechanical vibrations will increase sharply, a phenomenon called piezoelectric resonance, so the quartz crystal is also known as quartz crystal resonator. It is characterized by a high frequency stability. Quartz watches are made using this principle.


The chip will produce a stable waveform, as long as the continuous power supply, this energy-and mechanical energy-and energy conversion will keep the waveform generated. Quartz crystal oscillator circuits must be used in circuits that require high stable frequencies. Quartz Crystal has a high quality factor, the oscillation circuit adopts the constant temperature, voltage regulation and other ways, the oscillation frequency stability can reach 10^ (-9) to 10^ (-11). Widely used in communications, clocks, watches, Computers ... Applications where high stability signals are required.

The crystal oscillator of important device in digital circuit is made by using this principle. Crystal oscillator is a quartz crystal resonator and quartz body clock oscillator collectively. However, because in consumer electronics, the resonator used more, so the general concept of crystal oscillator is equivalent to the resonator understanding. The latter is usually referred to as TCXO.

It is a mechanical and electrical device, is a small loss of electricity consumption of quartz crystal by precision cutting grinding and plating on electrodes welded on the lead made.

The function of a crystal oscillator in a digital circuit is to provide a base time. Digital circuits are timed to perform specific tasks at some point, so almost every circuit has a pin that receives an external clock signal. If this clock signal is chaotic. The entire circuit is not working properly. In a monolithic device, such as a development board, or a PC motherboard. All circuits usually share a crystal oscillator. Easy to keep the parts in sync. In some communication systems, the basic frequency and radio frequency use different crystal oscillator, and the method of electronic frequency adjustment to maintain synchronization.

Two. System frequency--------Internal clock
--------------------------------------------------------------
The general crystal is called the external clock frequency, it needs to introduce the signal into the digital circuit to the CPU and other modules to use, confined to the physical properties of the general crystal oscillator frequency is not too high, such as s3c2440/s3c6410 on the frequency of crystal oscillator is generally 12mhz/20mhz, The CPU needed to use a clock signal up to 400mhz/600mhz, or higher. This time, the lower external clock signal needs to be increased to the frequency that the CPU can accept. This is known as the octave. The s3c6410 can be up to 667Mhz in frequency.

Phase-locked Loop circuit

The function of octave is made by a special circuit---phase-locked loop circuit. Phase-locked Loop (phase-locked Loop, abbreviated PLL), the PLL is essentially a closed-loop feedback control system that allows the PLL output to maintain a fixed phase relationship with a reference signal. One of the functions of the PLL in the circuit is to play the role of Octave. That is, you can output a fixed multiple frequency of the system clock.

Since the ARM CPU starts, the first thing to do is to configure the ratio of octave. In this way, when the input external clock frequency is certain, according to the ratio of the frequency multiplier, you can get the frequency of the CPU, with different frequency running, which in the embedded CPU, a system for different purposes may run at different frequencies, low-frequency operation slow but power-saving, high-frequency speed but large energy consumption.

But the CPU itself has a design of the highest frequency, if the force is configured to run faster than the design frequency, is what people call overclocking. There may be a problem with accelerating CPU aging and increasing heat dissipation at run time.

Generally for insurance, software development will be paired with the production of several standard frequency.

Three. Device frequency
----------------------------------------

On the SOC CPU, in addition to the CPU core, on a physical chip, there are some other modules, take s3c6410 as an example, it has I2C,UART,USB host and other modules, These modules are connected to the CPU core via the AHB bus. These modules also require a clock signal to drive.

But the frequency signal of arm is too high for some modules. At this time, like the s3c2440, the kernel provides two low-frequency clock signals. HCLK and PCLK Two clock signals for use with the device.

Divider Crossover Device

However, for some low-frequency modules, the frequency of PCLK is still too high, it is necessary for the module to use the divider (divider) to further reduce the frequency. The number of values generally depends on the requirements of the software, so the frequency-dividing parameters of each module are generally adjustable. Therefore, when initializing the relevant module, the software does an important event is to set the frequency division parameters.

Prescaler Prescaler Factor

In some modules, if you need to program to set the ratio of frequency division, usually using prescaler that is the Prescaler factor parameter to set the value of the crossover, assuming that the input frequency is fin, the frequency of output is fout, and the three have the following relationship

Fout = Fin/(prescaler + 1)

In some modules, the frequency after the crossover is still too high, may need to be divided again, this time the parameters of the frequency division is generally called divider value. So the formula becomes

Fout = Fin/(prescaler + 1)/divider

Crystal oscillator, clock signal, phase-locked loop, divider

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.