P0 port pull-up resistor selection

Publisher:Joyful222LifeLatest update time:2016-12-14 Source: eefocus Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

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.


Reference address:P0 port pull-up resistor selection

Previous article:C51 library function accumulation
Next article:51 single chip microcomputer C51 millisecond level (ms) accurate delay

Latest Microcontroller Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号