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.

Problems programming 16F84A-20/P

Status
Not open for further replies.

Daz

New Member
Hi all,

I am new to the world of PICs (love em!). I got my first 16F84 and made a programmer for it last month. Worked great so I ordered 5 more. This time they are the 16F84A-20/P model.

Of the 5, I am only able to program 2 of them. The other 3 are coming up with verify errors. Is it common to receive bad chips (3 out of 5 no less)? Or could there be something I'm doing wrong?

I'm using the Winpic Programmer and a home-built JDM (Serial) type of programmer. As I say, I can succesfully burn 2 of them, so I'm sure there's no problem with the programmer or software.

Thanks for any ideas you may be able to offer.

Daz
 
Daz said:
Hi all,

I am new to the world of PICs (love em!). I got my first 16F84 and made a programmer for it last month. Worked great so I ordered 5 more. This time they are the 16F84A-20/P model.

Of the 5, I am only able to program 2 of them. The other 3 are coming up with verify errors. Is it common to receive bad chips (3 out of 5 no less)? Or could there be something I'm doing wrong?

I'm using the Winpic Programmer and a home-built JDM (Serial) type of programmer. As I say, I can succesfully burn 2 of them, so I'm sure there's no problem with the programmer or software.

Thanks for any ideas you may be able to offer.

Daz

Welcome Daz,

The 16F84A is an old PIC design. Today the 16F628A is cheaper and better, you might want to opt for it in your next order.

The JDM design is known to fail miserably especially on Windows NT/2000/XP or on newer machines on which the serial port might not supply enough current. Just do a search for "JDM" on this forum, you'll see.

Some people who know what they're doing do use the JDM programmers succesfully, but they're a minority... and I am not one of them, although I have tried :lol: The fact that it works on 2 of your PICs might be explained by manufaturing tolerances... I bet the other 3 would program successfully using a nicer well behaved parallel port programmer, or a serial port one with a MAX232 level converter.

That was my 2 cents, others will surely chime in soon ;)
 
It is not common to receive bad chips, actually that should never happen :!:
I am a bright example of a guy who used JDM and it worked wonderfuly for me. JDM design/principle is unrealiable, but if your serial port and programmer are well made, then it will work fine. As Joel said, you might be operating in out-of-specification values, so that manufacturing tolerances play some role here. Try to re-do your programmer or even look for paralel type one.

Next time, prefer to buy 16F628A (or better 16F88), these PICs migh even work with your JDM more relyable.

And for final programmer solution, I recomend you to build yourself an ICD2 clone, which will program all PICs.
 
Great tips guys, thanks so much for the quick response. Sounds like I need to build a new programmer. Shoot, I was really impressed that the JDM worked (first chip) and for so little $$$.

I'll also look into the other PICs that you suggest. I thought the 16F84A seemed like a good entry-level with a lot of community support. But now that my feet are wet I may be ready to try another chip.

Thanks again!
 
Daz said:
The other 3 are coming up with verify errors. Is it common to receive bad chips (3 out of 5 no less)? Or could there be something I'm doing wrong?

Take note of the errors. Do the verify errors all at Address 0000 or they occured in later addresses but in random locations different each time?

Do a manual erase and then program. If you get verify errors then erase and program again. Does the error occurs at the same place?

With NO PIC in the socket, do a program run and measure Vdd voltage(between pin 5 and pin 14). Is it anywhere near 4.8V - 5.2V?

Do another program run and measure MCLR/VPP voltage(pin 4 and pin 5) at the socket. Is it anywhere near 12V-13V?

Now check again with a PIC in the socket, does the above voltages drops lower a lot?
 
eblc1388 said:
Take note of the errors. Do the verify errors all at Address 0000 or they occured in later addresses but in random locations different each time?

Do a manual erase and then program. If you get verify errors then erase and program again. Does the error occurs at the same place?

