If you work
with PIC microcontrollers, you almost certainly encounter this problem.
A seemingly innocent setup that worked fine yesterday suddenly refuses
to program your PIC.
The
cause of this issue varies a lot, but personally I blame the drivers
controlling the hardware programmer. Some of these “fixes” really
shouldn’t be necessary.
For reference, I am using a REAL-ICE programmer targeting a PIC18F, but I don’t think it matters much.
Here are 10 things to try which have worked for me:
- “Reset” the hardware programmer in your project properties - seems to work a lot!
- Unplug/replug hardware programmer/try again (lots of times, don’t be shy!)
- Check programming cable for flaws (mine is hand made and has failed before)
- Check DC supply power with a multimeter (is your power supply working right?)
- Check voltage to the microcontroller - is your circuit loaded any differently? Are you powering that off anything that’s busier today?
- Use mplab-ipe to perform a full erase, blank check… Repeat step 2 if blank check fails until it doesn’t
- Use dedicated port / powered USB (could be 500mA port current limit)
- Try changing all your other leads too, just in case
- Look for flaws around the programming lines leading to the micro (beep test using multimeter is very useful)
- Restart your computer (unlikely to help but worth a try… Sometimes an errant process holds on to the driver)
Finally, stay cool headed and remember it probably will work soon. Well, eventually. Maybe. For a little while.
No comments:
Post a Comment