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.

PGM pin of PIC

Status
Not open for further replies.

bananasiong

New Member
Hi,
During the programming mode, usually PGM pin is tight to ground via a resistor on the programmer board. But I've notice that PGM pin is not on the same pin for different PIC. For 18 pins PIC, some is at RB3 and some RB4; for 40 pins PID, some is at RB3 and some RB5.
I know that I can program without doing anything with this pin, but I've read somewhere that someone is not able to program the PIC because of this pin, and so for 18F PICs.
On my programmer, for 18 pins device, can I short RB3 and RB4 together and pull down via only a resistor? Or they have to have a resistor for each pin seperately?
 
bananasiong said:
But I've notice that PGM pin is not on the same pin for different PIC. For 18 pins PIC, some is at RB3 and some RB4; for 40 pins PID, some is at RB3 and some RB5.
Correct.

For 18 pin devices I use two resistors: one at RB4 for compatibility with the PIC16F628A; the other at RB3 for compatibility with the PIC16F88.
A friend of mine and I drew a schematic of a parallel port (Tait) **broken link removed** including those resitors, since they were not required for the PIC16F84 and were not included in old schematics.

For 40 pin devices I usually use ICSP and the resistor can be mounted on the target board.
 
Last edited:
There is no need to do anything with the PGM pin if you are using high voltage programming. When Vpp is applied the pic goes into programming mode irrespective of the state of PGM.

Mike.
 
LVP is enabled by default for brand new PIC16F628As, PIC16F88s and other PICs and it can affect HVP (the "programming error at addres XXXX" might show up). Also, the PGM pin is tris-stated during programming and it's susceptible to noise. A cheap resistor is recommended to avoid any problems with LVP.
 
Last edited:
eng1 said:
LVP is enabled by default for brand new PIC16F628As, PIC16F88s and other PICs and it can affect HVP (the "programming error at addres XXXX" might show up). Also, the PGM pin is tris-stated during programming and it's susceptible to noise. A cheap resistor is recommended to avoid any problems with LVP.

Not according to microchips flowchart or my personal experience. It would also make ICSP extremely difficult!! In fact, the ICD2 wouldn't work at all.

Mike.
 
The issue has been reported by several users.

On the PIC-List:

Also Microchip mentioned the problem in some errata: "If LVP is not being used for programming, but the LVP Configuration bit is set (or LVP feature is enabled), the PGM pin must not be allowed to toggle while programming. The PGM pin is edge sensitive and if an edge is detected during programming, it may cause the PC to reset".

From my experience, it's just safe to use a pull down resistor at the PGM pin.
 
Last edited:
There is no pull down resistor at PGM for the 18 pins socket in my exisiting programmer, I don't have any problem in programming them. Since I'm going to build another programmer, I will just add a few resistors to avoid it to be happening.
Thanks for the comments.
 
This was a problem that affected one revision of one (maybe 2) pic chips produced last century. The problem was fixed and microchip don't even mention it anymore. This will not be a problem with any chip you buy now.

If it was still a problem then all the thousands of people that use ICD2 or ICSP would be reporting it.

Mike.
 
Pommie said:
This was a problem that affected one revision of one (maybe 2) pic chips produced last century. The problem was fixed and microchip don't even mention it anymore. This will not be a problem with any chip you buy now.

If it was still a problem then all the thousands of people that use ICD2 or ICSP would be reporting it.

Mike.
Even with self built programmer? Such as Tait programmer.
Honestly I've never got this problem before.
How about PGD and PGC filtering? Are they still needed? Some said that they are able to program the 18F series after adding the filters.
 
Gayan Soyza said:
What PIC you are going to program is it 16F88?
Then No need LOW pass filters. It’s an easy chip to program.
Yea, I can program my 16F88 and many PICs without any problems. Just read some articles saying that someone is not able to program into 18F series without filtering at PGC and PGD.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top