Sunday, June 19, 2011

ATMEL AVR ISP DONGLE


Atmel’s AVR microcontroller chips are in-system programmable (ISP), i.e. these can be programmed directly in the target circuit. A special programmer software is used to download the program from the PC into the AVR’s flash memory. Atmel offers a software package called the Atmel AVR ISP that allows programming of the AVR microcontrollers in the circuit using a simple dongle. A dongle is nothing but an adaptor cable that connects the PC’s parallel port with the ISP pins of the AVR chip for programming. For programming, the four lines required from the AVR chip to the ISP adaptor (dongle) are:

1. MOSI (Master Out, Slave In): Data being transmitted to the AVR being programmed is sent on this pin
2. MISO (Master In, Slave Out): Data received from the AVR being programmed is sent on this pin
3. SCK (Shift Clock): Serial clock generated by the programmer from the PC.
4. RST (Reset): Reset (low pulse) generated by the program. The AVR is programmed while in reset state.
click to enlarge

 Here’s a dongle circuit for in-system programming of Atmel’s AVR chip AT90S8515 using such software packages as Atmel ISP 2.65 and PonyProg2000. Though not exactly the same, a similar dongle circuit can be found at the Website ‘www.iready.org/ projects/uinternet/ispdongle.pdf.’  The PC’s parallel-port pins 4 and 5 drive buffer IC 74LS244 by enabling its pins 19 and 1, respectively. A low pulse on these pins will allow the passing of the serial clock and data during programming. MOSI, LED, SCK and RST outputs are buffered from the parallel port’s pins 7, 8, 6 and 9, respectively. The MISO input from the AVR is fed into pin 10 of the parallel port.
 IC 74LS244 (IC1) acts as a buffer as well as an isolator circuit when the AVR is not in  programming mode. In idle mode, all the outputs are tristated so as not to affect the operation of the target system.
 When the AVR’s ISP mode is selected, the lower half of IC 74LS244 is enabled, pulling the target system’s Reset line low. Once the target system is in Reset mode, the SCK, MISO and MOSI lines are no longer loaded by the peripheral circuitry, if any, on the target system. Now, it is safe to enable the upper half of 74LS244, driving the MOSI, LED and SCK lines of the dongle. The RST pin becomes high after the AVR is programmed.  Glowing of LED2 indicates that the AVR is in programming mode.
 There are two standard connectors for in-system programming of Atmel AVR microcontroller. One is the 10 pin header (dual-in-line (DIL) connector)) used on the Atmel STK kits. The other is a 6-pin header (DIL connector) used in Atmel ISPs. The two loopback connections, pin 2-to-pin 12 and pin 3-to-pin 11 of the parallel port, are used to identify the dongle. With only pin 2-to-pin 12 link, the dongle is called STK300 or AVR ISP dongle. With only pin 3-to-pin 11 link, the dongle is called STK200 or old Kanda ISP dongle. With both links in place, the dongle is identified as a valueadded pack dongle.
 Here, we’ve used an 8-pin single-inline (SIL) connector and an additional 6-pin SIL connector for the Atmel programmer circuit. With the buffer and the 40-pin ZIF socket in this circuit, it can be used as a standalone programmer. The 6-pin SIL male connector is used for connection between the dongle and the AVR on the target board. Thus, another 6-line cable of about 30cm length is required for connecting this ISP adaptor (dongle) to the target circuit.
 If the AVR is not on the target circuit, you can insert the AVR into the ZIF socket and program it. Regulated 5V DC is required for the AVR and the associated dongle circuit, whose terminals are also provided in connector CON4. LED1 is used as the power indicator for the circuit.

2 comments:

Unknown said...

Looks amazing!!!! /I look forward to your feedback /thanks for this man it was very helpful.

Low Cost Laser Line Generators

• » νιηєєтн νєηυgσραℓ « • said...

thank u

Post a Comment

Twitter Delicious Facebook Digg Stumbleupon Favorites More