Basic knowledge
Easy-to-understand talk about pull-up resistors and pull-down resistors
Baidu clicked on the pull-up resistors and pull-down resistors, and a bunch of explanations came out. However, none of the explanations seems to be easy to understand. It may be that the level of the explanation is too high, and the editor can’t listen to it. understand.
Let me give you some familiar and easy-to-understand explanations, and make sure you understand!
Where are the pull-up resistors and pull-down resistors used?
Answer: Used in digital circuits where there are high and low levels.
How to wire the pull-up resistor and the pull-down resistor?
Pull-up resistor: one end of the resistor is connected to VCC, one end is connected to logic level access pins (such as MCU pins)
Pull-down resistor: one end of the resistor is connected to GND, one end is connected to the logic level access pin (such as the single-chip pin)
As shown in the figure above, one end of R13 and R14 is connected to 3.3V, and one end is connected to the pins of the microcontroller through J17. These two resistors are pull-up resistors.
As shown in the figure above, one end of R18 is connected to GND, and one end is connected to the pins of the microcontroller (it's just a resistor connected to the pins of the microcontroller). So this is the pull-down resistor.
What is the use of pull-up resistors and pull-down resistors?
Improve driving ability:
For example, a single-chip microcomputer outputs a high level, but due to the influence of the subsequent circuit, the output high level is not high, which means that the VCC cannot be reached, which affects the operation of the circuit. Therefore, a pull-up resistor must be connected. The situation of the pull-down resistor is the opposite. Let the MCU pin output low level. As a result, the low level of the output cannot reach GND due to the influence of the subsequent circuit, so a pull-down resistor is connected.
When the pin level of the single-chip microcomputer is uncertain, let the following have a stable level:
For example, when the pull-down resistor is connected to the above, when the microcontroller is first powered on, the level is indeterminate, and if the microcontroller you are connected to is powered on, the pins of the microcontroller are input pins instead of output pins. At this time, the level of the single-chip microcomputer is also uncertain. The function of R18 is to force the level to remain at a low level if the pin level of the previous single-chip microcomputer is uncertain.
Let me explain it this way. If IE_DATA is not connected to any pin, then due to the pull-down effect of R18, IE_DATA is low, so the transistor will not be turned on.