Writing a code for an analoge clock may seem a bit of a daunting task. Especially the calculations for the positions of the hands, but it isn't really that hard at all.

In this instructable I will talk a little bit about the theory and then we'll move on to the actual code itself. This was just a project build on the breadboard, while building my wifi radio. It started life as the script for a grafical volume button and ended up as a clock that never made it in the final project but it might come in handy for one of you out there.

My code will be written in Bascom but it will be very easy to translate it into your favorite language once you understand the theory.

Step 1: What Do We Need?

For this instructable, you'll need:

A breadboard
An Atmega16
A grapic LCD (240*128)
A DS1307 Realtime Clock
A 32.768kHz quartz crystal
A 3V battery + holder
Two 4K7 resistors
Two 1K5 resistors
Two pushbuttons
A 10K potentiometer
Your favorite programmer

thanks i have an old TFT can this work on it
Sure, you'll only need to find a way to drive your TFT.
Hi janw,<br><br>Nice DIY, congratulations.<br><br>My suggestion to improvement:<br>Each 12 minutes you need to increase the hour pointer.<br><br>I did an analog clock fews year ago (~ 12 years), but I didn't improve its visual:<br>https://acassis.wordpress.com/2009/03/29/nostagia-ponto-com/<br><br>BR,<br><br>Alan
good idea indeed. <br> <br>I will work on it

About This Instructable




Bio: I'm mainly interested in music, food and electronics but I like to read and learn about a lot more than that.
More by janw:Pickled Chillies Extra hot sriracha sauce (Mme Jeanette) Build a Nest Box for Bumblebees 
Add instructable to: