View Full Version : Help! Need to program a PIC 18F8722 through ICSP
village_idiot
Dec 17, 2007, 09:25 PM
Before I waste a bunch of money, time, and effort I thought I better ask here.
I somehow wiped out the programming on my Microstar2000 and I need to put the boot loader back on through the provided ICSP port. I don't have any tools to program the PIC chips so I need to buy or build something. I'm pretty well stocked on AVR tools, so I don't really want to spend much money for a one or two time need. So here is the question:
Can I program the PIC 18F8722 through the ICSP port with something like the Ponyprog/SIprog software/hardware? Or do I need to buy something like the PICstart2 device to get this done?
I tried asking this on the MP8K Yahoo group, but the only definitive answer was to get a PICstart2 or ICD2.
Thanks for the help.
JimDrew
Dec 17, 2007, 09:44 PM
Anything that supports PRG/DAT/MCLR and provides +5 and ground should work. I don't know if the 18F8722 is a LVP part. If it is, you do not need anthing else. If it's not, then you are going to need a dedicated programmer with +13v or so on the MCLR pin during the programming phase. You could use the MeLabs serial or USB programmers. We use the USB programmers in house for programming all of our parts. We have programmed tens of thousands of PICs this year with these programmers. The only thing we did is add a large cap across power and ground due to flakey USB ports.
village_idiot
Dec 17, 2007, 10:08 PM
Thanks, I'll have to check the data sheet and see.
village_idiot
Dec 17, 2007, 11:34 PM
Like so many other things it turns out that the programming voltage depends on what the chip is programmed to do. If a certain configuration bit is set it can be low voltage (VCC level) programmed, if it is set the other way it needs to be high voltage programmed(12+ volts). So it looks like I need to get something that will do both modes to be safe, and also something that will allow setting the configuration bits. Looks like I need to buy a real programmer or one of the clones :(
rmteo
Dec 17, 2007, 11:38 PM
A $35 Pickit 2 will program any PIC from a PIC10 to dsPIC33.
http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1406&dDocName=en023805&redirects=pickit2
http://search.digikey.com/scripts/DkSearch/dksus.dll?Detail?name=PG164120-ND
village_idiot
Dec 18, 2007, 12:04 AM
Yeah, that's what I think I'm going to buy, and even the good clones are nearly that much money.
paulg
Dec 18, 2007, 04:14 AM
I would buy an ICD2 clone of ebay. Then you can do in circuit debugging as well. About the same price too.
AndyKunz
Dec 18, 2007, 11:29 AM
We have programmed tens of thousands of PICs this year with these programmers.
Jim, You should look into Microchip's programming service - it would save you money. https://www.microchipdirect.com/Programming/Default.aspx
I use it for some of my customers. It's even more valuable when outsourcing because it gives so much more control. They'll even serialize for you.
It's cheaper than somebody operating a bank of PC's doing one-at-a-time burning, especially if you're an Authorized Design Partner.
Andy
village_idiot
Dec 18, 2007, 01:37 PM
Jim, You should look into Microchip's programming service - it would save you money. https://www.microchipdirect.com/Programming/Default.aspx
I use it for some of my customers. It's even more valuable when outsourcing because it gives so much more control. They'll even serialize for you.
It's cheaper than somebody operating a bank of PC's doing one-at-a-time burning, especially if you're an Authorized Design Partner.
Andy
I asked him about that in one of the threads in the XPS vedor forum. Jim said it would be something like 20 cents per chip additional, which in his volumes he said it would be a huge amount of money.
JimDrew
Dec 18, 2007, 05:02 PM
Jim, You should look into Microchip's programming service - it would save you money. https://www.microchipdirect.com/Programming/Default.aspx
I use it for some of my customers. It's even more valuable when outsourcing because it gives so much more control. They'll even serialize for you.
It's cheaper than somebody operating a bank of PC's doing one-at-a-time burning, especially if you're an Authorized Design Partner.
Andy
It's actually WAY cheaper to do it in-house than pay Microchip's pricing. As a Microchip developer, I get an even better break than most, and it is still cheaper to have an employee do it here. We also don't have to worry about firmware versions for each different product, etc.
AndyKunz
Dec 18, 2007, 08:02 PM
It's actually WAY cheaper to do it in-house than pay Microchip's pricing. As a Microchip developer, I get an even better break than most, and it is still cheaper to have an employee do it here. We also don't have to worry about firmware versions for each different product, etc.
We must be doing something wrong. If you are doing "tens of thousands" of parts as you say, it pays very quickly in reduced fixturing (programmers, PCs, labor) not to mention the 30-ish seconds per board it takes to burn and the effects of multiple handlings and the loaded employee costs. If you're a garage operation, then yes, you can save money (not time) by doing it yourself - but you aren't going to be doing "tens of thousands" without screwing up somewhere, or being so behind on shipments that your products are on perpetual backorder.
Getting parts programmed, labeled/dotted, and tape or tube is less than 20 cents, and with the commission you get back by doing your project as an ADP using Azerity, it makes one of the services essentially free - and remember, you don't HAVE to do anything besides programming (although tape/tube certainly makes a lot of sense if you are handling "tens of thousands" of parts). With "tens of thousands" of parts the commission is pretty hefty, too!
I'm even considering doing it for one of my own short-run (2000 piece) products next run. I'm not in business to throw money away - this service might SOUND expensive but in the long run makes a lot more sense. Unless, of course, you are a garage operator.
Andy
JimDrew
Dec 19, 2007, 01:22 AM
I can assure you that even at the 16 cent per part programming charge I can get, it is much cheaper for one of our employees to burn parts. Programming time is typically 11 seconds per part. We can program about 4 boards per minute with insert/removal time. The PICs are programmed in the board. That works out to more than $38 per hour at Microchip pricing. That work costs us $7.00 per hour. We have better control, and we can change firmware on the fly for each individual product. My paintball company has programmed more than 100,000 PIC chips in house for our products. I can't see any good reason to have Microchip do this work when you have the facility already setup in house to do it.
AndyKunz
Dec 19, 2007, 01:20 PM
Only 7 bucks an hour? The illegals have really depressed wages down there I guess.
Andy
rmteo
Dec 19, 2007, 02:50 PM
Only 7 bucks an hour? The illegals have really depressed wages down there I guess.
Andy
LOL!!! :D
JimDrew
Dec 20, 2007, 11:10 AM
$7.00 is higher than the federal minimum wage. We don't have too much of a problem with illegals here, and when Jan. 1st comes, there will be zero problems with Arizona's new laws.
AndyKunz
Dec 20, 2007, 01:19 PM
Ah, so $7.00 is the person's hourly salary, not his actual cost to you. That makes a whole lot more sense. The actual cost includes vacation time (add 4% for two weeks), sick time (add 2% for 5 days), holidays (add 3% for 8 days), Social Security (15%), FICA, health insurance (way more!), manager to oversee their work, etc.
Tack on the equipment (capital expenditure, fortunately), repairs, etc. that are necessary to keep that person working. Oh, and don't forget floor space to put that equipment, and heat/cooling to keep their portion of the work environment acceptable, and the electricity to keep it all operating.
Then add to that their break times, training, etc. and you'll find your cost is actually significantly higher than the $7 you thought a few minutes ago.
This is why so many small businesses fail. They forget that the "cost of goods" includes more than the hourly salary of employees and the cost of the raw materials.
Andy
JimDrew
Dec 20, 2007, 05:09 PM
Arizona is a right to work state, so the rules are quite different regarding vacation time, sick time, etc. These do not exist in most companies. Even if our cost was double the $7.00 rate, the $14 vs. $38 per hour savings is huge. Even if the cost was the same, it makes more sense to me to have complete control of your programming ratios. Every one of our products uses different programming, and monthly usage changes dramatically from month to month. It's just not practical in our situation to have someone else program our chips.
CrashingDutchman
Dec 21, 2007, 09:58 AM
deleted... too much off topic...
village_idiot
Dec 21, 2007, 01:09 PM
And on that note....
I bought a PICkit2 for $35 from digikey so that I could be certain that it would work.
And I think it is time to close this thread.
vBulletin® Copyright ©2000-2009, Jelsoft Enterprises Ltd.