When I set port pin to 1, there is much lower voltage than 5V on it, why?
Submitted By: Jan Waclawek FAQ Last Modified: 04/19/08
- You are loading the port pin too heavily.
Note, that in the "classical" 8051 and similar derivatives, the internal pullup of the quasibidirectional I/O pins can source only a few tens of uA. If you load it e.g. by a LED, the internal pullup cannot provide the full voltage to such a load.
If you need to source more current from a port pin, you need either to provide an external pullup (but of course only as "strong" as the pulldown capability of the same port pin allows, usually only a few mA), or add an esternal transistor or logic gate.
For the source/sink capability, always consult the datasheet of the derivative you are using.
Add Information to this FAQ: If you have additional information or alternative solutions to this question, you may add to this FAQ by clicking here.