I am designing a simple circuit with AT89S52 micro controller. I set the I/O pins as high and when the switch is pressed will get connected to ground. And in my program I check for I/O pins as 0 and on 0 will set pin 1.5 as high and the LED will glow.
But the pins 2.0 to 2.7 is not working as expected. These pins are always high even the switch is pressed. Kindly check the attached image and suggest me if anything is wrong.