Parallel AVR Programmer

April 4, 2009
Tags:

15avr

I read a post on the Society of Robots a couple of days ago. The original poster asked how to connect a parallel port of a PC to an AVR in order to program the AVR. This was the first way that I programmed AVRs – before I had programming tools for the AVR. I built a parallel/AVR programmer almost a decade ago.

To answer the post, I dug up my old programmer. The pin-outs I used were different than the pin-outs posted by the original poster. I can imagine that we could both be wrong, but could we both be right?

It turns out, in fact, we were both right.

Apparently there are several ways to wire the parallel port when you make a parallel port programmer. I decided to duplicate the steps here to document those variations. I chose to assign colors to the AVR ISP signals. The colors I chose were arbitrary, but I followed them in all of these photos.

I assigned signal colors this way:

Ground – Black
SCK – Yellow
MOSI – Blue
MISO – Green
Reset – Orange

Note #1: The parallel port AVR programmers only work with parallel ports that are directly on the PC motherboard or on a bus card. They do NOT work with USB parallel port adaptors.

Note #2: For clarity I omitted the series resistors that I recommend inserting in to each of the 4 signal lines (not ground) with a value of 220 to 1000 ohms. 330 is a good pick.

I started with a male D-25 parallel port connector:

1avr

From the back you can see that pin 1 is located on the upper right. Noted with a red dot:

2avr

In all 4 variations of the pin connections for the programmer, pins 18-25 are ground pins. I bent these pins at right angles and soldered them all together:

3avr

Once pins 18-25 were soldered, I attached my short length of black wire. The black wire is the ground connection that is common to the PC and to the AVR circuit that you are programming:

4avr

This is one of the variations of the parallel AVR programmers:

5avr

1 – SCK (yellow)
2 – MOSI (blue)
11 – MISO (green)
16 – Reset (orange)
18-25 – Ground

Type #1 is used with WinAVR programming/development environment. WinAVR can be downloaded for free.

This is another of the variations of the parallel AVR programmers:

6avr

2 – MOSI (blue)
4 – Reset (orange)
5 – SCK (yellow)
11 – MISO (green)
18-25 – Ground

Type #2 is called “STK200″ as it duplicated a wiring design for the Atmel STK200 development kit. The software I used at the time to program was a BASIC for the AVR. A company called Kanda will let you download programming software if you register with them.

This is a third type:

7avr

6 – SCK (yellow)
7 – MOSI (blue)
9 – Reset (orange)
10 – MISO (green)
18-25 – Ground

Type #3 is compatible with the PonyProg AVR programming software. In PonyProg you select a parallel interface: “AVR ISP I/O”.

This is also the wiring I chose to stick with in the pictures that show the completion of the parallel AVR programmer.

This is a fourth type:

8avr

7 – Reset (orange)
8 – SCK (yellow)
9 – MOSI (blue)
10 – MISO (green)
18-28 – Ground

#4 Is used with AVRDude. (Used on Linux)

Shrink tubing (apparently I need to find some that is orange) can be added to help prevent the adjacent wires from shorting. Although not shown here, this is where I would add series resistors and cover them and the wires with the shrink tubing:

9avr

10avr

On the ISP end of the cable, I chose wire connectors that fit into a 2 by 3 plastic shell appropriate for the 6 pin ISP:

11avr

The wire connectors are crimped and soldered to the ends of the wires:

12avr

Note that you could stop there and NOT use the 2 by 3 shell. If you cover the ends of these wires with shrink tubing and leave them “free”, you can plug them into the 2 by 6 header, into the 2 by 5 header, or whatever header you might need.

Wires partially inserted into the shell. Pin 1 represented by a red arrow:

13avr

Completely stuffed shell:

14avr

Complete cable as an example. Again I omitted series resistors for clarity:

15avr1

I’ll add the resistors and keep this cable around as a backup. This cable works with PonyProg.

Please post any questions you may have.

=Gizmo=

Comments are closed.