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.
If I had created any confusion, allow me to apologize.
Technically speaking, can I use either to declare a port as input?
PxMDIN = 0xFF; PxMDOUT = 0 technically speaking, can I use either to declare a port as input?
this can not be answered since you decide to keep it secret which derivative you are using.
these are not 'standard' '51 SFRs
Erik
I am using the C8051F044 MCU.
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