Basic Stamp 2 HomeWork and Real Time Clock.

Angela-CurtiAngela-Curti Posts: 44
edited 2016-06-17 - 15:18:58 in Microcontrollers
Hi,

I need to add a real time clock to the Basic Stamp 2 HomeWork . Clock chip: DS3231 .

Do you know if it is compatible ?

It is used for Arduino .

ACur.

Comments

  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2016-06-17 - 16:43:13
    The DS3231 has an I2C interface. It is possible. You may want to look at existing examples that use the BS2 with the DS1307 for guidance.

    Also, see this thread: http://forums.parallax.com/discussion/151044/1-65-real-time-clock-i2c

    Here's something on the BS2/DS1307 that may help: http://www.sfu.ca/phys/430/Lab6.pdf
    Chris Savage | Engineering Tech | Main Office: (916) 624-8333 | Direct to Tech Support: (888) 997-8267 | Website | Twitter | Google+
  • Thanks ,

    It seems DS1307 has I2C interface too.

    I read that the is better than DS1307.

    It seems has DS3231 more accuracy.

  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    Correct, but since there doesn't appear to be any code written for the DS3231, you can use the DS1307 code to see how to communicate over I2C. You'll probably need to change some things like the slave address and register addresses. You may have to add/subtract functions. But having the DS1307 code to work from saves you starting from scratch. :nerd:
    Chris Savage | Engineering Tech | Main Office: (916) 624-8333 | Direct to Tech Support: (888) 997-8267 | Website | Twitter | Google+
  • tomcrawfordtomcrawford Posts: 1,046
    edited 2016-06-17 - 20:52:37
    The DS3231 is basically a DS3232 without RAM. There are a number of DS3232 programs including (ahem) this one.

    Edit: My Bad. Wrong parallax chip. Search for ds3232 stamp.
    Re-inventing the wheel is not a waste of time if, when you are done, you understand why it is round.
Sign In or Register to comment.