4 A Simple Low-cost In-System Programmer
This application note will not discuss all aspects of an In-System Programmer. Instead, it will show how a simple low-cost programmer can be made, using only an AT90S1200 and a few discrete components.
The programmer will plug into any serial port of any PC. The AT90S1200 doesn’t come with a hardware UART, but the software will run a half duplex UART by using the Timer/Counter0 to clock data. The AT90S1200 also takes care of programming the target AVR by running the Master SPI entirely in software.
The schematics to the programmer can be seen in the figure below. Power to the AT90S1200 is taken from the target system. The negative voltage needed to communicate serially with the PC is stored in C100 when receiving a logical one (negative line voltage).
The transmit line is fed with this negative voltage from C100, when transistor Q100 is closed. This sends a logical one on the transmit line. Logical zeros (positive voltage) is sent by opening Q100, connecting VCC (actually VCC - 0.2V) to the transmit line.
Some older PC systems might have serial port not accepting voltages below +10 volts as logical zero. This, however, is not a problem with the majority of existing PCs.
The file avr910.asm contains the firmware for the AT90S1200.