ATTiny2313 Multi-mode LED Matrix Clock

This is a mutli-mode clock project based on attiny2313. it employs a 8×8 led matrix as display. with the limited resolution, this 12 hour clock shows time in 6 different modes.
ATTiny2313 Multi-mode LED Matrix Clock
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

Step 2:Features and Parts

Features-and-Parts
features
* minimal components, 3 parts
* battery operated from 3V to 5V
* use of watchdog timer to keep time, power-down sleep mode takes about 1uA power
* calibration allow setup of seconds to gain for each hour
* this is a 12H clock, not 24H and has no AM/PM indicator
* not very accurate, planning to add RTC chip
parts list
* attiny2313v (v is low power version that works with 3V)
* 8×8 LED matrix display (red works best on 3V power)
* tactile button
led matrix pinout
the 8×8 led matrix has dot size of 1.9mm and is of common cathode, if you have common anode type, you can change a few lines in the code for adoption. see the following diagram and see if you have the right pin-outs. it appears they are quite common and if you purchase via ebay most suppliers have the same pin-out even if the model number is different.
. . . . . C8 C7 R2 C1 R4 C6 C4 R1 . . . . top row of pins (C is column, R is row)
. . . . . R5 R7 C2 C3 R8 C5 R6 R3 . . . . bottom row of pins
the 8×8 led matrix has dot size of 1.9mm and is of common cathode, if you have common anode type, you can change a few lines in the code for adoption. see the following diagram and see if you have the right pin-outs. it appears they are quite common and if you purchase via ebay most suppliers have the same pin-out even if the model number is different.
For more details, click: ATTiny2313 Multi-mode LED Matrix Clock

About The Author

Ibrar Ayyub

Ibrar Ayyub is an experienced technical writer with a Master's degree in computer science from BZU Multan University. He has written for various industries, mainly home automation, and engineering. He has a clear and simple writing style and is skilled in using infographics and diagrams. He is a great researcher and is able to present information in a well-organized and logical manner.

Scroll to Top