Hi,

just ported a program from 16F877 to this PIC. And Port D refuses to act as an input.
I tried the following program snippet:

ECCP1CON=%00000000
TRISE.4=0
TRISD=%0001111

IF PORTD.2=1 THEN
HIGH beeper
PAUSE 1000
LOW beeper
ENDIF

I put a 1k resistor from Vdd (5V) to port D2. The beeper doesn't sound. When I change the conditional statement to "PORTD.2=0",then the beeper sounds, even with the resistor connected! I checked for shorts, and no there is no short from D2 to GND.
I also tried ports D1 and D3: same result...
For some reason ports D refuse to become input and stay output low.....

Another funny thing is that I use PortA0 as AD converter. If I connect 3V to this port, the PIC heats up like crazy (not so with the same PCB and 16F877)
When I put a 100k in series with this pin, the AD works OK and PIC doesn't heat up.
So also this pin acts as active low, even in AD mode....


Any ideas what more to try?