3 Simple Ways to
Share What You Make

With Instructables you can share what you make with the world — and tap into an ever-growing community of creative experts.

PhotosPhotos

Share one or more photos of a project, recipe, or whatever you've made, quickly and easily.

Step by StepStep-By-Step

Share your step-by-step photos with text instructions of what you made so others can do it too!

VideoVideo

Share your how-to video. You'll need your embed code from a video site such as YouTube.

Ghetto Development Environment

Step 2The USB Programmer

The USB Programmer
«
  • 531946274_b6aec192ba.jpg
  • 6and10pinstd.jpg
In Ghetto Programmer (v.1.0) I used a parallel port programmer. It's great because it's simple and cheap and fast. But my laptop doesn't have a parallel port.

I played around with making serial port programmers for a bit, but honestly they're just as complicated as the USB version and even serial ports are becoming scarce.

Indeed, my laptop's only really got USB. So USB it is. Looking around, the USBTiny programmer is pretty simple and works with the free GNU/AVR-GCC tools.

Do it yourself or buy a kit?

The DIY way is good if you can already program an ATTiny2313 (with parallel programmer) and have a 12MHz crystal sitting around. USBTiny Page lays out the basics.

He terminates the programming cable with a parallel port, but I'd finish it up in a standard 6-pin header if I were starting afresh. (Why? Because it's standard.) Here are his pin-outs, and check the image below for the cable layout.

PD3 - MISO
PD5 - Reset
PD6 - SCK
PD7 - MOSI

If you make your own, please learn from my experience and put it into a nice plastic box. If you don't, it'll fail eventually when the 12MHz crystal breaks off. Which is why I now use...

The quick-and-elegant way is Ladyada's USBtinyISP kit. It'll set you back $22, but you get a nice PCB, pre-programmed ATTiny2313, and a clean box with nice cables. Raw parts are like $15-16 anyway, and you don't have to call up Digikey and then worry about programming up your own 2313. Takes 30 min - 1 hr to solder it all together.

Splurge. Trust me.

(No affiliation, satisfied customer)

And just saw this link: Ladyada's AVR Tutorial which seems pretty good to me.

(And do note that Ladyada's design and the original USBTiny use different USB product identifier codes -- you'll have to find the ID strings and re-compile avrGCC if you're switching between the two. I think there's instructions on the respective webpages.)



In case you're on a Ubuntu Linux system and using the USBTiny programmer, here's the commands that'll get the whole toolchain up and running:

sudo apt-get install build-essential avr-libc binutils-avr gcc-avr avrdude
(tested on Hardy Heron)

If you have an AMD64 arch, you may also need: byacc libusb-dev flex bison libc6-dev
and then to compile AVRdude by hand:
(
wget http://download.savannah.gnu.org/releases/avrdude/avrdude-5.5.tar.gz
tar xvzf avrdude-5.5.tar.gz
cd avrdude-5.5
## Patch needed for AMD64:
wget http://savannah.nongnu.org/patch/download.php?file_id=14754
patch -p1 < avrdude-5.5.usbtiny.64bit.patch
./configure
make && make install
sudo avrdude -p attiny2313 -c usbtiny ## to test
)

If you see something like "avrdude: AVR device initialized and ready to accept instructions" then you're done.



Oh yeah, and credit to Wendel Oskay for the diagram of the standard programmer pinouts.
« Previous StepDownload PDFView All StepsNext Step »
5 comments
Feb 27, 2008. 12:46 PMoskay says:
You really should give me credit if you're going to use my drawing....
Aug 12, 2009. 7:11 PMRportal says:
you do have credit. it says thanks to wendel oskay atop of the drawing
Aug 18, 2009. 9:46 AMDavidRobertson says:
Its Windell. I think
Aug 12, 2009. 9:31 PMoskay says:
And who is that?
Apr 19, 2009. 11:24 PM1337sh33p says:
you mean "build-essential" not "build-essentials"

Pro

Get More Out of Instructables

Already have an Account?

close

All Steps Viewing
View all steps of an Instructable on the same page when you're a Pro Member.

Upgrade to Pro today!
95
Followers
7
Author:The Real Elliot