3
\$\begingroup\$

I am using the PICKIT 3 with MPLAB X with the default setings. When I press F6 to build and run my code, I notice that the PIC16 resets three times:

  • twice with the previous code (not expected)
  • once with the recently built code (as expected)

How can I avoid having the two spurious resets with the previous code?

\$\endgroup\$

1 Answer 1

5
\$\begingroup\$

You can't. The programmer is probably resetting the PIC as part of the programming process. For some PIC 16 MCLR must be held low and then raised to Vpp to enter programming mode. On some newer ones the MCLR voltage can stay within the Vss to Vdd range, but the chip must still be reset by driving MCLR low.

What's the problem anyway? You can't be expecting normal operation during programming, so what does it matter if MCLR is asserted?

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.