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.

Error programming 16F628

Status
Not open for further replies.

eblc1388

Active Member
This may not help.

You do know that there is a big difference between programming 16F628 and the 16F628A, do you? Just checking to make sure you are using the non-A PIC.

If all else failed, try using a legacy PC running Win98.
 

Joel Rainville

New Member
eblc1388 said:
You do know that there is a big difference between programming 16F628 and the 16F628A, do you? Just checking to make sure you are using the non-A PIC.

Why would his programmer be able to program the non-A and not the A version? Isn't that dependant on the programming software used?

Greg, try removing all installed printer drivers, or any driver bound to the LPT port used for the programmer on your PC.
 

Joel Rainville

New Member
eblc1388 said:
You do know that there is a big difference between programming 16F628 and the 16F628A, do you? Just checking to make sure you are using the non-A PIC.

BTW, the non-A version hasn't been available from Microchip for a while now.
Of course, some suppliers still offer it, but the A version is generally cheaper. At least that's the case at Digikey.

So you should not assume anyone's using the obsolete part. It makes no sense to get the non-A version nowadays.
 

gregmcc

Member
ok - tried the led program. nothing happens! so i presume its not being programmed properly.

I'll uninstall my printer drivers and let you know what happens.

also checked - its def the non-a version I'm using. its a pic16f628-04/p
 

gregmcc

Member
i've deleted all my printer drivers and tried setting my parallel port to normal, it was set to epp - no difference. I've attached a pic of my board. The wires are connected to a ic socket.

if it helps any - this is the hex of the blinking leds program:
:020000040000FA
:020000000428D2
:08000800FF30A100FF30A2004F
:1000100007309F00211033200530162023142F2095
:100020000530162023102F200C281528A4002408A2
:10003000A5006430A6000A301D28A700FF30A800E4
:100040002608AA002508A9007730280703182528C4
:10005000A90B2428AA0B2228A70B20280800302847
:0E0060002308850008003428210865000800E8
:02400E00623F0F
:00000001FF

below is the hex after I program the pic and read it back - shouldn't it be the same :x

:020000000428D2
:10000400A100FF30A20007309F00211033200530EB
:10001400162023142F200530162023102F200C28FF
:100024001528A4002408A5006430A6000A301D2861
:10003400A700FF30A8002608AA002508A9007730E9
:10004400280703182528A90B2428AA0B2228A70B64
:1000540020280800302823088500080034282108B7
:04006400650008002B
:02400E00623D11
:00000001FF
 

Attachments

  • programmer_156.jpg
    programmer_156.jpg
    323.2 KB · Views: 526

Exo

Active Member
You said you were using a shielded printer cable, yet all i see is a bunch of unshielded wires wich are curled together. It won't work like that...

how long are these wires ? i've had p16pro40's fail because of 15cm unshielded wires between progger and pic...
 

gregmcc

Member
yip - its grounded to the dc in. and powered by the circuit.

picture attached.
 

Attachments

  • programmer1.jpg
    programmer1.jpg
    199 KB · Views: 893

Joel Rainville

New Member
Hmmm, I think you got it Exo! That would explain the weird behaviour.

Those wires connecting the socket to the circuit look a bit long... They might pickup radio stations and write a mix of object code and "Stairway to heaven". I think I recognize a guitar riff encoded in that second hex file :p:lol::p
 

gregmcc

Member
the shielded cable is between the computer and the programmer.

between the programmer and the pic I have the single cables. no longer than 10cm
 

Exo

Active Member
Yes, try replacing them with shielded cables and untangle them, curling them up increases wire capacitance greatly...
 

eblc1388

Active Member
Hi gregmcc,

Your programmer is fine. See the comparsion of the two files(I make them into two files from your previous posting) you have posted.

What you have read back from the PIC is actually what you have programmed, except with one error which happened while programming and caused offset in address.

Why the error happened I can't tell. Except that the "FF30" at address 0008 just disappeared into thin air and the rest of the code placed into address starting from 0004.

There appears to be a one-bit error difference in the last word but as it is the config word and that the difference location is bit9 which is not implemented in the config word so it is not an error.
 

Attachments

  • pic_read.gif
    pic_read.gif
    16.3 KB · Views: 699

gregmcc

Member
i've now tried to untwist all the wires - made no difference.

i think the time has come for me to give up on this programmer and try another type. i tried the jdm programmer before this one and that didnt work either :-(
 

eblc1388

Active Member
Your programmer is fine.
Your programmer is OK.
Your programmer is functional.
Your programmer is good.

Just try another programming software. :twisted:
 
Status
Not open for further replies.

Latest threads

Top