DS1307, a 64 x 8, Serial, I2C Real-Time Clock, is a low-power, full binary-coded decimal (BCD) clock/calendar plus 56 bytes of NV SRAM. Address and data are transferred serially through an I2C, bidirectional bus. The clock/calendar provides seconds, minutes,
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEinP41m87-FrQZRDGI7sVropnunaapFdsdszDmlJhGn27ImxrGEGzdBQBMoJWvGbyc6QdClFDcMA3zs2CQ0gr5i1BjfhJAaSi96V1rQhu63VXZgIyfVc-eQAYGpX5KTJCtNF50i7Fpgv0qu/s200/ds1307.jpg)
This is an example how to interface DS1307 with 8051. I use SDCC as C Compiler. My schematic is shown below.
![](http://photos1.blogger.com/blogger2/6318/140895695436202/320/ds1307.png)
Schematic: 8051 interface to DS1307
Datasheet
- DS1307 [pdf]
- DS1307 [pdf]
Source Code (For SDCC)
- ds1307.h
- test_ds1307.c
Note: require lcd.h and i2c.h
- ds1307.h
- test_ds1307.c
Note: require lcd.h and i2c.h
Related Links
- DS1307 Products Page
- Interfacing I2C RTC (DS1307) with MCS-51 (KEIL C51)
- DS1307 Products Page
- Interfacing I2C RTC (DS1307) with MCS-51 (KEIL C51)
No comments:
Post a Comment