3 Simple Ways to
Share What You Make

With Instructables you can share what you make with the world — and tap into an ever-growing community of creative experts.

PhotosPhotos

Share one or more photos of a project, recipe, or whatever you've made, quickly and easily.

Step by StepStep-By-Step

Share your step-by-step photos with text instructions of what you made so others can do it too!

VideoVideo

Share your how-to video. You'll need your embed code from a video site such as YouTube.

ATTiny2313 Multi-mode LED Matrix Clock

ATTiny2313 Multi-mode LED Matrix Clock

this is a mutli-mode clock project based on attiny2313. it employs a 8x8 led matrix as display. with the limited resolution, this 12 hour clock shows time in 6 different modes.

the circuit employs row and column multiplexing to drive the leds, one row at a time, this gives a 12.5% duty cycle when "sets" of leds (8 of them in each of the 8 rows) are turn on briefly. current limiting resistors are eliminated to save breadboard estate and as we are not constantly driving individual leds, they are not going to be damaged.

the control (user interface) is also arranged so that we only use one tactile button for input. the firmware capture long button presses (press and hold) for menu rotation and normal button presses for menu selection.

this is a hobby project and the clock is only as accurate as your internal oscillator calibration. i had not use a crystal in this project as doing so will upset the "matrix on top of mcu" breadboard layout. a crystal can be used to increase accuracy on a alternate breadboard layout (or pcb). with software compensation, i can achieve may be within 2 minutes off a day. i would need to adjust the time every 3 or 4 days to keep it usable. this is more a cubicle talk piece than a swiss time piece.


Below is video on full construction








 
Remove these adsRemove these ads by Signing Up
 

Step 1Display Modes

Display Modes
«
  • mclock04.jpg
  • mclock05.jpg
  • mclock06.jpg
  • mclock07.jpg


hhmm mode (see attached image 1) , typical hours plus minutes scrolling digits with colon separator.

seconds mode, shows only seconds.

tix mode (see attached image 2), led matrix is divided into quadrant, the upper quadrants shows the hour in bcd (binary coded decimal) values. they are represented by the number of dots to indicate the digits. the lower quadrants show the minute in bcd. i.e. for 9:36 it shows no dot + 9 dots on the upper half and 3 dots + 6 dots on the lower half.

dice mode (see attached image 3), the led matrix is divided into two set of 'dices'. with the upper pair showing hour from 1 - 12, the lower pair of dice shows minutes in 5 minute increments. i.e. for 9:45 it shows dice value 9 (upper) + 9 (lower) (9 x 5 min).

binary mode (bcd, see attached image 4), the hour, minute and second digits are show as binary dot on different rows in the led matrix. the rows 0 and 1 (from top) represents the hour digits, rows 2 is blanked, row 3 and 4 represent the minute digits, row 5 is blanked, row 6 and 7 represents the second digits.


« Previous StepDownload PDFView All StepsNext Step »
10 comments
Apr 26, 2011. 10:07 AMhatschel says:
Hi Simpleavr
thanks for comment.I have load the .hexfile and i think it was start in Binarymode
Unfortunately,the tiny was burned in a few moments I had thought that leds are low current type´s but it was not so what !
Is not so bad but i only have other µc´s like mega48 ,mega 8,16 and 32´s
Is there a way to run the code on e.g mega48?

Otherwise coole Sache especially the binary mode

best regards
Apr 25, 2011. 1:55 PMhatschel says:

Hi a!
I got the error
make.exe: *** No rule to make target `program'. Stop.

there created:
mclock.o
mclock.map

how i can make a .hex file?

a other case is where the resistors? are there inbuild the Module?
i have made a 8x8Matrix with 3mm Led´s.
So i think i need 300-400 Ohms resistors
Apr 25, 2011. 3:02 PMhatschel says:
i also get make.exe mclock.elf Error1
don´t know what this means
can you plz upload a file that i can flash?
I have the stk500 and the avr910 programmers
Nov 17, 2010. 12:18 PMMakeman says:
Hello.Canou make a instructable about the usb programmer plz.
Mar 27, 2011. 2:44 PMCabbages and Kings says:
http://www.instructables.com/id/VUSBTiny-AVR-SPI-Programmer/
Dec 28, 2010. 1:59 AMeduman says:
This project can not be used as a clock...It's Always stay back !

Pro

Get More Out of Instructables

Already have an Account?

close

All Steps Viewing
View all steps of an Instructable on the same page when you're a Pro Member.

Upgrade to Pro today!
22
Followers
5
Author:simpleavr