Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Categories > Micro Controllers


Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc.

Reply
 
LinkBack Thread Tools Display Modes
Old 27th September 2007, 10:15 PM   (permalink)
Default Inchworm and '627 issue

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
Adam is offline  
Old 27th September 2007, 10:25 PM   (permalink)
Default

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.
__________________
PIC programmer software, and PIC Tutorials at:
http://www.winpicprog.co.uk
Nigel Goodwin is offline  
Old 27th September 2007, 10:31 PM   (permalink)
Default

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
Adam is offline  
Old 27th September 2007, 10:33 PM   (permalink)
Default

If the 627/628 has been programmed to use the internal oscillator you can't reprogram it with the standard Inchworm, because it doesn't switch Vdd.
__________________
PIC programmer software, and PIC Tutorials at:
http://www.winpicprog.co.uk
Nigel Goodwin is offline  
Old 27th September 2007, 10:38 PM   (permalink)
Default

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 by Adam; 27th September 2007 at 10:43 PM.
Adam is offline  
Old 27th September 2007, 10:45 PM   (permalink)
Default

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.
__________________
Bill
Smart Kits build Smart People

http://www.blueroomelectronics.com

Last edited by blueroomelectronics; 27th September 2007 at 10:49 PM.
blueroomelectronics is online now  
Old 27th September 2007, 10:46 PM   (permalink)
Default

Quote:
Originally Posted by Adam
I thought you could as long as you made sure MCLR was enabled?
Depends how fast it does it!.

Quote:

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.
__________________
PIC programmer software, and PIC Tutorials at:
http://www.winpicprog.co.uk
Nigel Goodwin is offline  
Old 27th September 2007, 11:00 PM   (permalink)
Default

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.
__________________
Bill
Smart Kits build Smart People

http://www.blueroomelectronics.com
blueroomelectronics is online now  
Old 27th September 2007, 11:04 PM   (permalink)
Default

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?
Adam is offline  
Old 27th September 2007, 11:07 PM   (permalink)
Default

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?
__________________
Bill
Smart Kits build Smart People

http://www.blueroomelectronics.com
blueroomelectronics is online now  
Old 27th September 2007, 11:08 PM   (permalink)
Default

Quote:
Originally Posted by blueroomelectronics
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?
Adam is offline  
Old 27th September 2007, 11:12 PM   (permalink)
Default

Quote:
Originally Posted by blueroomelectronics
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)
Adam is offline  
Old 27th September 2007, 11:23 PM   (permalink)
Default

Hmm I'll try to get a 16F627 and try it. I've got lots of 628A and 88 PICs
__________________
Bill
Smart Kits build Smart People

http://www.blueroomelectronics.com
blueroomelectronics is online now  
Old 27th September 2007, 11:41 PM   (permalink)
Default

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
Adam is offline  
Old 28th September 2007, 12:25 AM   (permalink)
Default

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)
__________________
Bill
Smart Kits build Smart People

http://www.blueroomelectronics.com
blueroomelectronics is online now  
Reply

Bookmarks

Thread Tools
Display Modes





All times are GMT. The time now is 06:45 PM.


Electronic Circuits  |  Learning Electronics
Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.

eXTReMe Tracker