# Is my GPIO pin fried?

I have a piece of code that toggles the GP2 pin on a PIC12F615 and suddenly it started producing a weird waveform, I'm not sure what I've done that could cause this. I isolated the code that toggles the pin alone in a new project to see if I'm doing something wrong but I still get the same result.

Here's the waveform:

And here's the code

void main(void)
{
__delay_ms(10);

TRISAbits.TRISA2 = 0;
while(1)
{
PORTAbits.GP2 = 0;
__delay_us(55);
PORTAbits.GP2 = 1;
__delay_us(55);
}

return;
}

• Try a different pin. – Eugene Sh. Jul 25 '17 at 14:55
• It looks like the transistor that sinks (NMOS) is broken. Because it's not happening, the capacitance is discharging through the probe by the looks of it. But I'll second @EugeneSh. and ask you to test another pin as well. – Harry Svensson Jul 25 '17 at 15:00
• Usually fried transistors will go short so you'll see something intermediate, but maybe you fried the metalization or something. Try another chip. – Spehro Pefhany Jul 25 '17 at 15:01
• General rule of electronics... If it worked before and it does not work now... what did you do in between. If the pin is attached to something check the circuit loads. If not, what else did you change. It could also always be static discharge if you are not following proper ESD protection techniques. – Trevor_G Jul 25 '17 at 15:03
• I'd highly recommend spending some time figuring out how your pin got fried. If it happened once, it will probably happen again. – Mathieu L. Jul 25 '17 at 15:31