Pages: [1]   Go Down
Author Topic: an idea..  (Read 947 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 14
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
Logged

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 331
Posts: 16564
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
« Last Edit: April 14, 2010, 01:52:58 am by retrolefty » Logged

Lancashire, UK
Offline Offline
Edison Member
*
Karma: 8
Posts: 1992
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged


Lancashire, UK
Offline Offline
Edison Member
*
Karma: 8
Posts: 1992
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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).  
Logged


Boston, MA
Offline Offline
Edison Member
*
Karma: 0
Posts: 1024
wiblocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged


Central Indiana, USA
Offline Offline
Full Member
***
Karma: 0
Posts: 202
So many projects, so little time...and money!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Pages: [1]   Go Up
Jump to: