Are you holding the pin at ground with a pull-down resistor until a button isIF PortD.0 = 1 THEN
pressed taking the input high?
I don't have a 16F874A, but I do use the 16F876A with PORTD inputs, and
it works as expected.
It might help is you showed all your code & a schematic.




Bookmarks