Pages: [1]   Go Down
Author Topic: Attiny25/45/85 with an rtc DS3231 using the Arduino platform.  (Read 1097 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 20
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Is it posible to accuratly keep track of time using a attiny chip and a real time clock like a DS3231 (http://www.maximintegrated.com/datasheet/index.mvp/id/4627).

The usage would be for example to flash a light every 15mins over long periods of time for months or even years an stay relatively accurate over this period of time.

Many thanks


« Last Edit: March 11, 2013, 04:01:02 pm by 7immy » Logged

Grand Blanc, MI, USA
Offline Offline
Faraday Member
**
Karma: 95
Posts: 4095
CODE is a mass noun and should not be used in the plural or with an indefinite article.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I am aware of this I2C library, have not tried it myself:
http://code.google.com/p/arduino-tiny/wiki/TWIMasterLibrary
Logged

MCP79411/12 RTC ... "One Million Ohms" ATtiny kit ... available at http://www.tindie.com/stores/JChristensen/

Offline Offline
Newbie
*
Karma: 0
Posts: 20
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks for this Jack, that looks very useful! I've been doing a bit more research on this RTC stuff (I'm a bit of a noob)  smiley-confuse and I've found a simular one called DS3234 which is SPI instead?? If someone could kindly enlighten me to what the difference is between I2C and SPI is that would be awesome. Also is this compatible with the attiny chips and the arduino platform.

..and then there's the DS3231m (http://www.maximintegrated.com/datasheet/index.mvp/id/6861) which is the size I'm looking for as its smaller and has less pins but I can't find it anywhere.. this is getting confusing smiley-confuse

any help would be much appreciated smiley
« Last Edit: March 11, 2013, 04:03:38 pm by 7immy » Logged

Grand Blanc, MI, USA
Offline Offline
Faraday Member
**
Karma: 95
Posts: 4095
CODE is a mass noun and should not be used in the plural or with an indefinite article.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I2C and SPI are just two different bus protocols:
http://en.wikipedia.org/wiki/I2c
http://en.wikipedia.org/wiki/Serial_Peripheral_Interface_Bus

Arduino supports both:
http://arduino.cc/en/Reference/Wire
http://arduino.cc/en/Reference/SPI

I2C is also sometimes called TWI (two-wire interface). SPI needs three or four wires usually. Personally I tend to use RTCs with I2C interfaces, but there's nothing wrong with using SPI. The DS3234 is essentially an SPI version of the DS3231 or DS3232, all of which should be available at Mouser or Digikey.
Logged

MCP79411/12 RTC ... "One Million Ohms" ATtiny kit ... available at http://www.tindie.com/stores/JChristensen/

Offline Offline
Newbie
*
Karma: 0
Posts: 20
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thank you much, you're awesome!! smiley-grin I'm learning a lot today! Your links helped in leading me to here:
http://tronixstuff.wordpress.com/2010/10/20/tutorial-arduino-and-the-i2c-bus/
and here
http://tronixstuff.wordpress.com/2011/05/13/tutorial-arduino-and-the-spi-bus/

Which put it all into context for me and now I understand it allllll! smiley

Thanks again!
Logged

Grand Blanc, MI, USA
Offline Offline
Faraday Member
**
Karma: 95
Posts: 4095
CODE is a mass noun and should not be used in the plural or with an indefinite article.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Glad to help a little bit. tronixstuff is a really nice site, I should spend more time there myself.
Logged

MCP79411/12 RTC ... "One Million Ohms" ATtiny kit ... available at http://www.tindie.com/stores/JChristensen/

Pages: [1]   Go Up
Jump to: