Brian Tremaine
New Member
Hi -
I'm having difficulty debugging with a PICKIT3 on a 12F1571. My circuit is reading three switches and controlling a PWM output. I've attached a schematic. Note, I removed C7 on switch S1 as it was loading the ICSPCLK.
I have RA1, RA2 and RA4 configured as inputs with weak pull-ups. RA0 is configured as a digital output. I used MCC to configure the pins.
One switch is directly connected to RA1/ICSPCLK and the switch is normally open. RA0/ICSPDAT also connects to the gate of a FET (high impedance). Will this work in both programming mode and in debug mode?
My other two switches are on RA2 and RA4.
My code loads and S3 (RA4) detects a switch event. However, switch S2 (RA2) is at 5V and toggles to GND and back to 5V but no switch event is detected.
After programming S1 (RA1) is sitting at 0v, as if no pullup is active.
Any hints as to my problem? I've duplicated this on two boards with the same PICKIT3.
Thanks,
Brian
I'm having difficulty debugging with a PICKIT3 on a 12F1571. My circuit is reading three switches and controlling a PWM output. I've attached a schematic. Note, I removed C7 on switch S1 as it was loading the ICSPCLK.
I have RA1, RA2 and RA4 configured as inputs with weak pull-ups. RA0 is configured as a digital output. I used MCC to configure the pins.
One switch is directly connected to RA1/ICSPCLK and the switch is normally open. RA0/ICSPDAT also connects to the gate of a FET (high impedance). Will this work in both programming mode and in debug mode?
My other two switches are on RA2 and RA4.
My code loads and S3 (RA4) detects a switch event. However, switch S2 (RA2) is at 5V and toggles to GND and back to 5V but no switch event is detected.
After programming S1 (RA1) is sitting at 0v, as if no pullup is active.
Any hints as to my problem? I've duplicated this on two boards with the same PICKIT3.
Thanks,
Brian