- I've successfully ported my code to the ATmega168. Mainly just involved changing a bunch of register names for the Timer control stuff, and adjusting what pins the PWM output is on.
- The ATmega168 has two 8 bit timers (TC0 and TC2) and a 16 bit timer (TC1). All three timers have 2 PWM modules available. I ended up using TC0 and TC2 for the three PWMs (with one to spare!) and am using TC1 as a clock tick source; by having a 16 bit counter, I can actually count 8192 clock cycles for every tick instead of counting 256 clock cycles 32 times for every tick.
- Started looking into interrupts and ISRs with avr-gcc. By the time I got to writing code, I had to take Cindy to a doctor's appointment and haven't made it back yet. This is what I'll work on next time I get a chance.
All things considered, I'm very happy with how this is all going. Once I get the hang of things, I think I'm going to like programming micro controllers in C instead of assembly. :-D For now, it's time for bed. G'night everyone. Be good humans.
-Mark
Comments (2)
Yes, you're right. I don't understand any of this. But it still sounds kinda awesome.
Posted by Shawno | July 12, 2009 9:27 PM
Posted on July 12, 2009 21:27
Heheh. All you need to know is that it is a clock made from analog panel meters: http://twitpic.com/3ek95 Eventually, it will be powered by a candle. Yes, that's right, a candle. :-D
Posted by Mark | July 12, 2009 11:31 PM
Posted on July 12, 2009 23:31