8051 Micro controller
Upon reset all port pins and port registers are high. I follow these instructions...
P0=0x00; P0=0xFF;
Now ,the result is - All P0 registers are high & all P0 pins are low.
Q1) Does this low P0 pins indicate high impedance floating load in the case of P0?
Now, I start the program with the following instruction only.
P0=0xFF;
But All P0 registers and pins remain high.
Q2)What is the difference here? What's happening inside circuitry in both cases?
Yes, Keil software debugger. C51 IDE
case 1)
main() {P0=0x00; P0=0xFF; while(1); }
case 2)
main() { P0=0xFF; while(1); }
Check port registers in peripheral window. Why different behaviour?
That's just as vague as before!
You mean the Simulator ?
That is, you are not using any real target hardware?
Keil IDE C51. Check with debugger available in keil C51.
that is a SIMULATOR and it SIMULATES based on whatever version Keil choose
Can you check this out.
stackoverflow.com/.../keil-c51-8051-port-0-i-o
Links are posted like this stackoverflow.com/.../keil-c51-8051-port-0-i-o
So gleaned from the new thread this is an AT89S52, still not clear if the respondent is actually using a debugger, and if so how and to where it is attached. Or if the part is being simulated, and if so poorly.
Super selective screen shots. No images of the hardware or board.
Perhaps a more realistic test would be to drive alternate values on P0 and scope the thing to look at the signals presented on the pins.
Look at the listing file for the code generated.
If you think there is a defect with the software, perhaps converse with support, via their direct contact details.
answer: stackoverflow.com/.../9751865
anyhow: why do you give a hoot what the simulator shows, what does your actual circuit do?
a simulator is, by definition, imperfect especially when trying to cover the 4711 variants of the .51
I was trying to interface active high switch to port 0. Since only P0 have the open drain I/O pin in the case of 8051.
No, that's not true - all 8051 IO pins are open-drain!