I am having issues setting outputs on a PIC18f26J53. I have done this on other PICs before so I am not sure what is going on.
I wrote a little test program to test the problem:
I can see all but the following Latch pins transitioning:
PortA
All pins seem to transition as expected.
PortB
RB7, RB6 (both expected since they are also PGC and PGD and my PICKit is still connected.
RB5 (always measures high, debugger shows as high)
PortC
RC4,RC5,RC7 (always measures low, debugger shows 2 & 7 as low and 7 as high)
This PIC is a bit strange that is has an Open Drain option. I have never used this before but I don't think it is on all of the effected pins and I think it is disabled.
Can someone please take a look?
http://www.microchip.com/wwwproducts/Devices.aspx?dDocName=en548696
BTW I also have a 18F27J53 which is pretty much pin and feature compatible and I am getting the exact behavior of the 18F26J53. So it must be something in the setup of the chip.
I wrote a little test program to test the problem:
Rich (BB code):
TRISA = 0;
TRISB = 0;
TRISC = 0;
while(1)
{
LATA=255;
LATB=255;
LATC=255;
delay_ms(10);
LATA=0;
LATB = 0;
LATC=0;
delay_ms(10);
}
PortA
All pins seem to transition as expected.
PortB
RB7, RB6 (both expected since they are also PGC and PGD and my PICKit is still connected.
RB5 (always measures high, debugger shows as high)
PortC
RC4,RC5,RC7 (always measures low, debugger shows 2 & 7 as low and 7 as high)
This PIC is a bit strange that is has an Open Drain option. I have never used this before but I don't think it is on all of the effected pins and I think it is disabled.
Can someone please take a look?
http://www.microchip.com/wwwproducts/Devices.aspx?dDocName=en548696
BTW I also have a 18F27J53 which is pretty much pin and feature compatible and I am getting the exact behavior of the 18F26J53. So it must be something in the setup of the chip.
Last edited: