Also take a look at...
http://www.picbasic.co.uk/forum/show...=&threadid=171
Post #13 "Conclusion"
Some 'Micropower' PICs when set to INTERNAL OSC and INTERNAL MCLR can start executing their code whilst sitting in your programmers socket... for example, your programmer has just applied power (say for a verify cycle) and the damn thing starts executing it's code whilst sitting in the socket rather than doing what the programmer expects it to do...
Just added that as a reminder of a phenomenom first experienced six years ago... and for folks to be mindful of what could happen...
Thanks, Melanie, I think you have explained my problem. I don't understand why this 12F675 (which still has not been removed from the ZIF socket) now generates this error message: "target device does not match selected device". I only get this error on program and erase; verify, read and blank check do not produce an error.
I looks to me that I need to get a PicKit2 in order to salvage these devices.
Try this... erase the PIC (so it has no code - and if you're able at the same time preset XT OSC and EXTERNAL MCLR). Does it then still give you an error?
From what I remember six years ago, some micropower PICs coupled with some programmers gave problems. I recall I had a problem, but it was fixed when I reported it to the Vendor that supplied the programmer, and they came out with a new version of programming software. Even now, some PICs (even some batches from PICs that hitherto never gave problems) require to be ERASED before programming, so as default I set ERASE BEFORE PROGRAMMING on everything.
When you WRITE to your PIC (eg ERASE and PROGRAM) it is possible the programmer is trying to verify that your PIC is the one you selected, before it starts writing to the PIC (also because different devices also use different programming algorythms). If the PIC is off doing it's own thing (being powered by the programmer and running on INTOSC+INTMCLR) then it may not be giving the expected response to the programmer in the time slot alotted. In my programmer software I have the ability to DISABLE or ENABLE the "DEVICE ID CHECK". If you have that option on yours, DISABLE it. The chances are that READ operations (ie READ or VERIFY) don't check the device ID.
OK!
Here you go Russ.
I remembered there was one of those 12F675's that I couldn't recover, and amazingly I found it again.
It still had the same problem, couldn't program it, couldn't read the configs.
I put it in a breadboard, connected a 7805 to the VPP voltage from the meLabs programmer, with the 5V out going to VDD on the chip, so that the chip gets VPP before VDD. This is the sequence described in the programming spec.
It now programs, erases, reads, does everything perfect.
I've loaded the old program again and saw the same programming problem. Then hooked up the 7805 and wala it works.
Hope this works for you too.
![]()
Last edited by Darrel Taylor; - 19th September 2009 at 15:37. Reason: Added schematic
DT
Thanks for the idea, Darrel. While looking for a breadboard to try it, I found a PC board labeled "PIC12F675 programmer" It had my name on it but I have no memory of designing or building it. I checked the file date: it was March 2006, so I must have had a problem at that time and searched for a solution. This is the schematic:
I tried one of the bad devices and got an error: "device does not match target device", so I tried a brand new PIC12F675 and only tried to erase it. Still got the error, so I think the Melabs USB programmer has bit the dust.
Maybe, but I'm not sure yet.
It may just be something that works out right in the physical wiring,
but the Pins in the schematic don't seem to correspond to the meLabs 10-pin connector.
<img src="http://www.picbasic.co.uk/forum/attachment.php?attachmentid=3652&d=1253393140" />
Worth another look.
<br>
DT
Bookmarks