Go Down

Topic: [Advice needed] Building a small BCD clock. (Read 3 times) previous topic - next topic

Msquare

I tried something with using millis() to run a clock. That had a longterm drift (a minute or so every day). That was with an (older) Arduino with a crystals - the newers ones have something else that is not as regular.

Get an RTC chip, maybe on on a breakoutboard w/battery, and use it. (I dont know if you can get something that will interface easily with the ATTiny). By the way, I could set the 24 hour clock using just one push button (and some patientence)

iDroid

Okay, I'll try to get one of those in my hands.

Well patience... doesn't quite belong in my vocabulary. Besides, it isn't very convenient if you have room for two buttons. I'll be setting the time in the code anyway before I upload it. I'm adding the button mainly for demonstration.

Msquare

You will need to (re)set the time sometime. Daylightsaving f.ex. Or a powerloss, battery change. The "patience" was that my little onebutton algorithm involved waiting for a few secs for it to advance to the next digit and entering 9 required - yes, nine pushes.

Jack Christensen


The reference page says that this millis() function overflows after approximately 50 days, how badly does this affect the clocks accuracy?


Not at all. Search the forum, discussions on why this is not a problem constitute approximately 42% of the posts on the forum  ;)
MCP79411/12 RTC ... "One Million Ohms" ATtiny kit ... available at http://www.tindie.com/stores/JChristensen/

iDroid


You will need to (re)set the time sometime. Daylightsaving f.ex. Or a powerloss, battery change. The "patience" was that my little onebutton algorithm involved waiting for a few secs for it to advance to the next digit and entering 9 required - yes, nine pushes.


Oh, I thought you meant pushing the minute button 60 times to advance one hour :D
Well, that's convenient enough. May I ask how did you do it?



The reference page says that this millis() function overflows after approximately 50 days, how badly does this affect the clocks accuracy?


Not at all. Search the forum, discussions on why this is not a problem constitute approximately 42% of the posts on the forum  ;)


Okay, thanks!


Go Up