With NO PIC in the socket, do a program run and measure Vdd voltage(between pin 5 and pin 14). Is it anywhere near 4.8V - 5.2V?

Do another program run and measure MCLR/VPP voltage(pin 4 and pin 5) at the socket. Is it anywhere near 12V-13V?

Now check again with a PIC in the socket, does the above voltages drops lower a lot?


Hi eblc,

Thanks for jumping in to help. I've done as you suggest and here are my results:

1) I'm getting 5.13V at Vdd
2) I'm getting 13.56V at MCLR/VPP

Neither one change with a chip in the socket.

I'm getting verify errors in the same place every time. In fact, when I do an erase, none of the data is changed.

I know this because now 4 of the 5 PICs aren't working. 2 Were working at first, and I loaded a program into one and it stopped working shortly after that. The program is still in the PIC and I can read it through the JDM but when I do a BULK Erase and re-read, the program is still there. So erase and write operations are not getting through to these 4 out of 5 chips. One chip is still working great.

Also my older 16F84 (Non A) chip is still working fine.

A note, these 5 new chips are all 20 Mhz versions, so I wonder if they are more picky than my 4Mhz version.

Any suggestions of a good programmer schematic I might try to replace the JDM? I'd like to keep it RS-232 if I can and also simplicity is my preference. I'm in a bit of a rush to get it working because I need these 5 chips programmed.

Or do you think I'm better off getting in 5 new 16F84 - 4Mhz chips?

Thanks again for all of your help!
 
You beter get an newer chip that that obsolete PIC16F84.

The 4 and 20 Mhz verisons are the exsactly same chips.Its just that the 4 Mhz didnt pass the tests as good as 20 Mhz ones.

I also sugest an parallel port programer.
 
Daz said:
1) I'm getting 5.13V at Vdd
2) I'm getting 13.56V at MCLR/VPP

Neither one change with a chip in the socket.

You must be using a desktop PC then. The voltage levels are very good so there is no problem in the serial port.

Try connects the Pin16 RA7 to Vss(pin5) and see if situation improves. This is the internal RC oscillator input in case you have enabled it.

There is also a buffer(called FIFO) in the serial port of the PC and you must disable it. WindowXP or NT might need extra port driver too.

Post a schematic or link to the JDM programmer circuit that you are using as there are many version of JDM circuits.

Daz said:
I'm getting verify errors in the same place every time. In fact, when I do an erase, none of the data is changed.

I know this because now 4 of the 5 PICs aren't working. 2 Were working at first, and I loaded a program into one and it stopped working shortly after that. The program is still in the PIC and I can read it through the JDM but when I do a BULK Erase and re-read, the program is still there. So erase and write operations are not getting through to these 4 out of 5 chips. One chip is still working great.

Also my older 16F84 (Non A) chip is still working fine.

All I can suggest now is to try another programming software (ICPROG).

IC-Prog Software 1.05D Multi-Lingual

It is free and also has a very helpful hardware setup/check menu.

Select JDM as your programmer on "hardware" pulldown menu. Do not change any invert options yet. Next select "hardware check" on pulldown menu.

No PIC is needed for the check. Put voltmeter on corresponding signal pin of PIC socket and "tick" the left column of boxes one by one. You should be able to toggle the volt output at the socket pin. The aim is to get voltage with a "tick" in the box. Do not "tick" the "data in" box but watch it changes when you enable "data out". Also the logic level of "data out" and "data in" must match and changes together. Remove all "tick" in the four boxes after check. If the actual result is the reverse of what you want(i.e. voltage with no tick but zero volt with a tick), go into "Hardware" of pull down menu and "tick" the invert box on that signal.

Daz said:
A note, these 5 new chips are all 20 Mhz versions, so I wonder if they are more picky than my 4Mhz version.

Most likely Not.

Daz said:
Any suggestions of a good programmer schematic I might try to replace the JDM? I'd like to keep it RS-232 if I can and also simplicity is my preference.

My experience is with parallel programmer and up to now I have build three already and all gives reliable operation. Look at this thread and you will see how easy it is to build a parallel programmer.

https://www.electro-tech-online.com/threads/2n3904-isnt-2n3904.17696/

My first PIC programmer though is a form of JDM design called RCD programmer. It works with no major issues.

Daz said:
Or do you think I'm better off getting in 5 new 16F84 - 4Mhz chips?

Don't buy any more of 16F84 or 16F84A. They are old and expensive. A new PIC 16F628A has twice the program memory and cost much less.

The only reason of people buying 16F84 or 16F84A is the object code requirement. A program assembled for 16F84/A will not work on another PIC unless one has the source code, changes a few memory locations and reassemble.
 
eblc1388 said:
Don't buy any more of 16F84 or 16F84A. They are old and expensive. A new PIC 16F628A has twice the program memory and cost much less.

The only reason of people buying 16F84 or 16F84A is the object code requirement. A program assembled for 16F84/A will not work on another PIC unless one has the source code, changes a few memory locations and reassemble.

I agree fully, you SHOULDN'T be buying 16F84's, they were replaced by the better, cheaper, 16F628 last century!.

Even if you only have a HEX file it's not a problem, load the HEX file into my programmer software WinPicProg and disassemble it, add the two extra lines to disable the comparators (which the 16F84 doesn't have), set the fuses how you want, and reassemble it using MPASM. There's hardly any changes required, and MicroChip have a 'migration document' on their website that explains everything.

Check my tutorials, which mostly use the 16F628.
 
eblc1388 said:
My first PIC programmer though is a form of JDM design called RCD programmer. It works with no major issues.
Hey, mine too :D RCD is an excelent programmer, but it doesn't work correctly in ICSP.
 
eblc1388 said:
Try connects the Pin16 RA7 to Vss(pin5) and see if situation improves. This is the internal RC oscillator input in case you have enabled it.

Hi eblc,

Thanks again for trying to help. I've tried your suggestions and for some reason with ICProg I was able to succesfully erase one of the chips that had worked before but then stopped working. It is now succesfully programmed. However the first 3 chips which have never worked are still not working with either ICProg or WinPic.

Here is a link to the schematic of the circuit I am using for my programmer: **broken link removed**

When measuring voltages as you suggest, I watched RB7 drop from 4.73 to 4.62 as soon as I hit 'Enable Clock' in the Hardware Check window (With 'Enable Data Out' already selected). This dropped significantly further when I then hit 'Enable MCLR'.

Could it be that the serial port just doesn't supply enough current for these chips?

The site where I got the JDM schematic has some troubleshooting ideas on this page: **broken link removed**

I wonder if these apply to my situation. I think I may try a few of these before I go ordering any more parts just yet.

Any other thoughts are always very much appreciated.
 
Glad to hear there is at last some good news.

The voltage drop is normal as you are supposed to test the signal line one by one.

Can you try changing these options to see whether it helps?
 

Attachments

  • daz_test.gif
    daz_test.gif
    5.6 KB · Views: 1,089
eblc1388 said:
Glad to hear there is at last some good news.

The voltage drop is normal as you are supposed to test the signal line one by one.

Can you try changing these options to see whether it helps?

Hi eblc,

Tried those options but no luck there. I guess I just don't understand why it would work for 2 out of 5 chips but not the other 3.

Thanks again for your time.
 
I think the sensible thing to do now is to fill in your physical location in the forum in hope that some people living in your area can offer to test one bad chip for you. All you need to do then is to mail it to him for the cost of local postage.

You can also send the object code so he can help to program it for you should it turn out that the PIC is good afterall.

Does the voltage goes from 4.7V to zero voltage when you "tick" the checkboxes? If so, then it is highly likely that the three chips are bad.

Can you still read them?
 
