If you are driving an LED, then a resistor of about 1K will do. If you want a brighter brightness, the resistor can be reduced, but the minimum value should not be less than 200 ohms, otherwise the current will be too high; if you want a lower brightness, the resistor can be increased. How much should it be increased depends on the brightness. Generally speaking, when it exceeds 3K, the brightness is very weak. However, for ultra-high brightness LEDs, sometimes the brightness is acceptable when the resistor is 10K. I usually use 1k.
For driving the optocoupler, if the high potential is valid, that is, the coupler input terminal is connected between the port and the ground, then the situation is the same as that of the LED; if the low potential is valid, that is, the coupler input terminal is connected between the port and VCC, then in addition to connecting a resistor between 1-4.7k in series, the resistance of the pull-up resistor can be particularly large, between 100k-500K, of course 10K is also possible, but considering the power saving issue, there is no need to use such a small one.
For the driving transistor, it is divided into two cases: PNP and NPN tubes: For NPN, there is no doubt that the NPN tube is high-level effective, so the resistance of the pull-up resistor can be between 2K and 20K, and the specific size depends on what load the collector of the transistor is connected to. For LED loads, since the light-emitting current is very small, the resistance of the pull-up resistor can be 20k, but when the collector of the tube is a relay load, due to the large collector current, the resistance of the pull-up resistor should not be greater than 4.7K, and sometimes even 2K is used. For PNP tubes, there is no doubt that the PNP tube is low-level effective, so the resistance of the pull-up resistor can be more than 100K, and the base of the tube must be connected in series with a 1-10K resistor. The size of the resistance depends on what the load of the collector of the tube is. For LED loads, since the light-emitting current is very small, the resistance of the resistor connected in series with the base can be 20k, but when the collector of the tube is a relay load, due to the large collector current, the resistance of the base resistor should not be greater than 4.7K.
For driving TTL integrated circuits, the pull-up resistor should be between 1 and 10K. Sometimes, if the resistor is too large, it cannot be pulled up, so a smaller resistance is used. However, for CMOS integrated circuits, the pull-up resistor can be very large, generally not less than 20K. I usually use 100K. In fact, for CMOS circuits, 1M is also acceptable. However, it should be noted that when the pull-up resistor is too large, interference is likely to occur, especially when the lines on the circuit board are very long, this interference is more serious. In this case, the pull-up resistor should not be too large, generally less than 100K, and sometimes even less than 10K.
Previous article:C51 library function accumulation
Next article:51 single chip microcomputer C51 millisecond level (ms) accurate delay
- Popular Resources
- Popular amplifiers
- Learn ARM development(19)
- Learn ARM development(14)
- Learn ARM development(15)
- 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)
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
- Learn ARM development(19)
- Learn ARM development(14)
- Learn ARM development(15)
- Analysis of the application of several common contact parts in high-voltage connectors of new energy vehicles
- Wiring harness durability test and contact voltage drop test method
- From probes to power supplies, Tektronix is leading the way in comprehensive innovation in power electronics testing
- From probes to power supplies, Tektronix is leading the way in comprehensive innovation in power electronics testing
- Sn-doped CuO nanostructure-based ethanol gas sensor for real-time drunk driving detection in vehicles
- Design considerations for automotive battery wiring harness
- Do you know all the various motors commonly used in automotive electronics?
- Allegro reports an error when drilling files
- Design of Intelligent Vehicle Safety System Based on DSP
- Digital clock design based on FPGA (video source code)
- The relationship between wavelength and frequency and conversion tools
- RISC-V Processor Design Course Series——CPU Basics
- Qorvo's 802.11AX 5 GHZ FEM Dramatically Improves Wi-Fi Performance
- Unstable waveform
- Industrial Equipment Edge Intelligence Solutions
- Evaluation Weekly Report 20220328: Chuanglong TI AM5708 industrial board is here, and the last day for Anlu FPGA application
- Sometimes just one sentence can improve the channel loss of high-speed signals???