??? 02/28/04 04:33 Read: times |
#65666 - About internal pull-ups Responding to: ???'s previous message |
I'm not sure that you need the pull up resistors on either P2 or P3. In at least the derivative I am working with (Atmel T89C51RC2) .... P1, P2 and P3 all have internal pull up resistors.
Hallo Herbert, pull-ups of Ports 1,2,3 in a standard 80C51 micro are not formed by resistors, but by a rather complex arrangement of three PMOS FETs: Strong pull-up pFET1, weak pull-up pFET3 and very weak pull-up pFET2. pFET1 (strong pull-up) is turned on for 2 oscillator periods after a 0-to-1 transition in the port latch. After pFET1 is turned-off again, weak pull-up pFET3 guarantees high state. pFET3 looks like a resistor of up to 50kOhm (depends on derivative!). If now port pin is pulled-down by an external switch, voltage at port drops from 5V to 0V. But if voltage at port pin reaches about 2V, weak pull-up pFET3 is turned-off. Now, only very weak pull-up pFET2 is still activated, which delivers a current of about 10...20µA (depends on derivative!). Very weak pull-up pFET2 looks like a resistor of several hundred kOhms! Theoretically, internal pull-ups are sufficient. But in reality this very low current of 10...20µA can present a problem with standard switch contacts. Switch contacts need a certain minimum current to guarantee that touching metallic contacts present a very low ohmic path. This is especially valid if contacts are a bit older or made of poorer materials. Normally, when using standard low current switches like those used in a keyboard, about 500µA...1mA is enough to guarantee reliable switching. But contacts made for switching higher currents do need higher 'trigger' currents! If you have a look at datasheet of a relay or a switch you will often find specifications about 'minimum load'. This is the minimum load the according contact can safely switch. If you want to have the switch reliable switching of much smaller currents than 500µA, then you need a switch, which is able to handle so called 'dry loads'. Contacts then are made of massive gold or something similar. But contacts of standard switches are normally not made of gold. So, you need this additional pull-up resistor. Of course, there are also the two other reasons, Michael discussed, which underline the benefit of using additional pull-ups. Yes, even /WR and /RD lines can profit from added pull-up resistors (4.7...10kOhm), if these lines are unbuffered and routed over a larger board. Kai |