I am trying to interface a P89C662 with an LCD. I am using the example in Mazidi's book. The RS, R/W, E pins of the LCD are attached to P2.0, P2.1, P2.2 respectively. When I try to use the Keil Monitor-51 driver to do on chip debugging, P2 never changes so I cannot even initialize the LCD. The P89C662 has 32K flash so I am not using any external memory. So I should be able to use P2 and P0 as I/O ports. But for some reason I can't!!!
I tried using bits 0,1,3,4 in P3 on the Philips P89C662. These were the only one I could change. The other bits would not change. I encountered some funny behavior. Some bits in P1 would change upon clearing or setting some bits in P3.