[SOLVED] In 8051 MC, Why must a logic 1 be written to the port pin to make it an input pin?

Status
Not open for further replies.

shantilal.s50

Junior Member level 1
Joined
Jun 8, 2013
Messages
15
Helped
1
Reputation
2
Reaction score
1
Trophy points
3
Location
Jaipur
Visit site
Activity points
110
I refers to the "The 8051 Microcontroller And Embedded Systems Using Assembly And C" by Muhammad Ali Mazidi in which it was mentioned that to use any port of 8051 as input port the logic 1 must be written to the port pins.why?
 

without this also u can sense input & keep in mind for input always required pull up resistor

- - - Updated - - -

without this also u can sense input & keep in mind for input always required pull up resistor
 

Because when u assign 1 to any pin it get connect to Vcc and if u assign 0 then it connect it to Gnd.
when i/p pin get gnd then it complete its route so we read as 0 and vice versa.
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…