Categories
Fab Academy AS220 - Providence, RI Fab Academy Providence -Year II - Teaching

Hello (Make Your Own) Arduino

arduino
For reasons I haven’t uncovered yet, I was unable to use the Arduino IDE to burn the bootloader to a fabbed Arduino board. For my first attempt at this, see the Fabkit / Fabduino post. Also see Ed Baafi’s Fabkit / Fabduino page for how to program an fabbed Arduino without an external clock through the Arduino IDE. In both OS X and Ubuntu I was unable to connect to the board through the IDE. Shawn Wallace suggested that I use the following code. (See “To Program Your Arduino” section below) The code below worked for me in Ubuntu. NOTE: This code below works for a using an external 8MHZ resonator, see the links to the .png files.

Download the Files

Download Files to Mill
Get the files from the Fab Academy site
Download the Arduino Bootloader File for the Atmega168
Right click to save the files

To Program Your Arduino:

Set the fuses with:

Paste code is all in one line

avrdude -c usbtiny -p m168 -B 5 -u -U lock:w:0x0F:m -U  efuse:w:0x00:m -U
hfuse:w:0xdd:m -U lfuse:w:0xf6:m -P usb

Burn the bootloader with:

Paste code is all in one line

avrdude -P usb -c usbtiny -p m168  -u -U flash:w:ATmegaBOOT_168_pro_8MHz.hex
-U lock:w:0x0F:m -B .2

The options used:

  1. -u –> Disable safemode, default when running from a script.
  2. -U :r|w|v:[:format] –> Memory operation specification. Multiple -U options are allowed, each request is performed in the order specified.

Leave a Reply

Your email address will not be published. Required fields are marked *