Step 10Prepping Your Programming Environment
If you don't already have a programmer for your micro then now is the time to get one. The cost varies from DIY models to the GBP60+ all-in-one boards. The model i chose is the USBasp, it cost me GBP12 from eBay though you can buy from other people or just build your own.
http://www.fischl.de/usbasp/
It was the cheapest USB model i can find, is about the size of a large memory stick and is perfect for what we're doing. The only hitch i had was trying to install the drivers on Windows 7, but that's another story. The libUSB drivers are Mac and Linux compatible, mind you.
The way most AVR programs are uploaded is through an ISP (In System Programming) cable. There are both 6 pin and 10 pin varieties, both are essentially the same. The 10 pin cable just has more ground wires than the 6 pin (and only one needs to be connected). If you look at the pinout for the cable (image 1), most of those pin names should be familiar. Yep, they're from the AVR chip. The programming process is a simple matter of plugging in the cable to the programmer and then connecting it up pin for pin.
The way i do it is by use of a programming cradle. It was simple to build, just two components soldered onto a bit of stripboard with wires linking pins. Those components are a 28-pin DIL socket, or however many pins your chip has, and a 10 pin male header that will fit the ISP cable.
To build it, you simply solder both onto the board (making sure you cut the relevant tracks so as not to connect opposite pins - i used a dremel with an engraving tip for this) and work out from the pin diagrams which bits you should wire together.
One very important thing to note is that if you change your fuse bits to enable an external crystal, the chip will look for it (and its required capacitors) when you are programming and if it's not connected it won't power up correctly (the programmer will just error at you). So for mine, i soldered a couple of wires (they're the white ones in the picture) to connect to the crystal on the breadboard. You also need to connect up the ground wire to the ground of the crystal/capacitor block.
If in doubt, The Real Elliot has some excellent instructables detailing how to build the programming cradle or an entire serial programmer.
http://www.instructables.com/member/The+Real+Elliot/
| « Previous Step | Download PDFView All Steps | Next Step » |
![]() |
Add Comment
|































































