Atmel ISP Programmer
This was actually used to program my Digital Voice Recorder
which I made for my VI sem project. It connects to the Parallel port, and can be used to program any Atmel AVR while it is still in the system, provided the system provides a standard In System Programming (ISP) connector. The PC interface is through the Parallel port, and makes use of the same pinout as the STK-200 programmer from Kanada Systems. The STK-200 programming cable is very popular, and almost every ISP download software (Except ICCAVR's inbuilt chip programmer) supports it.
The device is very simple, it only contains a single chip, a 74LS245 (a 74LS244 can also be used, with suitable modifications). Of course, a 74HC245 can be substituted. I think this is necessary when programming the ATMega series devices with the Atmel AVRISP software, since it uses some sort of 'fast-mode' that gives an error during programming. Ignoring the error doesnt seem to do harm, and the program executes correctly on the chip. Other programmers such as PonyProg
did not have any problems, regardless of the device being programmed.
The standard ISP pinouts
ISP 10-pin box header pinout
The standard pinouts are as shown above. The pins are:
|RESET||Used to reset the target system under the PC's control.|
|SCK||The serial data clock|
|MOSI||Master Out Slave In, used to send data from the PC (master) to the AVR (slave). Data is transmitted on the edges of SCK.|
|MISO||Master In Slave Out, used to send data from the AVR (master) to the PC (slave). Data is transmitted on the edges of SCK.|
|LED||The PC makes this line high to indicate that programming is occuring. Not used in all systems.|
|PWR||Can be used either to provide power to the target system during programming, or for the programmer to draw power from the target system during programming. I use it to allow the programmer to draw power from the system.|
The Atmel AVR ISP programmer.
The only chip used in the device is a 74LS245 octal bidirectional 3-state driver. However, a 74LS244 octal unidirecional bus driver may also be used. I just happened to have a 74LS245 lying around. The chip is used so that when the device is not being programmed, the programming interface lines are all tristated, allowing the device to function normally. The direction control is permanently grounded, making the device essentially unidirectional. The tristate enable is connected to one of the outputs of the parallel port, along with a pullup. Hence, when the programmer is not plugged into a port, or when the device is not being programmed, the '245's outputs go into tristate mode. Notice that pins 2 and 12, along with pins 3 and 11 are connected together. This is the identification method used by programmer software to determine that an STK-200 compatible programmer is attached to the parallel port. I havent used the programming LED option, and chose not to use a power-on LED, so that the device being programmed has the least load on it's power supply.
The whole device was assembled on a veroboard, nothing special. It works fine and gives no problems, except when programming an ATMega103 using AVRISP.
Software compatible with this programmer includes
- AVR ISP from Atmel, a very good device programmer. It can read/write the Flash and EEPROM, and set the security bits. It includes a nice "Autoprogram" command, that reloads all the device files and downloads the ones that have changed to the AVR.
- PonyProg, by Claudio Lanconelli, another nice programmer, a bit slower than AVRISP. However, it can be used to program lots of other types of devices, such as EPROMS, serial EEPROMS, etc.
- CodeVisionAVR C compiler's inbuilt chip programmer, by HP Infotech, has the advantage of being a part of the compiler IDE.
These circuits are provided for your own study only. They all deal with electricity and electronics, a sufficient knowledge of both is assumed. I will not take any responsibility for any personal injury or damage to property arising from use or abuse of the information provided on these pages.