Yes, the pin must be configured as input.Another quick question. I am using external interrupt 0 which is connected to to switch. Do I have to use a pull-up resistor? Also, do I have to set the pin as input?
Download and read the data sheet. It will spell out the requirements on a pin-by-pin basis.I am using the 8051 MCU.