Quote Originally Posted by abidr View Post
You need to look at the PIC16F877A data sheet page 51 which says that port D is a parallel Slave Port.
I think you need to disable the PSP.
You mean the Parallel Slave Port that's disabled by default on power up, thereby letting Port D function as normal I/O?