P0 does not work

Hello,

I'm trying to connect a NIC to my P89C51RD2BA uC. After some tests I discovered that P0 is always 0V no matter what value assign to it. So for example MOV P0,#12 has no effect - the voltage acros al the P0 pins remains 0V (P0 at 0x80 of course). All the other ports (P1 P2 and P3) work just fine.

Is something wrong with my uC or am I being stupid here?

Thank you,

Paul.

This message was sent using the comp.arch.embedded web interface o

formatting link

Reply to
ppd
Loading thread data ...

In article , ppd writes

All port pins except P0 on 8051 devices are open-collector with internal pull up resistors.

P0 has no internal pull up resistors, you need to pull the pins up with external resistors. This is because of its dual function as data/address output.

--
Tim Mitchell
Reply to
Tim Mitchell

8051s' P0 outputs are, unlike the pther ports, open drain and therefore require pull-up resistors.

Yep.

--
========================================================================
          Michael Kesti            |  "And like, one and one don't make
                                   |   two, one and one make one."
    mrkesti at comcast dot net     |          - The Who, Bargain
Reply to
Michael R. Kesti

Port P0 is open collector, except when being used as an address or data-out bus. You need to put some pullup resistors on it (about 10K). Either that, or you can frig it to perform an external cycle, using the P0 as an address/ data bus (rather than a port).

Richard [in SE13]

Reply to
Jet Morgan

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.