Reasons why 51 single chip microcomputer cannot start oscillating normally

Publisher:平凡梦想Latest update time:2021-01-15 Source: eefocus Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

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.


Reference address:Reasons why 51 single chip microcomputer cannot start oscillating normally

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)

Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号