This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

PORT I/O...

Hi. What is/are the difference(s) between the following:

PxMDIN = 0xFF; // all pins on port1 are digital input with optional weak pullup.
PxMDOUT = 0; // all pins on port1 are digital input as open-drain (no pullup).

Thank you.

Parents Reply Children
  • i try using fc and it tells a difference. first is out and last is in.

  • But on one hand, no file compare program needed to see IN or OUT in the lines.

    Next thing - with 8051 chips, you can't ignore "OUT" in relation to "IN" because many 8051 have pseudo-bidirectional ports. So you write to output and that affects if you can read data in. And for chips with extended functionality, a port with OUT in name can represent configuration for outputs - basically port direction.

    So what do you actually get from a file compare program that is useful? Isn't it the datasheet/user manual/app notes/... that are needed to actually verify the definition of the registers?

  • Next thing - with 8051 chips, you can't ignore "OUT" in relation to "IN" because many 8051 have pseudo-bidirectional ports

    I am using the C8051F044 MCU.
    which has configurable ports, so the above is not relevant for this chip

    as far as the OP's original quesrtion, reading the datasheet will answer it

    Erik