« Project - Koi Rebuild: I hate computers. | Main | Status: 2009-07-09 - Project: Seebeck Clock, coming along. »

Project - Seebeck Clock: Tick for me, baby.

So, for the rest of the day, I think I'm going to spend more time on my Seebeck clock project. I've gotten the PWM working using the ATmega8515, the chip that came with my development board. But I really want to be using the ATmega168 which has different timers and what-not. So I think I'm going to spend today porting the code to the ATmega168.

I have the chip working on a high precision 32.768kHz crystal. The PWMs are 8 bit, meaning they can produce a voltage between GND and VCC in 256 steps. The meters only take .1vDC to swing full scale (1mA with a 100ohm coil) so the plan is to use a voltage divider to scale it so that 0 to 240 will do full scale on the meter, meaning that I need the clock to tick 4 times a second (240 ticks / 60 seconds = 4 ticks per second). 4 ticks a second means a tick ever 8192 clock cycles, or conveniently every 32 roll-overs of the PWM counter which will conveniently trigger an interrupt if configured to do so.

This is the next step: configuring the timer roll-over interrupt to "tick" my clock for me. Hopefully, I'll be able to get all of this done today.

Post a comment

(If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)


This page contains a single entry from the blog posted on July 9, 2009 1:45 PM.

The previous post in this blog was Project - Koi Rebuild: I hate computers..

The next post in this blog is Status: 2009-07-09 - Project: Seebeck Clock, coming along..

Many more can be found on the main index page or by looking through the archives.