Go Down

Topic: an idea.. (Read 1 time) previous topic - next topic

conanim

To make a serial enabled clock is a good idea, but whenever you close the serial connection, the board seems to 'reset'  thus loosing data, unless it is stored in EEPROM.
Could the Arduino have some sort or time keeping function, or a shield for this?

Or is this an invalid idea?

retrolefty

#1
Apr 14, 2010, 08:52 am Last Edit: Apr 14, 2010, 08:52 am by retrolefty Reason: 1
A lot of people needing real time clock/calendar functions either build or buy one based on the DS-1307 I2C RTC chip. Here is a commercial version:

http://www.seeedstudio.com/depot/electronic-brick-real-time-clock-moduleds1307-p-491.html?cPath=48_59&zenid=9f6118c193cee9f8b7337d4df91a2eca

Also pretty easy to build your own on a protoshield board.

Lefty

pluggy

The arduino resetting is normal, its the tradeoff for the conveinece of the auto-reset used when uploading a sketch.  Its Possible to hardware disable it (which also stops the auto reset working) and usually possible at the PC end to stop it toggling the DTR connection in software which then means the board doesn't reset.  How its achieved on your particular setup will vary.  Googling "Arduino disable auto-reset" and your operating system / application should yield some clues.
http://pluggy.is-a-geek.com/index.html

pluggy

Incidentally, the seeed version of the Arduino has an on-board switch to disable auto-reset. Seeing retrolefty's post reminded me (Since he's a big Seeed fan).  
http://pluggy.is-a-geek.com/index.html

jluciani

I have been using the DS1337 on my boards. Very similar ot the DS1307 but has two
interrupt outputs.

Information on my boards and clock example code is at http://wiblocks.luciani.org/NB1/NB1A-index.html

(* jcl *)

------------------------------------
www: http://www.wiblocks.com
twitter: http://twitter.com/wiblocks
blog: http://luciani.org
www: http://www.wiblocks.com
twitter: http://twitter.com/wiblocks

flyboy

I installed a DS1307 on my home-made lcd/button shield.  I used a DIP switch to enable and disable the power and comm lines to the clock if I decide to use the outputs for another project.  The battery keeps the clock going and I can easily change the DIP switches and upload the clock sketch any time I wish to use the clock again.

You can get a DS1307 from Maxim as a sample from their website.  That's how I got mine.  I scavenged a battery holder from an old computer mother board and the crystal from an old watch.  My only cost was my time.

Go Up