ddnair
Junior Member level 1
Hai friends,
I have used 8051 from college days...and I know that a port can be made as input (P0=0xff) or output (0x00).
My doubt is that , can we make a pin as both input and output in a single program?
Eg : If I interface I2c with 8051 to write and read values in EEPRom....,in this case we are writing to SDA and also reading from SDA( so it acts as both input and output)...I am in a confusion about this....please clarify the doubt .
I have used 8051 from college days...and I know that a port can be made as input (P0=0xff) or output (0x00).
My doubt is that , can we make a pin as both input and output in a single program?
Eg : If I interface I2c with 8051 to write and read values in EEPRom....,in this case we are writing to SDA and also reading from SDA( so it acts as both input and output)...I am in a confusion about this....please clarify the doubt .