Make Arduino Duemilanova run NerdKits C code

Just got a NerdKit, and although it was fun to put the it all together
and make it work, I like stable power and comms, so I also just bought
a Duemilanova to play with too.

But, also not liking IDE programming, much less dirty code that has
“wiring” in it, I thought it might be nice to run NerdKit C code on
the 328p in the Duemilanova.

Following the simple instructions from the pdf in the ATmega328P
Upgrade Nano-Guide
 gets you most of the way.

In the C code file you’re writing change the CPU speed definition from

#define F_CPU 14745600 // for NerdKit

to

#define F_CPU 16000000 // for Duemilanova

To make avrdude work these parameters are needed for the make file:

AVRDUDEFLAGS=-c stk500v1 -p m328p -b 57600 -P /dev/ttyUSB0

Press the “S1” button on the board simultaneously with your `make` or
`avrdude` command

It works. That’s all!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s