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!