Analysis of single chip microcomputer system circuit design

Publisher:beta12Latest update time:2017-09-14 Source: ofweekKeywords:MCU Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

  The following introduces the circuit design of the single-chip microcomputer minimum system . The single-chip microcomputer minimum system is mainly composed of power supply, reset, oscillation circuit and expansion part. For a complete electronic design , the first problem is to provide a power supply module for the entire system. The stability and reliability of the power supply module is the premise and basis for the smooth operation of the system.

  1. Power supply

  When using the STC89C52RC microcontroller, the operating voltage is: 5.5V-3.4V (5V microcontroller). This means that the normal operating voltage of our microcontroller is a range value. As long as the power supply VCC is between 5.5V and 3.4V, it can work normally. Voltage exceeding 5.5V is absolutely not allowed, which will burn out the microcontroller. If the voltage is lower than 3.4V, the microcontroller will not be damaged, but it will not work normally.

  2. Oscillation circuit

  There are crystal oscillators in the microcontroller system. The crystal oscillator plays a very important role in the microcontroller system. The full name of the crystal oscillator is crystal oscillator. It combines with the internal circuit of the microcontroller to generate the clock frequency required by the microcontroller. The higher the clock frequency provided by the microcontroller crystal oscillator, the faster the microcontroller runs. The execution of all instructions connected to the chip is based on the clock frequency provided by the microcontroller crystal oscillator.

  Crystal Oscillator

  Crystal oscillators are usually divided into two types: passive crystal oscillators and active crystal oscillators. Passive crystal oscillators are generally called crystals, while active crystal oscillators are called oscillators.

  The active crystal oscillator is a complete resonant oscillator. It uses the piezoelectric effect of a quartz crystal to start oscillating, so the active crystal oscillator needs power supply. When we make the active crystal oscillator circuit, it can actively generate an oscillation frequency without the need for an external circuit, and can provide a high-precision frequency reference. The signal quality is better than that of a passive signal.

  Active crystal oscillators usually have 4 pins, VCC, GND, crystal output pin and an unused floating pin. Passive crystal oscillators have 2 or 3 pins. If it has 3 pins, the middle pin is the shell of the crystal oscillator, which needs to be connected to GND when in use. The pins on both sides are the two lead pins of the crystal. These two pins have the same function, just like the two pins of a resistor, there is no positive or negative difference. For passive crystal oscillators, just connect the two crystal oscillator pins on our microcontroller, while active crystal oscillators only need to be connected to the input pin of the crystal oscillator of the microcontroller, and the output pin does not need to be connected, as shown in Figures 1 and 2.

Figure 1 Passive crystal oscillator connection method

Figure 2 Active crystal oscillator connection method

  3. Reset circuit

  Let's first analyze our reset circuit, as shown in Figure 3.

Figure 3 MCU reset circuit

  When the circuit is in steady state, the capacitor isolates the DC and +5V, and the reset button on the left is in the pop-up state, so there is no voltage difference in the lower part of the circuit, so the potential of the button and the part below the capacitor C11 is equal to GND, that is, 0V. Our microcontroller is reset at a high level and works normally at a low level, so the normal working voltage is 0V, which is completely OK.

  4. Independent buttons

  Common buttons are divided into two types: independent buttons and matrix buttons. Independent buttons are simpler and are connected to independent input lines, as shown in Figure 4.

Figure 4 Independent key circuit diagram

  The 4 input lines are connected to the IO port of the microcontroller. When the button K1 is pressed, +5V passes through the resistor R1 and then through the button K1 to finally enter the GND to form a path. Then the entire voltage of this line is added to the resistor R1, and the KeyIn1 pin is a low level. When the button is released, the line is disconnected, and no current will pass through. Then KeyIn1 and +5V should be at the same potential, which is a high level. We can use the high and low levels of the KeyIn1 IO port to determine whether a button is pressed.

  We know the principle of the button in this circuit, but in fact, there is also a pull-up resistor inside our microcontroller IO port. Our button is connected to the P2 port, which is a quasi-bidirectional IO port by default when powered on. Let's take a brief look at the circuit of this quasi-bidirectional IO port, as shown in Figure 5.

Figure 5 Quasi-bidirectional IO port structure diagram

  When the internal output is high, it becomes low after an inverter, and the NPN transistor will not conduct. From the internal point of view, the IO port of the microcontroller is at a high level due to the pull-up resistor R. When no external key is pressed to pull the level down, VCC is also +5V. Although there are two resistors between them, there is no voltage difference, so there will be no current, and all positions on the line are at high levels. At this time, we can read the state of the key normally.

  When the internal output is a low level, it becomes a high level after passing through an inverter, and the NPN transistor is turned on. Then the internal IO port of the microcontroller is a low level. At this time, although there is an external pull-up resistor, the two resistors are in parallel. Regardless of whether the button is pressed or not, the state of the IO port input to the microcontroller is a low level, and we cannot read the state of the button normally.

  5. Matrix buttons

  The relationship between matrix buttons and independent buttons

  We have such an experience when using buttons. When multiple buttons are needed, if they are made into independent buttons, a large number of IO ports will be occupied. Therefore, we introduced matrix buttons, as shown in Figure 6, using 8 IO ports to implement 16 buttons.

Figure 6 Matrix buttons

  In fact, if we understand independent keys, the matrix keys are also simple. Let's analyze them. In Figure 6, there are 4 groups of keys in total. We only look at one group, as shown in Figure 7. Everyone, take a closer look. When KeyOut1 outputs a low level, and KeyOut2, KeyOut3, and KeyOut4 output high levels, are they equivalent to 4 independent keys?

Figure 7 Matrix buttons become independent buttons

  Editor's comment: This article introduces the circuit design of the single-chip microcomputer minimum system. The single-chip microcomputer system has a crystal oscillator, which is usually divided into two types: passive crystal oscillator and active crystal oscillator. The power module, reset circuit and oscillation circuit of the single-chip microcomputer minimum system are analyzed in detail. Understanding the design of the single-chip microcomputer minimum system is beneficial to engineers.


Keywords:MCU Reference address:Analysis of single chip microcomputer system circuit design

Previous article:51 MCU serial communication principle and application
Next article:A brief analysis of the selection and application of the pull-up resistor of the P0 port of the 51 single-chip microcomputer

Recommended ReadingLatest update time:2024-11-16 07:21

In the tide of the "new four modernizations" of automobiles, who will be the MCU champion?
Automotive microcontrollers ( MCUs ) are core components of automotive electronics systems. Under the "new four trends" of electrification, intelligence , networking, and sharing, major automakers have continued to increase their requirements for the architectural integration an
[Automotive Electronics]
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号