Copyright Brian Starkey 2012-2014
Valid HTML 4.01 Transitional

Valid CSS!
iconLED Watchmax, min, close
Watch on BreadboardWatch on Breadboard
The main component of this project was the 7*5 LED array. I had a few of these lying around, salvaged from scrap getting thrown out of a lab.
I also had just bought a USBasp AVR programmer from China and some lovely new chips to program with it - some real power compared to the Picaxe chips I had been using prior to this. Check them out if you haven't already, they make a great easy introduction to microcontrollers, and are a lot cheaper (and less powerful, to boot) than an Arduino :P
Anyway, I diverge. My watch had broken, I had a bunch of parts and some brand new toys to play with. There was obviously only one course of action to take...
The AVR in the picture on the right is the Attiny26L, it is sat in my Attiny26L board, which has a programming header and a socket with extra long legs so it goes into breadboard. Read about it here. The 74164 is redundant, from an older Picaxe based design.

Underside (Wire porn)Underside (Wire porn)
The hardware for the watch consists of only 4 parts - The AVR, the LED matrix, a momentary push switch and a 32.768kHz 'watch' crystal. The screen is a 5*7, anode row LED array, RS Part No. 585-365. This is a discontinued part (non-ROHS), but there are alternatives if you're interested. The anodes are connected to PORTA on the Attiny26L, the cathodes to PORTB. The watch crystal is used as the system clock and the switch is connected to PB6 (INT0). I built the whole thing on a piece of 0.1" spaced stripboard, it's around 25mm*25mm (1"*1"), so all in all quite small and a suitable size for a watch. All the connections are point to point wired underneath with thin solid-core wire. It's not pretty, but I haven't got the facility to etch my own boards and it works just fine!
The power source and housing are yet to be decided - I have had it running on a 3V lithium button cell and attached to a promotional wristband from Wetherspoons, but this was far from an ideal solution! I will probably cast a case from some kind of resin but am currently limited by funds.
Schematic can be found here, if anyone decides to design a board, please let me know; perhaps I could add it here?
I just noticed that one of the connections has broken off (top of the picture, near the middle.) Guess my soldering's not up to scratch :P

The font arrayThe font array
Ok this part could really be improved, please let me off, I got bored with it :-/
The basic idea is simple. Timer1 is pre-scaled, its frequency being CK/128 or 256 ticks per second. This is convenient, it means every time the timer overflows a second has elapsed and tick() is called.
The tick() function turns PORTA off (stops bright spots) and increments seconds/minutes/hours. The numbers are displayed on the LEDs using a 3*5 font, they scroll across right to left in a hh:mm:ss format every time the button is pressed.
The font is stored in PROGMEM as an array of strings.
If you hold the button down, the watch enters 'set' mode, and you can set the time.
The rest of the time, the AVR is put into a low power mode. Source code is here, and the hex here. You need to set the fuses to run off an external watch crystal:
avrdude -p attiny26l -c usbasp -U lfuse:w:0xa9:m -U hfuse:w:0x17:m is the command that works for me.