Hello I’m learning Arduino and found it very interesting. I built a real clock timer. The clock display looks perfect but my problem is TIMING. I used TimerOne library. Here are some parts of my code:

#include <TimerOne.h>

Timer1.initialize(1000000); // 1000000 usec timing

void run_Clock(void)

The clock displays seconds, minutes and hours in 12-hour format and 24-hour format. I let it run but it’s quite slow. After few hours my arduino timer is late of few seconds. Can anybody help me with this please… Thanks a lot.

Here are some parts of my code:

Here's some part of my answer: post all of your code. In code tags. And don't hijack unrelated threads.

Why don’t you use a Real Time clock?
Look you can take out the IC and build your won connected to the arduino : ) or just use it as it gets to you.
Then you’ll have time, date and some bytes of memory for storage : ) and since it runs with a battery, you’ll never lose your time setup… cool, no?

but my problem is TIMING.

The forum gets this question every so often... For example:

Essentially, while the Arduino has a reasonably accurate resonator, it is not as accurate as a precision quartz/watch crystal. For under $20, you can add a very accurate time base:

For constant year in, year out accuracy there are solutions that include GPS or Internet Time Servers. My clock:


mrburnette: My clock:

Where do you get your Chinese parts? Ebay?


mrburnette: My clock:

Where do you get your Chinese parts? Ebay?

Dude the hyperlinks in the Build lists on that link has all the sources... both U.S. and China... Repeated here for completeness: Display: OR (different pinout, same controller)

Pro Mini OR


Oh, sorry, i didn't notice it was clickable :roll_eyes: