Arduino Duemilanove

Lately I spent a lot of time developing drivers and other software for ARM-based systems running Linux. ARM is a very comfortable platform — megabytes of RAM, megabytes of Flash, Linux with glibc, bash and all those user friendly goodies. Not far from the Linux most of you know from your servers and desktops. ARM is actually so comfortable that it’s a bit boring.

I felt it was time to dive a bit deeper into the embedded waters and got hold of an Arduino Duemilanove board with Atmel AVR ATmega328P CPU micro-controller. See how it compares with ARM:

ArchitectureARMAVR
VendorSamsungAtmel
ModelS3C2410ATmega328P
Clock266MHz16MHz
Flash32MB32kB
RAM32MB2kB
Operating SystemLinuxwhat?!

In order to build binaries for AVR CPUs you need an AVR C/C++ cross-compiler called avr-gcc. If you are an OpenSUSE user (like I am) first of all add a package repository CrossToolchain:AVR using YaST or Zypper and then install cross-avr-gcc43 package from there. The cross-avr-gcc package that is available in the default OpenSUSE 11.0/11.1 OSS repositories is too old and doesn’t have support for Atmel ATmega328P cores. Users of other distributions will have to find the cross compiler packages in their respective package repositories.

Arduino with 7-segment display on a breadboard
Arduino with 7-segment LED display and shift-register on a breadboard.

The Arduino project provides a nice free IDE for Linux, Mac OS-X and Windows that you can use to build programs for these boards. Installation is straightforward — simply unpack the distribution tarball to /opt/arduino-0017 (for Arduino IDE v17) and run ./arduino executable from there. You will be presented with a simple editor where you can develop your programs in C++ (although for some reason the files’ extension will be .pde instead of a more common .cpp). When you’re done compile and upload your project with a single mouse click.

Arduino IDE
Arduino IDE — program (aka sketch) uploaded to the board

The microcontroller equivalent of a Hello world is usually blinking a LED. Arduinos usually come with a LED attached to their pin 13 and the above shown sketch (which means program in Arduino IDE terminology) does just that. First steps with microcontrollers can hardly be any simpler.

Add post to: Delicious Reddit Slashdot Digg Technorati Google
(already: 2) Comment post

Comments

dress 6.09.2010 21:29

Best canon Coffee Mugs! Funny, Cute, & Humorous Unique designs. Also find Travel Mugs, Coffee Cups also, or Create Photo Personalized Mugs & Drinkware

Required. 30 chars of fewer.

Required.

captcha image Please, enter symbols, which you see on the image

Comment post