A Simple AVR ISP Programming Adaptor

As I mentioned in the the previous post I have been looking at setting up a helper board that would let me program a bootloader onto an AVR so I can use it with the Arduino programming environment. I have a small ISP programmer for the AVR chips which has a 10 pin programming header but I was after something I could insert the chip into, program the bootloader and then put it in the final circuit.

After a bit of research I was surprised to find this wasn't as common a thing to do as I would have thought. The Arduino platform is by far the most popular AVR based system around and all the Arduino boards (and their compatible cousins) come with a boot loader already installed so I guess it's not really required. Coming from a PIC background this was a bit of a different approach - almost all PIC programmers I have used have a ZIF socket to support multiple PIC chips.

AVR Programming Adaptor

The circuit I came up with is shown on the right. Although the circuit shows an ATMega8 as the main chip it will work with a range of 28 pin AVR chips including the ATMega48, ATMega88 and ATMega168.

One problem I had was deciding whether or not to include an external oscillator, the datasheet wasn't exactly clear and none of the examples I found included one. The AVR can be set to use an internal oscillator or an external crystal and this is controlled by fuse settings. A factory fresh AVR will be set to use the internal oscillator - if you are just using the ISP to put a bootloader on the chip and set the fuses then an external oscillator is not required, if you are not using a bootloader, or need to update the bootloader directly you may need it if the fuses are set to expect one.

I had hoped that when the AVR entered programming mode it would always use the internal oscillator but I couldn't find confirmation of that one way or another. My work around was to include an 8MHz ceramic resonator, if the target chip has it's fuses set to expect a crystal this will do the job, if it is set to use the internal oscillator then the inputs should be ignored and it will make no difference.

AVR Programming Adaptor

I've done up the breadboard layout (see the image to the left) for the circuit and hopefully I'll get some time tomorrow night to test it out. To start with I'm going to make some small Arduino compatible systems based around this design which uses an ATMega8 at it's heart with the internal oscillator enabled. It seems to be the about the minimum number of components you can possibly use to make an Arduino compatible system.

I'll run a few tests with AVR chips with various fuse settings and publish the final circuit on this site once I've verified that everything works as expected. In the meantime I've set up a GitHub repository with all my work so far. Please have a look at that if you want to grab the Fritzing files for the project. The main one related to this post is prog_adaptor.fzz which contains the circuit and breadboard layout for the programming adaptor board.

More details to follow, stay tuned :)