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.

ICD2 Programming board

Status
Not open for further replies.

bryan1

Well-Known Member
Hiya Guy's,
Below is a layout of a programming board designed to be used with the ICD2 programmer/debugger. Basically it's only for programming 8,18,28 and 40 pin pics. Although I've been thru checking it a few times I reckon it pays to get a second opnion just to make sure I got it right. I'll be using a 40 pin zif socket and the spaces between the unsed pins I'll cut off to give plenty of clearance for the tracks.

Cheers Bryan :D
 

Attachments

  • icd2_programming_board.gif
    icd2_programming_board.gif
    13.1 KB · Views: 1,767
As usual the PGM pin gives a lot of troubles as Microchip moves its position around. You need to ground this pin during programming.

On 18F4455 and many 18FXXXX 40-pin PICs, this is on pin38. On 16F877 this is on pin36. On 16F876, this is on Pin 24. On 16F628A, this is on pin 10. On 16F88, this is on pin9. I'll let you work out their relative positions on a 40 ZIP socket.
 
eblc1388 said:
As usual the PGM pin gives a lot of troubles as Microchip moves its position around. You need to ground this pin during programming.

Hiya L.Chung,
Eh mate I'm not doubting your quote above but a question came up on the sparkfun forum about the ICD cable and the pgm pin, so I asked the question on the use of the pgm and the following is the answer I recieved
The PGM pin does not need to be connected when using high voltage programming. It is only used when you enable low voltage programming (LVP) in the PICs configuration bits. The ICD2 and just about every other programmer out there is a high voltage programmer so you can ignore the PGM pin unless you intend to use the LVP feature of the PIC.
So now I'm abit confused :shock: . On reading up on the ICD2 users guide in which I refered to when I made the circuit design I didn't see any reference to PGM so that's why I didn't include it on the board. So I'll go right thru the guide again to double check but do you think that quote is correct?

Cheers Bryan :D
 
