Humble beginnings: how to make an LED flash. The “Hello World” of AVR Micro-controller programming. How difficult can it be? Well, as I found out, there are a lot of concepts needed, but a full set of tools exists.


OS X is a great platform to develop AVR applications.

Software...

So how hard can it be to flash an LED? Well, luckily Tuxgraphics have some pretty good articles, and one of them contains a circuit and with code to do just that.


Keychain...

You’ll need to be comfortable with the OS X Terminal command line, but a full suite of AVR programming and development software exists for the Mac.


I quickly found OSX-AVR, downloaded their latest package, and double clicked the installer. The only addition I needed to make was to manually edit “/usr/share/misc/man.conf” to include the new man file path “/usr/local/man” for the installed programs.


To start, I flashed my AVR circuit with the pre-compiled HEX code using AVRDUDE.

The command I used was:


    avrdude -c stk500v2 -p m8 -P /dev/tty.usbserial-A3000HEf -U flash:w:/Users/mike/Desktop/ledtest.hex


Perfect! It worked! How easy was that?


“ls /dev/tty.*” to find the TTY device name of the programmer.


Comments Widget

I’ll update this page soon!