It seems that we have mentioned pull-up resistors and pull-down resistors many times before. What kind of resistors are considered pull-up resistors and what are the functions of pull-up resistors? A
pull-up resistor pulls an uncertain signal to a high level through a resistor, and this resistor also plays a current limiting role. A pull-down resistor pulls the signal to a low level.
For example, when our IO is set to open-drain output high level or high-impedance state, the default level is uncertain. The external pin is connected to VCC through a resistor, which is a pull-up resistor, and the corresponding pin is a high level; through a resistor to GND, which is a pull-down resistor, the corresponding pin is a low level.
Pull-up resistors have many applications, what functions can they play? Now we mainly understand the following 4 most commonly used points:
In order for the OC gate to output a high level, an external pull-up resistor must be added for normal use. In fact, the OC gate is equivalent to the open-drain output of the microcontroller IO. The principle can be seen in the open-drain circuit in Figure 9-1.
Increase the driving capacity of ordinary IO ports. The pull-up resistor of the internal IO port of the standard 51 MCU is generally tens of K ohms. For example, the internal pull-up resistor of STC89C52 is 20K, so the maximum output current is 250uA. Therefore, adding an external pull-up resistor can form a parallel structure with the internal pull-up resistor to increase the current output capacity at high level.
In level conversion circuits, such as the 5V to 12V circuit we talked about earlier, the pull-up resistor actually plays the role of a current limiting resistor. You can review Figure 3-8.
Unused pins in the microcontroller, such as bus pins, are susceptible to electromagnetic interference and are in a disordered state when the pins are left floating. Although it will not cause any impact on the program, it will usually increase the power consumption of the microcontroller. Adding a pull-up resistor to VCC or a pull-down resistor to GND can effectively resist electromagnetic interference.
So when we design the circuit, how do we choose the appropriate resistance value of the pull-up and pull-down resistors?
It should be large enough to reduce power consumption, because the larger the resistance, the smaller the current.
In order to ensure sufficient pin driving capability, it should be small enough. The smaller the resistance, the larger the current.
In open-drain output, a pull-up resistor that is too large will cause the signal rising edge to slow down. Let us explain: the actual level change takes time. Although it is very small, it will never reach zero. The size of the pull-up resistor in open-drain output directly affects the time required for this rising process, as shown in Figure 9-2. Think about it, if the resistance is very large and the signal frequency is very fast, it will eventually cause the signal to become low before it rises to a high level, so the signal cannot be transmitted correctly.
Figure 9-2 Effect of pull-up resistor value on waveform
Taking various situations into consideration, the pull-up and pull-down resistor values we commonly use are mostly selected between 1K and 10K. The specific value usually depends on actual needs. Usually it is within the standard range and is not necessarily a fixed value.
Previous article:Formal and actual parameters of C language functions
Next article:The address of a C language variable
- Popular Resources
- Popular amplifiers
- Learn ARM development(16)
- Learn ARM development(17)
- Learn ARM development(18)
- Embedded system debugging simulation tool
- A small question that has been bothering me recently has finally been solved~~
- Learn ARM development (1)
- Learn ARM development (2)
- Learn ARM development (4)
- Learn ARM development (6)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- LED chemical incompatibility test to see which chemicals LEDs can be used with
- Application of ARM9 hardware coprocessor on WinCE embedded motherboard
- What are the key points for selecting rotor flowmeter?
- LM317 high power charger circuit
- A brief analysis of Embest's application and development of embedded medical devices
- Single-phase RC protection circuit
- stm32 PVD programmable voltage monitor
- Introduction and measurement of edge trigger and level trigger of 51 single chip microcomputer
- Improved design of Linux system software shell protection technology
- What to do if the ABB robot protection device stops
- ASML predicts that its revenue in 2030 will exceed 457 billion yuan! Gross profit margin 56-60%
- Detailed explanation of intelligent car body perception system
- How to solve the problem that the servo drive is not enabled
- Why does the servo drive not power on?
- What point should I connect to when the servo is turned on?
- How to turn on the internal enable of Panasonic servo drive?
- What is the rigidity setting of Panasonic servo drive?
- How to change the inertia ratio of Panasonic servo drive
- What is the inertia ratio of the servo motor?
- Is it better for the motor to have a large or small moment of inertia?
- EEWORLD University Hall ---- Introduction to Internet of Things Engineering by Wang Zhiliang, University of Science and Technology Beijing
- New version of the micro http server MicroWebSrv2
- Quectel EC20 module power supply problem
- Macro base stations, distributed base stations, small base stations
- How to integrate FreeRTOS on ARMv8-M architecture processor?
- [STM32WB55 Review] Play with the built-in Demo
- This is an article about 5G 2.4G antenna. You will earn money if you see it. You will learn the truth if you learn it.
- [Share] Easy-to-understand introductory textbook on FPGA. Standardize design and avoid detours
- Learn about the MSP430F5529 Power Management Module
- How to choose a DC-DC module power supply What is the importance of DC_DC module power supply