I'm using a Microchip PIC24FJ1024GA606.
I have two versions of my PCB and I am using a pin to identify the hardware revisions. On Version 1, the pin is unused and on version 2, the pin is connected to a 4k7 pull-up to 3v3.
In the code itself, I am using IOCPDGbits.IOCPDG8 = 1;
to set the port as a pull down. This allows me to identify version 1 boards as having that pin low, and version 2 boards as having the pin pulled high.
Everything was working for a week or so and then it stopped working -- my version 2 board started to register the pin as low. I replaced the resistor and once again it was reading low. I then replaced it with a 2k ohm resistor and now the pin is reading high.
My questions are:
- Am I doing something obviously wrong?
- What are the chances the MCU is damaged?