Shop OBEX P1 Docs P2 Docs Learn Events
Ds1307 rtc — Parallax Forums

Ds1307 rtc

ColtColt Posts: 24
edited 2008-02-05 00:44 in BASIC Stamp
· Having some trouble finding any source code, or documentation for the DS 1307 RTC..· The IC is on a Pro. Dev. Board, with a BS2p stamp.. I can find everything for the DS1302 ( which I have as well ), but I'm not sure if everything is the same for the DS1307.. Just wanted to check so I dont burn anything up, thanks.

Comments

  • phil kennyphil kenny Posts: 233
    edited 2008-02-04 06:51
    Hello Colt

    This link to the StampWorks manual has four examples of DS1307 code:

    http://www.parallax.com/Portals/0/Downloads/docs/books/sw/Web-SW-v2.1.pdf

    Take a look at page 188 and Experiment #33.

    phil
  • ColtColt Posts: 24
    edited 2008-02-04 07:56
    ·· Thanks Phil·wink.gif···· So I'm guessing the pin out·and the command lines ( for lack of better words )·for the·1307 is the same as the 1302? They are both 8 pin chips, but the 1307 is surface mount and the 1302 has dip pins. I wouldnt think anything would be different, but wasnt sure since I didnt have any luck finding data sheets on the 1307..
  • Bruce BatesBruce Bates Posts: 3,045
    edited 2008-02-04 08:07
    Colt -

    You sure couldn't have looked very hard. If you enter "MAXIM DS1307" into even the Yahoo search engine, here's what you get as the first hit:
    http://www.maxim-ic.com/quick_view2.cfm/qv_pk/2688

    Look to the right, and you can download the datasheet from there.

    Regards,

    Bruce Bates

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    There is no pleasure in having nothing to do;
    the fun is in having lots to do, and not doing it!
  • RDL2004RDL2004 Posts: 2,554
    edited 2008-02-04 12:28
    The 1302 has an SPI type interface, the 1307 is I2C. Both are available in either DIP and surface mount. The 1302 has trickle charge circuitry for back-up power. The 1307 has a little more scratch pad RAM.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Rick
  • ZootZoot Posts: 2,227
    edited 2008-02-04 13:56
    The commands and register setups are basically the same, but the DS1307 uses I2C.

    The pinouts and pin functions are NOT EXACTLY THE SAME -- check your datasheet.

    The biggest difference between the two, aside from the SPI vs. I2C interfaceis that the DS1307 does not allow for trickle charging the backup battery or supercap. Also the DS1307 has one pin that can be used to output a reqular square wave frequency (heartbeat). The extra pin is available on the DS1307 because the DS1302 needs 3 pins for SPI; I2C only requires two pins.

    Attached is some code I use for testing a DS1307 -- set time, read time, read/write NVRAM registers, setup heartbeat, etc.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    When the going gets weird, the weird turn pro. -- HST

    1uffakind.com/robots/povBitMapBuilder.php
    1uffakind.com/robots/resistorLadder.php
  • ColtColt Posts: 24
    edited 2008-02-05 00:44
    ··· Bruce, you sound like my dad lol.gif··· I was actually looking on Parallax's site, seeing out the DS1307 is soldered directly on to the board, I figured there would be something here, along with some documentation since they are pretty good about doing that and explaining it in a way a newbie such as myself can understand..· After thought I guess to just google it, but that wouldnt have helped me in knowing if the commands were basicly the same as the DS1302. Figured I'd kill 2 birds with one stone on here...·· Phil sent me some code·that·should get me·on my way·( Thanks Phil smile.gif· )...



    Thanks for everyone's help and explainations smilewinkgrin.gif
Sign In or Register to comment.