AceOfHearts
New Member
Hi there,
I am a little confused concerning how to select input and output on the 8051.
OK, upon reset, all the ports are input port. Right? And when the first 0 is written to the port, it becomes an output port....
Why is it that when I send a logic (be it 1 or 0) it outputs it, without me writing this iniitial 0 to configure it as an output port?
Suppose it is now an output port, and I now want to make it an input port so I need to send 1 to the port. But how does it know that I want to make it an input port, because it could just output it as a normal output logic?
Confused. Please help...
I am a little confused concerning how to select input and output on the 8051.
OK, upon reset, all the ports are input port. Right? And when the first 0 is written to the port, it becomes an output port....
Why is it that when I send a logic (be it 1 or 0) it outputs it, without me writing this iniitial 0 to configure it as an output port?
Suppose it is now an output port, and I now want to make it an input port so I need to send 1 to the port. But how does it know that I want to make it an input port, because it could just output it as a normal output logic?
Confused. Please help...
Last edited: