Instructables

Ghetto Programming: Getting started with AVR microprocessors on the cheap.

Featured

Step 4: Make Programmer Cable

The cable you're going to make is a "Direct AVR Parallel Access" or DAPA cable.

I think I got the pinouts from somewhere else, but this site has a nice schematic of the parallel port pins for your reference.

Mine goes something like this:
Parallel Port  	 AVR Function  Color2                MOSI          Orange/Grey11               MISO          Orange1                SCK           Green16               RESET         Brown18 	         GND           Brown/Grey

Only tricky bit here: Note that pin 1 (SCK) is on the upper-right hand side when you are looking at the solder pins from the back. It's upper-left when you're looking at it here, and in the circuit diagram.

Also, the guy's website above has ground connected to 20 and 21 while mine (and others) use 18. Many of the pins connect to ground, and it doesn't matter which of them you pick, as long as you get ground.

If you look around the web, you'll find that most people put resistors in either the cable or the cradle (next step) to protect their computer's parallel port from excessive voltages on the AVR chip for use when programming it in-circuit. We will be using strictly 5v here, so there's no such worry, and I leave them out for simplicity.

However, if your chip ever comes near >5v, DO NOT USE THIS CABLE WITHOUT RESISTORS! A computer with a burnt-out parallel port is no fun. That said, I've been using it without incident for 6 months now.
 
Remove these adsRemove these ads by Signing Up
kbchiew2 years ago
Thank you. Abit confusing here.
In the picture above, you shown PIN1= Reset.
In the listing, PIN1= SCK. PIN11 = Reset.
please define your pin outs in the pictures and define better in board thks
The Real Elliot (author)  fostersfriend3 years ago
How do you mean "better"? Is there something specific I can write that'd help?
Just label all the out puts on all the pictures
Can you use 4.5V instead of 5V?
jakobhs7 years ago
i dont have a parallel port in my computer what can i do? can i use a parallel-usb converter?
The Real Elliot (author)  jakobhs6 years ago
I hope it's not too late for you! If you don't have a parallel port, it's much easier to get a USB programmer (see other tutorial) than to emulate a parallel port and jury-rig a parallel port programmer for it.
where can i get the USB one ???
thanks The real elliot where can i buy one or can i make one by myself. -jakob
yes! he has gone USB, see above.
yeah, looked online, most use 1k resistors
erm, actually, look here, i duno if these are fine or not, but it seems so
http://www.arduino.cc/en/Hacking/ParallelProgrammer
yeah, thinking about it, is it worth it to put resistors on reset and ground?
or, do you do like maity says and cut the gnd resistor off, and have the other 4 running 1k resistors?
This is the schematic from the site linked above. Looks like only pins one and two off the parallel header have 1KOhm resistors. The rest should be without.
thanks much. I looked around and couldn't find anything before. again, much appreciated.
oh, and by the way, i'm taking it that it IS worthwile to connect the ground to both of the grounds pictured, if anything, for safety?
Yeah, you have some options on how to do this however. You could just short the pins together at the connector but this limits the current that will be able to ground since you will effectively only be using one wire. I would just run a ground to both pins, just to be on the safe side. I'm sure it will work either way in real world situations, though.
maity7 years ago
First of all, thanks for this nice tutorial! I used it for my very first AVR experiences and it worked - after I took out the one of the resistors at the MISO port (which goes to PIN 11 Parallel Port).
When I first connected everything together, I got:

avrdude: AVR device not responding
avrdude: initialization failed, rc=-1
Double check connections and try again, or use -F to override
this check.

I checked and rechecked all my connections, couldn't find anything wrong. So I connected my scope and found out, that the voltage level on pin 11 of the Parallel Port didn't go all the way to GND. After I removed this 1k Resistor there (I left all the other 1k Resistors), everything worked just fine!
avr001.jpg
tonyb20067 years ago
" DO NOT USE THIS CABLE WITHOUT RESISTORS! " What type of resistors? (or does it depend on the voltage thats >5v)
1k resistors i believe :D