Burning the Sanguino Bootloader

From RepRapWiki
Jump to: navigation, search

This tutorial uses Ladyada's USBTiny to burn the bootloader via ISP (in-system programming) to an Atmega644p based RepRap board. Other Atmel chips should also work (ATmega1284 is NOT supported by the USBTiny programmer. See: AVR_Programmers). You can also burn the Sanguino Bootloader using an Arduino as the ISP. Charles Gantt has written an excellent tutorial and uploaded it to the Wiki here Burning_the_Sanguino_Bootloader_using_Arduino_as_ISP.

USBTiny on Windows

You will need:

  • Sanguino based RepRap board with an ISP header and Atmega644p (RAMPS, Gen6, Sanuinololu, etc.).
  • USBTiny and Windows drivers
  • Arduino 018 with Sanguino extension
  • NOTE:Recently Sanguino has been ported to use the Arduino Core. The Sanguino is now compilable and uploadable easily with Arduino IDE 1.0.4 or above using Optiboot loader. Atmega644p and Atmega1284p are now build and uploadable sketches on latest Arduino IDE. Blog with Details can be found on Bhashatech blog website

Once you have the above hardware and software, burning the bootloader to the Atmega644p is a simple process:

  1. Connect the six pin cable of the USBTiny to your RepRap board's ISP header. Orientation is critical (red wire corresponds to pin 1)!
  2. Connect a power supply to your RepRap board and turn the supply on.
  3. Connect a USB cable from your computer to the USBTiny. If this is the first time you've used the USBTiny, you will be prompted to load its drivers.
  4. Open Arduino.
  5. Click Tools. Set Board to "Sanguino"
  6. Click Tools. Under Burn Bootloder, choose "w /USBTinyISP". There may be more than one occurrence in the list; usually the first works. If not, try the next.
  7. Arduino will begin burning the bootloader. The process takes about a minute or less.
  8. After Arduino reports "Done", press the reset button on your RepRap board.
  9. Disconnect the USBTiny's USB cable, then disconnect power from the RepRap board. You're ready to load firmware!

USBTiny on Ubuntu

Trying to burn the bootloader from Arduino software using the "Windows" sequence doesn't always work. If you get an error "initialization failed, rc=-1" then try burning using the following terminal instructions.

here's how to do it from the shell:

sudo apt-get install libusb
wget http://sanguino.googlecode.com/files/Sanguino-0018r1_1_4.zip
unzip Sanguino*zip
sudo avrdude -p atmega644P -c usbtiny -U flash:w:Sanguino/bootloaders/atmega644p/ATmegaBOOT_644P.hex