I recently bought an Atmel AVR programmer since I was interested in helping a friend out with programming some blinking LEDs. This is a brief description on how I connected the programmer to a solderless breadboard so I would be able to program the ATtiny2313 I had concluded was sufficient for the project.
First of all, I downloaded AVR Studio 5 from Atmel (there exists other software as well, such as AVR Dude) and installed it. When I connected my AVR ISP MKII for the first time, it checked if there were any firmware upgrades available for the programmer and there were. The new firmware was installed without any hassle.
The AVR ISP MKII consists of a 6 pin female header which needs to be connected to the IC’s corresponding pins. It is pretty straight forward, connect MISO to MISO, MOSI to MOSI, SCK to SCK, RESET to RESET and 5V through a 4.7 K resistor, VCC to VCC and 5V., and GROUND to GROUND (see drawing and pictures). I used simple wiring cables in various colors to complete the connections. Make sure the pin orientations on the IC is correct, pin 1 is the first pin the left of the small notch at the top! Also make sure that the board is not powered while you connect the wires, in worst case you might fry your programmer if you made any miswiring.
The programmer does not supply the target with any power so it has to be powered separately. I use 4 AA batteries (6 V) (in a battery box with on/off switch) to power my bread board and have connected a 7805 voltage regulator, which takes the 6 V input and outputs 5 V, which is perfect for the 2313. After I had connected everything, it did not work. I had connected the 7805 ground to the ground rail on the bread board and the VCC pin to the the VCC rail, which was ok, BUT I noticed that the VCC and ground rails were split at the middle of the board (the battery was connected to the far end on the bread board and the 7805 at the opposite end). Two small jumpers connected the rails together fixed that simple problem (see bottom picture).
When everything is connected, turn on power and you should see two green lights on the programmer. If not, go back and recheck the wiring. Use a voltmeter to verify that the VCC pins get +5V, etc. If you have two green lights, start AVR Studio, go to Tools -> AVR Programming, make sure AVRISP mkII is selected under Tool, and ATtiny2313 under device, then click Apply. You should now be able to read the Target Voltage, and it should be around 5 V, +/- a few percent.
If you are going to a more than a little IC programming, I recommend getting a ZIF socket which lets you insert and remove an IC very easily.
For more info regarding AVR programming and programmers, check out these sites: