Binary clock with multiplexing question

Hi, everyone, i'm newbe to Arduino.

I'm building a binary clock powered by an arduino uno, similar to this one;

"http://www.instructables.com/id/Cwik-Clock-v10-An-Arduino-Binary-Clock/?ALLSTEPS"

I couldn't find an analog meter for the seconds so they will be displayed by leds as well. The clock will have a 6X3 led display that is going to be multiplexed, two 10k? potentiometers to adjust the hours and minutes and the SPDT switch to enable the set mode.

Now from what I've read I understand that with multiplex only one led can be lit at a time, so I need to cycle thru every led I want to be lighted at the time fast. So if my arduino was to do that, it wouldn't be able to do anything else (such as keeping track of the time that passes by, updating the leds that need to be lit etc.)! Correct me if I'm wrong.

So here's the question; How do I do it? Is it able with an ISR? If yes how (I haven't used interrupts yet)? Looking for a solution I found out about the MAX72XX IC, could that be used successfully for my case?

Thanks in advance!

Correct me if I'm wrong.

You are wrong.

Have a look at this:-
http://www.thebox.myzen.co.uk/Workshop/LED_Matrix.html

Tolis95:
Now from what I've read I understand that with multiplex only one led can be lit at a time, so I need to cycle thru every led I want to be lighted at the time fast. So if my arduino was to do that, it wouldn't be able to do anything else (such as keeping track of the time that passes by, updating the leds that need to be lit etc.)! Correct me if I'm wrong.

Wrong on just so many counts!

  • This is a microcontroller that you are using. It can perform millions of operations every second. The processor - the code - should never be waiting on a single event or else you have written bad code. Proper code runs through the "loop()" continuously, generally thousands of times per second, each time testing or "polling" for events that occur and dealing with each event either instantly, or performing whatever step in that particular process is necessary to advance to the next event, and immediately moving on to the next process. Often that event is a time which may have passed, assessed by looking at the current "clock" ("millis()" or sometimes "micros()") and comparing it to the appointed time. So when any LED - or group thereof - is turned on, the program sets the time for it to next be changed (moving to the next row) and goes on to the next process.

  • Multiplexing reduces an array of LEDs to a set of rows in which one row at a time, the individual LEDs - however many need to be illuminated - are all lit for the given multiplex time, after which those appropriate in the next row for the same length of time and so on, repeating indefinitely.

  • The MAX7219 is generally the best way to do this (up to eight rows and eight columns of individual LEDs - RGB LEDs would each occupy three rows or columns or RG LEDs, two) as it performs all the multiplexing and all the current control for you using only a single resistor, and is interfaced to the Arduino with only three wires (even for a number of MAX7219 chips.)

  • Finally, as a "newbie" to Arduino, you should completely forget about interrupts. Some will be working for you in the various libraries, but the requirement to use them - and the complexities involved - are quite unlikely to ever cross your path. You can easily be misled and thoroughly confused by tutorials and "instructables" inappropriately suggesting their use.