Pull to release, actively output current, output current from the output port;
Filling means charging, passive input current flows into the output port;
Absorption is the active absorption of current, flowing into the input port.
Pull-up and pull-down resistors
I. Definition
1. Pull-up means clamping the uncertain signal at a high level through a resistor! "The resistor also acts as a current limiter"! The same applies to pull-down!
2. Pull-up is to inject current into the device, and pull-down is to output current
3. Weak and strong are just different in the resistance value of the pull-up resistor, there is no strict distinction
4. For non-collector (or drain) open-circuit output circuits (such as ordinary gate circuits), the ability to increase current and voltage is limited. The function of the pull-up resistor is mainly to output the current channel for the collector open-circuit output circuit.
2. Pull-up resistor function
1. Generally, when used as a single-key trigger, if the IC itself does not have an internal resistor, in order to keep the single key in an untriggered state or return to the original state after being triggered, a resistor must be connected outside the IC.
2. Digital circuits have three states: high level, low level, and high resistance state. In some applications, high resistance state is not desired. It can be stabilized by using pull-up resistors or pull-down resistors, depending on the design requirements!
3. Generally speaking, I/O ports are referred to as ports. Some can be set, some cannot be set, some are built-in, and some need to be externally connected. The output of the I/O port is similar to the C of a transistor. When C is connected to the power supply through a resistor, the resistor becomes the C pull-up resistor, that is to say, if the port is normally at a high level; when C is connected to the ground through a resistor, the resistor is called a pull-down resistor, making the port usually at a low level. What is its function? For example: "When a port connected to a pull-up resistor is set to input state, its normal state is high level, which is used to detect low level input".
4. Pull-up resistors are used to provide current when the bus driving capability is insufficient. Generally speaking, it is called pulling current, and pull-down resistors are used to absorb current, which is what we usually call sinking current.
5. Connecting a resistor is to prevent the input terminal from being left floating
6. Reduce the interference of external current on the chip
7. Protect the protection diode in CMOS, the current is generally not more than 10mA
8. Increase or decrease the drive current by pulling up or down
9. Potential that changes the level, commonly used in TTL-CMOS matching
10. There is a certain state when the pin is floating
11. Increase the driving capability at high level output.
12. Provide current for OC gate
3. Application principles of pull-up resistors
1. When the TTL circuit drives the COMS circuit, if the high level output by the TTL circuit is lower than the lowest high level of the COMS circuit (generally 3.5V), it is necessary to connect a pull-up resistor to the output end of the TTL to increase the value of the output high level.
2. The OC gate circuit "must be added with a pull-up resistor before it can be used."
3. In order to increase the driving capability of the output pins, pull-up resistors are often used on some microcontroller pins.
4. On COMS chips, in order to prevent damage caused by static electricity, unused pins cannot be left floating. Generally, pull-up resistors are connected to reduce input impedance and provide a discharge path.
5. Add pull-up resistors to the chip pins to increase the output level, thereby improving the noise tolerance of the chip input signal and enhancing anti-interference capabilities.
6. Improve the anti-electromagnetic interference capability of the bus. If the pin is left floating, it is more susceptible to external electromagnetic interference.
7. Resistance mismatch in long-line transmission can easily cause reflected wave interference. Adding a pull-down resistor can achieve resistance matching and effectively suppress reflected wave interference.
8. In digital circuits, unused input pins must be connected to a fixed level and connected to a high level or ground through a 1k resistor.
4. Pull-up resistor value selection principle
1. Considering power consumption and the chip's current sinking capability, it should be large enough; the larger the resistance, the smaller the current.
2. It should be small enough to ensure sufficient driving current; the smaller the resistance, the larger the current.
3. For high-speed circuits, excessively large pull-up resistors may cause the edge to become flat.
The above three points are usually selected between 1k and 10k. The same is true for pull-down resistors.
The selection of pull-up resistors and pull-down resistors should be "set in combination with the characteristics of the switch tube and the input characteristics of the lower circuit, mainly considering the following factors":
1. Balance between driving capability and power consumption. Taking the pull-up resistor as an example, generally speaking, the smaller the pull-up resistor, the stronger the driving capability, but the greater the power consumption. The design should pay attention to the balance between the two.
2. Driving requirements of the lower circuit. Taking the pull-up resistor as an example, when the output is high, the switch tube is disconnected, and the pull-up resistor should be appropriately selected to provide sufficient current to the lower circuit.
3. Setting of high and low levels. The threshold levels of high and low levels of different circuits will be different, and the resistors should be set appropriately to ensure that the correct level can be output. Taking the pull-up resistor as an example, when the output is low level, the switch tube is turned on, and the voltage divider value of the pull-up resistor and the switch tube on resistance should be ensured to be below the zero level threshold.
4. Frequency characteristics. Taking the pull-up resistor as an example, the capacitance between the pull-up resistor and the drain-source level of the switch tube and the input capacitance between the lower circuit will form an "RC delay". The larger the resistance, the greater the delay. The setting of the pull-up resistor should take into account the circuit's needs in this regard.
The principle of setting the pull-down resistor is the same as that of the pull-up resistor.
Example:
In addition, the following points should be noted:
A. It depends on what device the output port drives. If the device requires a high voltage and the output voltage of the output port is not enough, a pull-up resistor needs to be added.
B. If there is a pull-up resistor, its port is at a high level by default. If you want to control it, you must use a low level to control it, such as the collector of a transistor in a three-state gate circuit, or the anode of a diode to control the current of the pull-up resistor to a low level.
C. Especially used in interface circuits, in order to obtain a certain level, this method is generally used to ensure the correct circuit state to avoid accidents. For example, in motor control, the upper and lower bridge arms of the inverter bridge cannot be directly connected. If they are driven by the same microcontroller, the initial state must be set. Prevent direct connection!
Try to use current sinking for driving.
----------------------------------------
In digital circuits, unused input pins must be connected to a fixed level, connected to a high level or grounded through a 1k resistor.
1. Function of resistor:
l Connecting resistors is to prevent the input terminal from floating
l Reduce the interference of external current on the chip
l Protect the protection diode in CMOS, generally the current is not more than 10mA
l Pull up and pull down, current limiting
1. Change the potential of the level, commonly used in TTL-CMOS matching
2. There is a certain state when the pin is floating
3. Increase the driving capability when the high level output.
4. Provide current for OC gate
When selecting a resistor, choose the one that is closest to the standard value after calculation!
Why does P0 need a pull-up resistor? The reasons are:
1. There is no pull-up resistor in the P0 port chip
2. When P0 is in the I/O port working state, the upper FET is turned off, so the output pin is floating, so P0 is an open-drain output when used for the output line.
3. Since there is no pull-up resistor inside the chip and the upper FET is turned off, the port level cannot be pulled up when P0 outputs 1.
P0 is a bidirectional port, and the other P1, P2, and P3 are quasi-bidirectional ports. The quasi-bidirectional port is because it needs to be "prepared" before reading external data. Why is it necessary to prepare?
up and pull-down are generally 10k!
The most common use of the pull-up/pull-down resistor of the chip
Add a ground resistor -- pull down
Add a power resistor -- pull up
For devices with open drain or open collector output, pull-up resistors are required to work. In addition, for ordinary ports, adding pull-up resistors can improve anti-interference ability, but it will increase the load.
Power supply: +5V
ordinary upright LED,
what size pull-up resistor is appropriate? Thank you for your advice!
To be on the safe side, let it pull, (5-0.7)/10mA=400ohm, which is about right. If you are not sure, use 2k. [Strange, is there a new LED with a tube voltage of 0.7V? As far as I know, it seems to be around 1.5V. I think there is no big problem with a few hundred ohms to 1K. Generally, the chip will not be attenuated to 10mA, right? ]
Previous article:The difference between TTL level and CMOS level
Next article:MSP430--Timer B
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- Program to replace Matlab results with EXCEL formulas
- C2000 ±0.1° Accurate Discrete Resolver Front-End Reference Design
- EEWORLD University Hall----Live Replay: ADI MEMS Sensors Open a New Era of Conditional State Monitoring
- Unboxing ESP32-S2 and S3
- Easily solve design challenges with MSP430 MCUs
- TI Logistics Robot CPU Board
- I would like to ask which one has better performance, thank you for your recommendation
- TI supports Bluetooth technology for high-precision body temperature measurement flexible PCB reference design
- Problems of charging and discharging dual capacitors in peak detectors
- EK140P Linux-4.1.15 Test Manual