AVR/Arduino ISP programmer using the Raspberry Pi GPIOs

  
Inside:
Repository
As a fully-featured Linux computer there are many external programmers that can be used with your Raspberry Pi to program the Atmel AVR range of microprocessors. It`s also possible to use the general purpose input/output lines (GPIOs) found on the Raspberry Pi to implement an ISP programmer with minimal extra hardware. I say `with minimal extra ha
AVR/Arduino ISP programmer using the Raspberry Pi GPIOs - schematic

rdware" because although it can be done with no extra hardware I recommend adding a buffer and FET to protect the Raspberry Pi. You might reasonably wonder what is the point if extra hardware should be used since external USB programmers can be bought cheaply from Ebay. However, if you are going to add an extension PCB to your Raspberry Pi anyway, for instance to communicate with a remote Atmel processor, then including an ISP programmer makes sense and adds very little cost. Most of the Atmel AVR range can be programmed using an ISP interface which resembles the SPI bus. For this description I`ll assume that the SPI pins are reused for this purpose but you should check the datasheet to make sure this is true for your part. The RESET pin is used as the active-low chip select pin, SCK is the clock signal, MOSI is the input data pin and MISO is the output data pin. If the directions seem odd remember that the microcontroller is acting as a SPI slave in this scenario; with that in mind the names make perfect sense. The ISP programmer then communicates with the microcontroller, sending commands to read or write flash memory, EEPROM, fuses, and/or locks. Avrdude supports many different programmers which can be used for this task. The simplest interface on the Raspberry Pi is to use four GPIO pins and bit-bang the SPI commands. I don`t recommend this however. After programming has finished the SPI interface on the microcontroller...



Leave Comment

characters left:

New Circuits

.