The requirement of grounding the PGM pin is generally what I have read as the solutions/suggestions where people are running into difficulties in programming a PIC using HV mode. A floating PGM pin would easily put the PIC into LV programming mode(if the PIC's LV mode has been enabled in the config) and then one might not be able to place it in HV programming mode.

How true is that I really don't know because I always ground the PGM pin during programming. Perhaps others can put in their comments here.

bryan1 said:
So now I'm abit confused :shock:

Don't be. What if I tell you that some new PIC comes with LV programming mode enabled by default?
 
eblc1388 said:
Don't be. What if I tell you that some new PIC comes with LV programming mode enabled by default?

I think ALL LV programmable PIC's come with it enabled (or at least did at one time!), otherwise you can't program them with a LV programmer.
 
eblc1388 said:
The requirement of grounding the PGM pin is generally what I have read as the solutions/suggestions where people are running into difficulties in programming a PIC using HV mode. A floating PGM pin would easily put the PIC into LV programming mode(if the PIC's LV mode has been enabled in the config) and then one might not be able to place it in HV programming mode.

How true is that I really don't know because I always ground the PGM pin during programming. Perhaps others can put in their comments here.

bryan1 said:
So now I'm abit confused :shock:

Don't be. What if I tell you that some new PIC comes with LV programming mode enabled by default?
I ran into some problems with PGM with 18F2620 just recently, if the pin wasn't grounded, the PIC failed verify (and I made sure LVP bit was disabled). I think it's because the PIC is erased first (including config), programmed verified and the config bits are programmed last. Therefore there is a window during programming when the LVP is enabled and is causing problems. (I was doing ICSP).
 
Nigel Goodwin said:
eblc1388 said:
Don't be. What if I tell you that some new PIC comes with LV programming mode enabled by default?

I think ALL LV programmable PIC's come with it enabled (or at least did at one time!), otherwise you can't program them with a LV programmer.
Yes, all LVP capable PICs have LVP enabled as a default value.
 
Hiya Guy's,
On reading the ICSP users guide I found this section on the PGM.
2.4.1 LOW VOLTAGE ICSP
PROGRAMMING MODE
Low voltage ICSP Programming mode allows a
PIC16F87X device to be programmed using VDD only.
However, when this mode is enabled by a configuration
bit (LVP), the PIC16F87X device dedicates RB3 to
control entry/exit into Programming mode.
When LVP bit is set to ‘1’, the low voltage ICSP programming
entry is enabled. Since the LVP configuration
bit allows low voltage ICSP programming entry in
its erased state, an erased device will have the LVP bit
enabled at the factory. While LVP is ‘1’, RB3 is dedicated
to low voltage ICSP programming. Bring RB3 to
VDD and then MCLR to VDD to enter programming
mode. All other specifications for high voltage ICSP™
apply.
To disable low voltage ICSP mode, the LVP bit must be
programmed to ‘0’. This must be done while entered
with High Voltage Entry mode (LVP bit = 1). RB3 is now
a general purpose I/O pin.

So I guess this means if I clear the LVP bit in the config word and use the ICD2 in programming mode which is HV mode it should program. Well I might have to set up a zif in a breadboard and try it as I don't want to etch up a board and find I've got to change it.
As this is a big learning experience for me if I end up needing to include the PGM pin please don't say I told you so :oops:

Cheers Bryan :D
 
I'll try to repeat the main points again, as confirmed also by what you've just quoted.

1. When you want to program any PIC, you need to erase it first. But erasing the PIC include erasing the config memory too.

2. The content of the whole PIC memory, including Config memory 'bit' which determine the programming mode become all "1"s. The result of this action is to enable LVP mode on those PICs that have LVP available.

3. As soon as this happens, if the PGM pin is floating, there is a good chance that the PIC enters LVP and causes error in subsequent programming results.
 
eblc1388 said:
I'll try to repeat the main points again, as confirmed also by what you've just quoted.

1. When you want to program any PIC, you need to erase it first. But erasing the PIC include erasing the config memory too.

2. The content of the whole PIC memory, including Config memory 'bit' which determine the programming mode become all "1"s. The result of this action is to enable LVP mode on those PICs that have LVP available.

3. As soon as this happens, if the PGM pin is floating, there is a good chance that the PIC enters LVP and causes error in subsequent programming results.
Yep, confirmed
 
Hiya Guy's,
Well I finally got around to hooking up the ICD2 to my laptop and after re-configuring the usb drivers it works like a charm. Rather than make up a programmer board I'm just going to use a breadboard for now and the first test a simple led flasher program worked first time :D :D :D . So now I can finally get some serious pic work done and be able to debug it thru mplab too. Well the programmer board can wait awhile and I might farm out the etching as a double sided board would be the go and I'm not even going to try and attempt a double sided board with press'n'peel, anyway thanks for the support guy's :D

Cheers Bryan :D
 
Hi guys,

May I contribute a layout for a ZIF-40 PIC programming adapter board?

It's very much like the melabs ZIF-40 board with dual-row 10-pin connectors (you flip the board and change connectors when going from 8-18 pin devices to 28-40 pin devices) and I added single-row 5-pin connectors for my Kits-R-Us Kit182 programmer...

The board layout allows for the use of a 40-pin ZIF socket or three less expensive 20-pin single-in-line machined pin sockets...

I use the melabs type 10-pin dual-row connector on my ICD2 clone...

Regards, Mike
 

Attachments

  • zif-40a.jpg
    zif-40a.jpg
    148.9 KB · Views: 7,621
Mike said:
Hi guys,

May I contribute a layout for a ZIF-40 PIC programming adapter board?

It's very much like the melabs ZIF-40 board with dual-row 10-pin connectors (you flip the board and change connectors when going from 8-18 pin devices to 28-40 pin devices) and I added single-row 5-pin connectors for my Kits-R-Us Kit182 programmer...

The board layout allows for the use of a 40-pin ZIF socket or three less expensive 20-pin single-in-line machined pin sockets...

I use the melabs type 10-pin dual-row connector on my ICD2 clone...

Regards, Mike

Ooooh, niiice :) Would you happen to have the original printable document?
 
Hi Joel,

Attached, please find the Pad2Pad circuit board file for that ZIF-40 board... The silk screen layer has been modified for 8 through 20 pin devices instead of the 8 through 18 pin devices in that picture above...

Regards, Mike
 

Attachments

  • zif-40_target_board.zip
    15.7 KB · Views: 468
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top