Wednesday, November 2, 2011

AVR Dude

I've not been around for a bit, so I thought I would drop in some posts as to what I've been up to. As for the HAL project, HAL isn't up and running, I blew the 3.3v regulator on the Bus Pirate at some point when I was updating it to version 4.1. Undaunted I tried something else. I decided I needed to slip into a shallower end of the pool, and ordered 10 attiny13s. Yes ten. I found some good 'make the light flash' hex file and set about to dropping it into the chip. I also ordered (from my friends at Sparkfun) the pocket AVR programmer. I plugged the programmer into the computer, plugged the chip into the programmer and SHZAM! it worked!   Yea right.

The System is based around a series of programs called AVR Dude. And simply installing AVR Dude isn't enough. What I did was I installed the newest version of WinAVR (comes with AVR Dude, as well as programmer's notepad) now this is all command line stuff at this point, and requires the ability to use a makefile. I'm no Guru and there are most definitely more elegant ways to get the job done, but here's the pudding.

 
I make the light blink!

So that's the uC version of hello world. remember your 330k resistor. The chip is one of the attiny13s and FYI I had to define my usb port weird, 'avrdude -c usbtiny -p attiny13 -P #port_#0001.Hub_#005 -U flash:w:test1.hex' I would do a post as to how exactly I got it to work, but honestly I'm not bloody sure.

No comments:

Post a Comment