How to ensure that the crystal oscillator starts oscillating normally?
1. There are many ways to judge. Using an oscilloscope to view the waveform is the most direct. You can also use the voltage range of a digital multimeter to measure the voltage. Because the duty cycle of the crystal oscillator waveform is 50%, the measured average voltage is about 1/2Vcc. For 51 single-chip microcomputers, you can also measure the voltage or waveform of the PSEN pin or the P0 pin when using an external program memory. Only when the crystal oscillator circuit works normally will those pins have signal outputs. However, external extended memory is rarely used now, so it is sufficient to measure the voltage or waveform at both ends of the crystal. However, when the crystal oscillator circuit is poorly designed, the introduction of test equipment may cause the oscillation to stop.
2. The voltage difference between the two ends of the crystal is not the average voltage difference. Although in fact the voltage between the two ends of the crystal may be different due to the influence of the external circuit, this is not the basis for judging whether the crystal oscillator is oscillating, nor is it a condition for the normal operation of the crystal oscillator circuit. As for the high and low not working, it means that one end is Vcc or close to Vcc, and the other end is 0 or close to 0. At this time, the crystal oscillator circuit certainly does not oscillate, otherwise the 50% duty cycle will pull the average voltage to about 1/2Vcc, but this expression is not accurate. Technical people should try to describe it quantitatively and accurately.
3. It is unreliable to judge whether the crystal oscillator is oscillating by listening to the sound. The oscillation frequency of the crystal is far beyond the upper limit of the frequency that the human ear can hear. Sometimes, being able to hear it is a problem, indicating that the crystal quality is poor. More often, a normally working crystal will not make any sound that can be heard by the human ear. Sometimes the sound comes from external circuit components.
4. The two signal input pins of the single-chip microcomputer are pin 19 (XTAL1) and pin 18 (XTAL2). The corresponding circuit inside the single-chip microcomputer is a high-gain amplifier. When the crystal oscillator is connected to the outside, pin 19 corresponds to the input end of the high-gain amplifier, and pin 18 corresponds to the output end of the high-gain amplifier. Therefore, when you measure, there should be a signal at the high-gain output end, that is, pin 18.
51 single chip microcomputer oscillation circuit?
There is a high-gain inverting amplifier in the MCS-51 microcontroller. The input of the inverting amplifier is XTAL1 and the output is XTAL2. The oscillator circuit and the clock circuit formed by the amplifier together constitute the clock mode of the microcontroller. According to the different hardware circuits, the clock connection mode of the microcontroller can be divided into internal clock mode and external clock mode, as shown in Figure 2.11
(a) Internal clock circuit (b) External clock circuit
Internal clock schematic (a self-excited oscillation circuit)
In the internal clock circuit, a quartz crystal oscillator and two fine-tuning capacitors must be connected across the XTAL1 and XTAL2 pins to form an oscillation circuit. Usually, C1 and C2 are 30pF, and the frequency of the crystal oscillator is between 1.2MHz and 12MHz. For the external clock circuit, XTAL1 is required to be grounded and XTAL2 is connected to the external clock. There are no special requirements for the external clock signal, as long as a certain pulse width is guaranteed and the clock frequency is lower than 12MHz.
The oscillation signal of the crystal oscillator is sent to the internal clock circuit from the XTAL2 terminal, which divides the oscillation signal into two and generates a two-phase clock signal P1 and P2 for the single-chip microcomputer. The period of the clock signal is called the state time S, which is twice the oscillation period. The P1 signal is valid in the first half of each state, and the P2 signal is valid in the second half of each state. The CPU uses the two-phase clock P1 and P2 as the basic beat to coordinate the effective operation of various parts of the single-chip microcomputer.
Previous article:Method of expanding serial port of 51 single chip microcomputer
Next article:8051 MCU Tutorial Lesson 2: Internal and External Structure of MCU (I)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- TI full range of component libraries (component library, package library, 3D library) collection
- [NXP Rapid IoT Review] Week 2: Get familiar with the online GUI Rapid IoT Studio
- National College Student Electronic Design Competition Quadcopter UAV Data Album
- Today at 10:00 AM, there will be a prize live broadcast: [ADI will meet you for TOF (Time Of Flight) technology introduction and product applications]
- Second-order filter, how to ensure that the data does not overflow when performing fixed-point operations?
- GD32E231 DIY Competition (7) - Human infrared sensor module and music IC driver completed
- About the problem of data transmission between AD7768 evaluation board and sdp-h1 board
- Free e-book download | "ADI System Solutions Selection Volume 6"
- Hello everyone
- CC2541 Mini Development Kit and CC2540 by Original You