Nigel Goodwin said:
eblc1388 said:
Don't buy any more of 16F84 or 16F84A. They are old and expensive. A new PIC 16F628A has twice the program memory and cost much less.

The only reason of people buying 16F84 or 16F84A is the object code requirement. A program assembled for 16F84/A will not work on another PIC unless one has the source code, changes a few memory locations and reassemble.

I agree fully, you SHOULDN'T be buying 16F84's, they were replaced by the better, cheaper, 16F628 last century!.

Even if you only have a HEX file it's not a problem, load the HEX file into my programmer software WinPicProg and disassemble it, add the two extra lines to disable the comparators (which the 16F84 doesn't have), set the fuses how you want, and reassemble it using MPASM. There's hardly any changes required, and MicroChip have a 'migration document' on their website that explains everything.

Check my tutorials, which mostly use the 16F628.
Nigel, I don't want this to sound rude, but you are wrong about the 84->628 code transition. Don't forget that 628's SFR and GPR's have different boundaries, and the 84 program wouldn't work correctly on 628 !!! So it is important to move all GPRs 20 memory locations lower (and also turn off Comparators as suggested). Or I am wrong :?:
 
Jay.slovak said:
Nigel Goodwin said:
eblc1388 said:
Don't buy any more of 16F84 or 16F84A. They are old and expensive. A new PIC 16F628A has twice the program memory and cost much less.

The only reason of people buying 16F84 or 16F84A is the object code requirement. A program assembled for 16F84/A will not work on another PIC unless one has the source code, changes a few memory locations and reassemble.

I agree fully, you SHOULDN'T be buying 16F84's, they were replaced by the better, cheaper, 16F628 last century!.

Even if you only have a HEX file it's not a problem, load the HEX file into my programmer software WinPicProg and disassemble it, add the two extra lines to disable the comparators (which the 16F84 doesn't have), set the fuses how you want, and reassemble it using MPASM. There's hardly any changes required, and MicroChip have a 'migration document' on their website that explains everything.

Check my tutorials, which mostly use the 16F628.
Nigel, I don't want this to sound rude, but you are wrong about the 84->628 code transition. Don't forget that 628's SFR and GPR's have different boundaries, and the 84 program wouldn't work correctly on 628 !!! So it is important to move all GPRs 20 memory locations lower (and also turn off Comparators as suggested). Or I am wrong :?:

It's a simple change, do it at the same time as adding the two lines to disable the comparators - sorry about not mentioning it before, but I simply do it without thinking about it!. The migration document I mentioned explains it all.
 
I am ok with that, I just wanted to make sure "Daz" will know what to do when he decides to use "new" 628 instead of 84.

BTW: MPLINKer realy simplifies this, as it offers automatic placement of variables, pretty handy for making programs for different PICs.
 
Follow-up

Hi all,

I just wanted to post a follow up and let you all know how things ended up with this. First off, thanks for all the help that everyone offered.

In the end I went with the advice to build a new programmer. I chose the NOPPP Programmer (http://www.covingtoninnovations.com/noppp/) because it supplies it's own VPP, and also because it was a Parallel interface instead of serial (based on all the feedback I got on that).

I also replaced my 16F84's with 16F628's and I love them. I've built my new programmer and it works on all the chips that weren't programming with the JDM. I'm back in business (I'm designing and building a CNC Machine)!

So in summary, I highly recommend this particular programmer to anyone looking for a reasonable DIY programmer to build. Has anyone else had any experience with the NOPPP, either good or bad that they'd like to share?

I'm also attaching a photo of my completed and WORKING programmer!

Once again, thanks to everyone.

Daz
 

Attachments

  • noppp.jpg
    noppp.jpg
    102.5 KB · Views: 536
It sounds like you were getting the same problem as I was. Looks like you have now fixed it. If you still have your JDM type programmer, could you download the software from Here and try it to see if it fixes your serial problems. You may also find it works well with your new circuit as well.

Mike.
 
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top