eblc1388
Active Member
Hi everybody.
The recent activities in this forum about PIC programmer has caused a lot of interest on the hardware issues surrounding the construction of a PIC programmer.
So I have decided to "take the matter" into my own hand and do some experiments. There are several issues at hand which I'm going to prove or disprove one way or the other.
1. Programming voltage. Some say it should be a lot higher than +12V but I maintained that +12V would work, at least on 16F628A. So I'm going to use +12V.
2. Cable from computer to programmer. Some insist that short shielded cable be used. I'm of opinion that if a printer can work properly, the programmer should work too. The cables I'm using are two cheap ones, each 1.5M in length, with a switchbox in between as I always use the parallel port for both printer and hardware programming.
3. Length of wire from programmer to PIC. It was mentioned that 15cm of unshielded wire would cause error. I decided to try 100cm, with the thought of cutting it back until there is no more verify errors.
4. The software WinPicProg, reported by an user which failed to program/verify a 16F628 when the HEX file does not have "fill up" bytes for empty locations between memory address 0002 and 0007.
So the above was my quest and I set to work this morning.
The programmer was built around a 7407 TTL and two PNP transistors. The +12V is switch via one PNP transistor to acts as the Vpp for the PIC. It is just a typical parallel port programmer. It took arounds 30 minutes to build including soldering the wires on the 25-pin socket for the parallel cable.
I have no non-A version of 16F628 so I used a 16F628A and downloaded the beta version of WinPicProg from Nigel's site to program it.
The next step was setting up the WinPicProg software so that the correct port signal controls the correct programmer function. With that done, the software found my programmer and all the features on the main menu are enabled.
The first file I tried is the same HEX file that user gregmcc have had troubles with. I was expecting WinPicProg giving me a verfiy error but there isn't any.
The HEX file loads fine, the data displays correctly and programmed/verified correctly. This was shown in the image "winpicprog.jpg". So Nigel's software is definitely working fine without any question or doubt. Any previous allegation that it chocks on HEX file with "gaps" is now proven wrong. It works perfectly in two more erase/program trials.
OK that's the software issues sorted out. It also proved that +12V has no problem programming the PIC 16F628A.
Next on the list is length of connecting wires. I replace the short connecting wires with five 100cm ones as shown as bottom part of the image "wiring_.jpg". Frankly I was expecting verify error to come up. As the previous content of the HEX file is still inside WinPicProg, I did a Verify operation. NO error, verify sucessful. I even proofread each word using cut and paste on two data section to compare them side by side. I then did a erase and programming sequence and the result was also perfect.
There you go. I'm only saying long wires work in my case as many other people would swear on their XXXXX that it wasn't in their real life experience. Don't flame me. This is just what I found out by experiment.
I must stress that in real life situation anyone would be better off with as short the length of wire as possible but a few centimeters is definitely not going to cause a lot of troubles. Don't blame the wires until you have exhausted all other possibilities.
The recent activities in this forum about PIC programmer has caused a lot of interest on the hardware issues surrounding the construction of a PIC programmer.
So I have decided to "take the matter" into my own hand and do some experiments. There are several issues at hand which I'm going to prove or disprove one way or the other.
1. Programming voltage. Some say it should be a lot higher than +12V but I maintained that +12V would work, at least on 16F628A. So I'm going to use +12V.
2. Cable from computer to programmer. Some insist that short shielded cable be used. I'm of opinion that if a printer can work properly, the programmer should work too. The cables I'm using are two cheap ones, each 1.5M in length, with a switchbox in between as I always use the parallel port for both printer and hardware programming.
3. Length of wire from programmer to PIC. It was mentioned that 15cm of unshielded wire would cause error. I decided to try 100cm, with the thought of cutting it back until there is no more verify errors.
4. The software WinPicProg, reported by an user which failed to program/verify a 16F628 when the HEX file does not have "fill up" bytes for empty locations between memory address 0002 and 0007.
So the above was my quest and I set to work this morning.
The programmer was built around a 7407 TTL and two PNP transistors. The +12V is switch via one PNP transistor to acts as the Vpp for the PIC. It is just a typical parallel port programmer. It took arounds 30 minutes to build including soldering the wires on the 25-pin socket for the parallel cable.
I have no non-A version of 16F628 so I used a 16F628A and downloaded the beta version of WinPicProg from Nigel's site to program it.
The next step was setting up the WinPicProg software so that the correct port signal controls the correct programmer function. With that done, the software found my programmer and all the features on the main menu are enabled.
The first file I tried is the same HEX file that user gregmcc have had troubles with. I was expecting WinPicProg giving me a verfiy error but there isn't any.
The HEX file loads fine, the data displays correctly and programmed/verified correctly. This was shown in the image "winpicprog.jpg". So Nigel's software is definitely working fine without any question or doubt. Any previous allegation that it chocks on HEX file with "gaps" is now proven wrong. It works perfectly in two more erase/program trials.
OK that's the software issues sorted out. It also proved that +12V has no problem programming the PIC 16F628A.
Next on the list is length of connecting wires. I replace the short connecting wires with five 100cm ones as shown as bottom part of the image "wiring_.jpg". Frankly I was expecting verify error to come up. As the previous content of the HEX file is still inside WinPicProg, I did a Verify operation. NO error, verify sucessful. I even proofread each word using cut and paste on two data section to compare them side by side. I then did a erase and programming sequence and the result was also perfect.
There you go. I'm only saying long wires work in my case as many other people would swear on their XXXXX that it wasn't in their real life experience. Don't flame me. This is just what I found out by experiment.
I must stress that in real life situation anyone would be better off with as short the length of wire as possible but a few centimeters is definitely not going to cause a lot of troubles. Don't blame the wires until you have exhausted all other possibilities.