Burn bootloader for Arduino Duemilanove w/ Atmega328 using avrdude 5.10

This is using a new Arduino Duemilanove board with a regular Atmega328p, with no bootloader. I wanted to do the BitBang mode, since I didn’t want to get or make anything else, and the ArduinoISP, I didn’t have access to another Arduino. So I pieced together 3 different guides, I finally got it working.

This assumes you have a Duemilanove with Atmega328p. Running Ubuntu 9.10, though really any distro will work, though how you get the dependencies will vary. Also, you have the Arduino IDE installed to /usr/share/arduino, which if you install using the deb source method, it will be.

First, setup the Arduino as shown here. I used the first wiring guide, but either should work.

Next, setup avrdude on Ubuntu. I followed this guide, but used avrdude 5.10, instead of 5.8. The commands remain the same, except instead of downloading 5.8, you download 5.10.

Here’s what I ran:

wget http://download.savannah.gnu.org/releases-noredirect/avrdude/avrdude-5.10.tar.gz
tar xfvz avrdude-5.10.tar.gz 
cd avrdude-5.10/
for i in 8 7 6 5 4 3 2 1 0; do wget -O patch-$i.diff http://savannah.nongnu.org/patch/download.php?file_id=1851$i; done
for file in patch-*.diff; do patch -p0 < $file; done
wget http://www.ftdichip.com/Drivers/D2XX/Linux/libftd2xx0.4.16.tar.gz
tar xzf libftd2xx*.tar.gz
cp libftd2xx*/static_lib/* .
cp libftd2xx*/*.h .
cp libftd2xx*/*.cfg .
cp /usr/share/arduino/hardware/arduino/bootloaders/atmega/ATmegaBOOT_168_atmega328.hex .

Then you edit the file, Makefile:
LIBS = -lreadline -lncurses -ltermcap -> LIBS = -lreadline -lncurses -ltermcap ./libftd2xx.a.0.4.16 -lrt

Then just run make.

Third, run:

sudo ./avrdude -C avrdude.conf -c duemilanove -P ft0 -p m328p -t -B 4800

And in that:

w efuse 0 0x05
w hfuse 0 0xda
w lfuse 0 0xff

This sets up the efuse, hfuse, and ifuse values. This has to be run at a lower baud rate.

Fourth, run:

sudo ./avrdude -C avrdude.conf -c duemilanove -P ft0 -p m328p -U flash:w:ATmegaBOOT_168_atmega328.hex

The bootloader has been flashed. Lock it by running:

sudo ./avrdude -C avrdude.conf -c duemilanove -P ft0 -p m328p -t

And enter:

w lock 0 0x0f

Now, your Atmega328 should be ready to use. You can try it by uploading the example Blink from the IDE.

Paintball Headlines Theme

I said I would post the theme for headlines when I thought it was acceptable. There are still problems, but whatever.

Anyways, this theme is based upon this tutorial theme, but changed to have multiple author support, support tags and categories, and be a double right column instead of a column on both sides. There are a few other little changes in there.

Github Repository

I’ll try to update the theme whenever I change anything; I just have to remember to do a svn ci each time.

To run by default and not get errors, you need do need a few plugins, like wp_dtree. There’s also a classifieds plugin that I wrote just for headlines that’s needed, but I don’t plan on releasing that, since it contains db info and it’s pretty much just a MySQL query. In sidebar.php, just comment out the get_classifieds_new(10); code.

Edit: Changed to Github, since DevjaVu went away.

WordPress Widget-A-Day

I’ve been wanting to do a ‘Something-A-Some-amount-of-time’, and since I just made a WordPress Widget, which is pretty easy, and with WordPress 2.2, widget support is available by default, I decided to do a ‘WordPress Widget-A-Day’.

Over the next week, though I’ll probably start today, so I guess it’ll have 4 extra or maybe just 1 depending on my motivation, I’ll make and release a widget for WordPress everyday. These might not be fancy, they might not even be original, though I’m going to try to not make ones that already exist with the same functionality, but they’ll be widgets.

If you have any ideas or suggestions, comment or contact me.

View posts about Widget-A-Day or subscribe to the Widget-A-Day feed

Hopefully, I won’t fail at this.

Fun with Digg’s API

Digg’s api was released about a week ago a while ago, and since that time, various flash projects have surfaced, probably due to that pesky contest. But I don’t have any flash experience, so PHP, here we come.

We’re going to make various tag clouds, a Reddit clone, Reddit/Better RSS feed, and a live diggs app.

Update – 05/09/07 – 3 PM – Stupid host seems to be having database issues. Great. I wish I could afford a dedicated, or I guess VPS, so I don’t have to put with this crap.

Update – 05/09/07 – 6 PM – It seems that it was a combination of their db sucking and the fact they got rid of some essential pear packages. WTF?

Update – 05/12/07 – 11 AM – Yup. They cut off my MySQL abilities. I can’t connect to any of my databases on xrho.com. This site is fine however. I guess inserting 100+ entries a minute might have annoyed them?

Update – 05/17/07 – 7 PM – The MySQL abilities are still cut off. Fucking netfirms. Also, it seems in one of my updates, it cut off the bottom, which also happened to include the download links. You can download a ZIP or Gzip of the files. Since I’m having problems with that, feel free to download them and run them on your own site. Let me know if you do so I can add the link.

Demos of most of the scripts are available here, and more specifically:

Due to the length of this post, I’m splitting it. I hate making people click through, but it’s long enough to constitute it.
Continue reading “Fun with Digg’s API”

Netfirms Friendly Url Fix

So I was searching around for Netfirms plus some other terms and happened across this nice thread. The third to last post shows a nice, simple fix for it, just edit your .htaccess file with this code:

# BEGIN WordPress
<IfModule mod_rewrite.c%gt;
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !index.php
RewriteRule (.*) /index.php/$1 [L]
# END WordPress

It just works perfectly.