March 2008 Archives
Reading Bill Bumgarner’s latest posts on Atmel AVRs got me interested in AVR development, again. I’ve done a fair amount of microcontroller hacking in the past, and I bought an STK500 when they went on sale last year for $50 (plus a free AVR Dragon). Unfortunately, I never even bothered to power it up! Reading his posts finally got me motivated to setup an AVR development environment on my Mac.
One downside to the STK500 is that it typically requires a serial port to program the chips. This is especially problematic for Macs, as they haven’t shipped with a serial port in a long time. Yeah, you can buy USB to RS-232 adapters, but that’s a bit clunky. The supported programming software (AVR Studio) only runs on Windows, as well.
One the upside, AVRs support low-voltage in-system programming (ISP) using a standard 6- or 10-pin header. The STK500 also has these headers, so theoretically any ISP programmer should work.
ISP programming is superior to programming over RS-232 since it’s much more versatile, anyways. AVR ISP doesn’t require a high voltage or sacrificing of any I/O pins, and you can put a 6-pin ISP header on your own custom hardware very easily. This allows you to reprogram your chips without having to pull them out and into a special-purpose programmer. So if I could get ISP and the STK500 to work together, this would be an ideal setup.
I couldn’t find a lot of information about using ISP programmers and the STK500 (most people probably just use the serial port), but it turns out, you can program chips on the STK500 over ISP, even on a Mac, just fine. Read on for the details.
As part of my Daring Furball project, I needed a LOLspeak translation dictionary. I’ve finally pushed out a 1.0 release and setup a project page. The dictionary itself is just a big YAML file. However, there’s Ruby code to translate whole strings as well as the text portions of an XML document. The Ruby code (which comes with the dictionary) is available as a gem under the
lolspeak project. To install it, simply use the
% sudo gem install lolspeak
It’s pure Ruby code, so this should run on any Ruby-supported platform (though I’ve only tested on OS X and Linux). The main API you’ll use is the extension to the String class:
"Hi cat".to_lolspeak -> "oh hai kitteh"