Ds1307 rtc
Colt
Posts: 24
· 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
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
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!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- Rick
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
Thanks for everyone's help and explainations