A Simple Clock using DS1307 and PIC16F877A
Even I have posted about “DS1307 + PIC16F877A“, I didn’t have chance to make a real prototype of the clock. I have done only on the simulation software.
Today, I have received a comment about that post. ah_bear followed my code and schematic on that post but the clock didn’t work. This is because the code on that post is for reading time from DS1307 so there must be some values in the DS1307 before you can read. The solution is simple. Just place setting time codes before reading codes.
This time, I have made a real prototype to confirm that it’s working. There is no setting buttons. If you want to make a real usable clock you have to implement the button interfaces (I may make one and post it here). The photo of my working prototype is featured below. Please check out my flikr at http://flickr.com/photos/punkky/ for more photos.
The source code:
//Sample code for //DS1307 RTC Interfacing with PIC16F877A //Coded by [email protected] //Compiler: mikroC 8.0.0 //http://picnote.blogspot.com //05/01/2009 //Use with your own risk unsigned short read_ds1307(unsigned short address ); void write_ds1307(unsigned short address,unsigned short w_data); unsigned short sec; unsigned short minute; unsigned short hour; unsigned short day; unsigned short date; unsigned short month; unsigned short year; unsigned short data; char time; char ddate;
For more detail: A Simple Clock using DS1307 and PIC16F877A
Current Project / Post can also be found using:
- ds1307 pic16f
- DS1307 with Pic