Construct your own cheap avr icsp programmer with usb power supply
In this post I will explain how I have constructed an AVR circuit with ISP programmer for ATMEL Atmega8 which requires a minimum of only four resistors (if status LEDs are not required), power supply and oscillator circuit.This method will be applicable for other ther AVR microcontrollers also. In this method we need only five lines for programming. This method is called as ISP or ICSP (In Circuit Serial Programming) four plus one line for ground is used. The four lines are used for
Now if we want we can add additional lines for status LEDs like busy, porgramming, ready, vreifying etc.
What makes this programmer so simple is the ISP featre of the AVR microcontroller and software used for programming. AVRDUDE is the most popular programmer software available. It supports lots of programmer hardwares available in the market. But the main advantage is that, we can can define a programmer in its configuration file. So if we connect wires differently also, we can create the programmer definition with the connection which we have done. This makes it easy to add status LEDs.
Programmer cicuit from example page
Now inorder to configure the programmer for avrdude, open file avrdude.conf. In the header of the file, there will be format for how to define a programmer, which has lot of parameters, but we can define a simple programmer as below
Here it is simple to understand, eg:- mosi is connected to 10th pin of parallel port and so on. Dont forget to update the fields according to the connection you have made. vcc=2,3,4,5 mentions that programmer uses those pins for powering the programmer circuit. But this will not be necessary if we are giving external power supply.
One simple method for powersupply is to use the vcc option of the AVRDUDE mentioned above and and use the parallel port to power. This will be the cheapest option.
But I was working with a circuit wich was already powered. There is a project called as V-USB formally called as AVR-USB. This project is about adding USB support on AVR chips using firmware. In this page we can find a circuit diagram(also shown below) on how to connect the USB port to AVR.
Connection of AVR to USB port
Board with ISPand status LED connection