Try _LVP_OFF_4L
Thank you Bruce, tried it, and another chip locked up, good hint though.
Any other ideas?
Thanks
More information would really help. You have _RC_OSC_1H, which configures the PIC for an external RC oscillator, and you have DEFINE OSC 4.
Are you using an external RC oscillator, crystal, resonator, or what?
Does it work as expected when you do NOT include config settings in your code?
Pickit2 may just be complaining that you don't have all config settings in your code, but if it actually works, when you don't, then it's pretty obvious what's causing the problem.
Just compare your config settings to the default settings in the PBP .INC file.
Okay, I compared all the fuses and found out this one locks it up:
@ __CONFIG _CONFIG2L, _PWRT_ON_2L & _BOR_OFF_2L & _BORV_27_2L
It is hex 08, if I change it to hex 0F all is fine. Has to do with the brown-out settings. Could be the brown out voltage or the brown-out ON/OFF bit. Don't want to destroy another chip (my last one) so will leave it for now. But weird it is, is there any way to unlock these chips?
Thank you,
Kees
eggman , All configuration bits are re-programmable. I don't see why you call the chip destroyed? Just reconfigure it using MPLAB and the PIckit2...
Dave Purola,
N8NTA
See #4 on this page: http://melabs.com/support/icsp.htm
If you previously programmed a few with LVP enabled, you may need to ground the LVP pin to reprogram them.
Well, I tried to program with RB5 (PGM) pulled low, still no luck. As soon as I try to start my Pickit2 with the PIC connected it reports: Device Error - hex file not loaded. So it will no longer recognize the wrongly programmed PICs, maybe I should try another programmer.
best,
Kees
Bookmarks