The circuit design of the minimum system of single chip microcomputer is introduced below. The minimum system of single chip microcomputer is mainly composed of power supply, reset, oscillation circuit and expansion part. For a complete electronic design, the first problem is to provide the power supply module for the whole system. The stability and reliability of the power supply module is the premise and foundation for the smooth operation of the system.
1. Power supply
In the use of stc89c52rc microcontroller, the working voltage: 5.5v-3.4v (5V microcontroller), this place shows that the normal working voltage of our microcontroller is a range value, as long as the power VCC between 5.5V and 3.4V can work normally, voltage more than 5.5V is absolutely not allowed, will burn the microcontroller, if the voltage is lower than 3.4V, the microcontroller will not be damaged, but also can not be damaged Normal operation.
2. Oscillating circuit
There are crystal oscillator in the single-chip microcomputer system. The crystal oscillator plays a very important role in the single-chip microcomputer system. The whole process is called crystal oscillator. It combines the internal circuit of the single-chip microcomputer to generate the clock frequency required by the single-chip microcomputer. The higher the clock frequency provided by the crystal oscillator of the single-chip microcomputer, the faster the running speed of the single-chip microcomputer. The execution of all instructions connected by the single-chip microcomputer is based on the clock frequency provided by the crystal oscillator of the single-chip microcomputer.
Crystal oscillator is usually divided into two types: passive crystal oscillator and active crystal oscillator. Passive crystal oscillator is generally called crystal, while active crystal oscillator is called oscillator.
Active crystal oscillator is a complete resonant oscillator. It uses the piezoelectric effect of quartz crystal to start oscillation, so active crystal oscillator needs power supply. When we make the active crystal oscillator circuit well, it can actively generate oscillation frequency without external circuit, and can provide high-precision frequency reference. The signal quality is better than passive signal.
Active crystal oscillator usually has four pins, VCC, GND, crystal output pin and one unused suspended pin. The passive crystal oscillator has two or three pins. If it has three pins, the middle pin is the shell of the crystal oscillator. When it is used, it needs to be connected to GND. The pins on both sides are the two leading out pins of the crystal. These two pins have the same effect, just like the two pins of the resistance. There is no difference between positive and negative. For the passive crystal oscillator, we can connect the two crystal oscillator pins of our single chip microcomputer, while the active crystal oscillator is only connected to the input pin of the crystal oscillator of the single chip microcomputer, and the output pin does not need to be connected, as shown in Figure 1 and Figure 2.
Fig. 1 connection method of passive crystal oscillator
Figure 2 active crystal oscillator connection method
3. Reset circuit
Let’s first analyze our reset circuit, as shown in Figure 3.
Figure 3 single chip reset circuit
When the circuit is in a steady state, the capacitor acts as an isolation DC, isolating + 5V, while the reset button on the left side is in a pop-up state, and 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 voltage. Our microcontroller is high level reset, low level normal work, so the normal working voltage is 0V voltage, completely OK, no problem.
4. Independent key
Generally, there are two kinds of keys: independent key and matrix key. Independent key is relatively simple and connected with independent input line, as shown in Figure 4
Figure 4 independent key circuit diagram