Analysis on Selection and Application of P0 Port Pull – up Resistor of 51 Singlechip

As the I / O port output time, the output low 0 output high for the high configuration (not 5V, equivalent to the floating state, that is, P0 port can not really output high). Current is supplied to the load to which it is connected, so a resistor connected to VCC must be connected to supply current to the load via the pull-up resistor.

P0 do not need for the input pull-up resistor, but first set 1.

Because P0 port for the general I / O port pull-up FET has been cut off, so if not set, the pull-down FET will be turned on, can only read 0. Therefore, the input pre-1, so that the pull-down FET ends, the port will be in a high impedance floating state, can read the data correctly.

Because there is no internal pull-up resistor P0, is open drain, no matter how much its drive capability, which is equivalent to it is no power supply, the need for an external circuit to provide the vast majority of P0 port is necessary to add pull-up resistor.

1. General P0 port in the address / data multiplexing do not take the pull-up resistor.

2. When used as a general I / O port, because there is no internal pull-up resistor, it should be connected to the pull-up resistor !!

3. When the p0 port is used to drive the PNP tube, no pull-up resistor is needed because the low level is effective at this time.

4. When the P0 port is used to drive the NPN transistor, it needs a pull-up resistor, because at this time only when P0 is 1, it can make the rear-end turn on.

Simple to say that it is necessary to drive the LCD display must have a power-driven, or can not bright, and just P0 port no power, it is necessary to external power supply, connected to the resistance is to play the role of current limiting; if then P1, P2, P3 ports do not need external power supply and resistance.

P0 port is open drain, no matter how much its drive capability, which is equivalent to it is no power supply, requires an external circuit to provide, in most cases P0 port is necessary to add pull-up resistor; P0 port 5,51 microcontroller It is not necessary to add a pull-up resistor for use as a data and address bus.

Some IC’s drive capability is not strong, if the P0 port as an input plus an unnecessary pull-up, it may not drive the IC pulled back to low, so that the input failed!

If it is driven led, then use about 1K on the line.

If you want to light a little larger, the resistance can be reduced, the minimum not less than 200 ohms, or the current is too large; if you want a little light, the resistance can increase, increase to how much, mainly to see the brightness of the brightness to prevail, the general For more than 3K or more, the brightness is very weak, but for ultra-high brightness LED, sometimes when the resistance of 10K brightness can also be used. Usually use 1k.

For the driver optocoupler, if it is high potential, that is, between the coupler input termination port and ground, and the LED is the same; if it is low potential, that is, between the coupler input termination port and VCC , Then in addition to a series of resistance between 1–4.7k, while the resistance of the resistor can be used particularly large, with 100k – 500K between the line, of course, can also be used with 10K, However, taking into account the power issue, there is no need to use that small.

For the drive transistor, is divided into two cases of PNP and NPN:

NPN, there is no doubt that the NPN transistor is active high, so the resistance of the pull-up resistor with 2K – 20K between the specific size also To see what the collector transistor is connected to the load, for the LED class load, the hairpin current is very small, so the resistance of the pull-up resistor can be used 20k, but for the tube collector is the relay load, the collector Current, so the resistance of the pull-up resistor is best not to be greater than 4.7K, sometimes even with 2K.

PNP tube, there is no doubt that the PNP tube is active low, so the resistance of the pull-up resistor with 100K on the line, and the base of the tube must be connected in series a 1–10K resistance, the size of the resistance To see the tube collector load is what, for LED class load, because the light-emitting current is very small, so the base resistor in series resistance can be used 20k, but for the tube collector is the relay load, the collector Current, so the resistance of the base resistor is best not to be greater than 4.7K.

For driving TTL integrated circuit, the resistance of the pull-up resistor should be between 1 and 10K, and sometimes the resistance is too small to pull, so the resistance is smaller.

However, for CMOS integrated circuits, the value of the pull-up resistor can be very large, generally not less than 20K, I usually use 100K, in fact, for the CMOS circuit, the pull-up resistor with 1M is also possible, but Pay attention to the resistance of the pull-up resistor is too large, prone to interference, especially when the circuit board line is very long, this interference is more serious, pull-up resistor in this case should not be too large, generally less than 100K, Sometimes even less than 10K.

According to the above analysis, the resistance of the pull-up resistor selection is a lot of stress, can not be used indiscriminately.

Similar Posts

Leave a Reply