PIC and DS1307

Status
Not open for further replies.

huanyong

New Member
i am doing a clock project using DS1307 interfacing with PIC now. I have read throught DS1307 manual but can understand well especially about the SPI. anyone have experience ?
 
You did mean I2C-bus.
I have done some experiments with 16f628 & DS1307. Software is still very much on a "beta" stage, but hopefully I can get it in use some day.

If you are not familiar with I2C-bus then it might be good to dig in that first. at least get the basics of it.
Here's a web site I found useful for trying to understand I2C-bus commands and their use.
https://www.esacademy.com/faq/i2c/

I2C bus events at least is worth reading.

Naturally it depends a lot which programming language you are using. I have been using assembler and I have built most of the bus commands from scratch.
If you use C-language I think you can find I2C-bus functions ready from the software. Then you probably only need to learn the principles of I2C-bus operation to get started.

In DS1307 there is this nice feature. DS1307 can be set to give an output on one pin for example once every second. If you then connect a led (with resistor naturally) on that pin, you can have a visual confirmation that you have succesfully managed to write in DS1307's control register. If you get what I mean.

My application with DS1307 consist of 16F628, DS1307 and LCD display. It's stage today is that it displays time and date on a LCD, and you can set time/date with few buttons. As I already mentioned software is very immature, so bugs and faults still needs some work among other things.

So if you can specify what sort of help you need, I can try to give some assistance.
 
Also time time is stored in BCD format.. There are many of us here that can help you with this.... Also the DS1306 is an SPI device if you are happier with SPI
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…