2009-10-31

Atmega8515 cylon light

Flashing
I finally started trying out the ATMEGA8515 chips I got for a very reasonable price (at least by .fi standards). It's been a typical bit by bit process bootstrapping s development system. I've eventually ended up with a bsd style programming cable, a series resistor module, PSU, breadboard, MCU and wires. The pile of interesting stuff just waiting for me to have some working controllers to poke them with has been growing steadily in the background.

Flashing (the dark side)
Software side is trivial, since Debian has the kit available and integrated. It also happens to run on a computer that has a real parallel port, so it's a handy choice. I'm somewhat familiar with AVR style C and I like parts of it and parts I don't. AVR's interrupts and the gcc/libc api for them are still one feature I'm pretty hazy on.

I finally ran into a nice tutorial on the timer system. It won't go through everything but that's what datasheets are for. Instead, it walks through creating various blinkers in different ways using delays and timers. In the end I had a running cylon light using a timer interrupt and an ISR that counts up and down plus an endless loop that writes the result to a GPIO port, lighting one LED at a time.

No comments: