Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Inchworm and '627 issue

Status
Not open for further replies.

Adam

New Member
Got what seems to be a rather curious issue, using an Inchworm (not the + version... thats another story!) and MPLAB 7.60

I can't seem to program 16F627 chips, they fail with the message
"ICD0161: Verify failed (MemType = Program, Address = 0x0, Expected Val = 0x2861, Val Read = 0x3FFF)
ICD0275: Programming failed."

If I read it back, it does indeed differ from what I imported into mplab, but its not still blank or anything.

I have no problems programming and verifying 16F84A, 16F628A and 16F877 chips, basically anything other than the '627 I've thrown at it has worked fine, which is rather annoying as I tend to use the 627 as a general purpose chip in most things I play with. I've tried a brand new chip fresh out the packageing as well as 2 out the parts box, same result all the time

The other thing is, is MPLAB supposed to redownload the OS to the INCHWORM every time you change device, I thought it was only if you changed it to a different family or something dramtically different? not if you changed from 627 to 628A, etc?

Thanks in advance
 
You don't mention how the chip is connected?, is it in circuit, and if so how is it connected. The error you're getting looks like the chip isn't getting switched to programming mode.
 
Thanks for your response

Its just on a programming adapter I made, piece of strip/vero board, with an 18 pin DIL socket, power LED, matching header to inchworm and some links, this works for the 84A and the 628A, I beleive the pinout is the same on the 627?

Programming the 877 (backup for inchworm) was interesting tho!, had it on a piece of solderless breadboard with wire links to the 18pin DIL socket on the programming adapter

Not played with incircuit programming yet, that would mean breaking the habbits I developed when I used a JDM and icprog :D
 
I thought you could as long as you made sure MCLR was enabled?

And as far as I know I haven't programmed it to use anything but a HS crystal as the osc, but when I read it back, I got some strange config values read back, osc was 'ER clockout' :S

EDIT: Just blanked it and read it back and sure enough, the spurious program data that was in there has gone, I presume this means inchworm is suceeding in putting it in write mode?
 
Last edited:
Hmm, I'll have to get a 16F627 (the A rev is all that's available)
As for OS download that's odd. It should not do it that often.
Cable length can be a problem.
 
Last edited:
Adam said:
I thought you could as long as you made sure MCLR was enabled?

Depends how fast it does it!.

And as far as I know I haven't programmed it to use anything but a HS crystal as the osc, but when I read it back, I got some strange config values read back, osc was 'ER clockout' :S

EDIT: Just blanked it and read it back and sure enough, the spurious program data that was in there has gone, I presume this means inchworm is suceeding in putting it in write mode?

I would have thought so.
 
Just an additional thought, if you have a spare 16F877 or 16F877A reprogram it with the Inchworms firmware and try it. Make sure you program the entire range (FLASH) and use the correct bootloader.
 
been playing some more, and by programming and reading back and looking closly, didn't realise before, but at least some of the time what it looks like is happing is there is something inserted at the beggining of the program space (normally blank) and the whole program is shifted down one (though sometimes, it can be like 6!) It varies a bit

I suppose it could be what bill said due to the cable being too long? but its only the short bit that DIPmicro supply with their kits unless you been the serial cable from the pc?, and why would it only happen with this chip?
 
Tough to say, the programming (ribbon) cable is best under 8"
Is there anything connected to PGC & PGD (aside from the Inchworm?)
Are there any caps on MCLR?
 
blueroomelectronics said:
Just an additional thought, if you have a spare 16F877 or 16F877A reprogram it with the Inchworms firmware and try it. Make sure you program the entire range (FLASH) and use the correct bootloader.

Already using the backup 877 (Not A; nor is the proper one) I made earlier this evening, hasn't changed anything, loaded it with the BL010101.HEX from the directory under MPLAB as per teh inchworm PDF, not sure what you mean by full range? I just inported it into MPLAB and programmed it :s

Could it be a corrupt operating system file MPLAB keeps loading onto it? Have you got a known good one you could send me please?
 
blueroomelectronics said:
Tough to say, the programming (ribbon) cable is best under 8"
Is there anything connected to PGC & PGD (aside from the Inchworm?)
Are there any caps on MCLR?

Ribbon cable is about 6" if not less

PGD and PGC go straight from INCHWORM to the 627 on the programming adapater (so no ICP), nothing else, same for MCLR, no caps, but due to board layout, it reaches the 627 via some wire links, rather then a stripboard track (the PGD and PGC go straight in via tracks)
 
Thanks, and I'll have to get some 627A chips, its no big deal if I cant program 627 devices, as long as I can do 627A, because he 627A are cheaper than the 627 these days (just looked), the 628A is a tad more expensive, but not as much as I remember it being.

All less then 2 quid though , remember paying almost 5 for my first F84 5 years ago :p
 
The full range is a option to override the smart MPLAB settings. It will force programming the entire chip (it's a programmer status setting)
 
Adam said:
Its just on a programming adapter I made, piece of strip/vero board, with an 18 pin DIL socket, power LED, matching header to inchworm and some links, this works for the 84A and the 628A, I beleive the pinout is the same on the 627?
Yes, the pinout is the same. You might try pulling PGM to ground. Connect a 10 kΩ (approx.) resistor between RB4 (pin 10) and ground (pin 5) on your adapter.
 
eng1 said:
Yes, the pinout is the same. You might try pulling PGM to ground. Connect a 10 kΩ (approx.) resistor between RB4 (pin 10) and ground (pin 5) on your adapter.

Cheers for that, bud, seems to have sorted it :D
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top