hi guys, i want to build an real time clock using ds1307 interfacing with pic16f877a...i think that i will have to use I2C.can u help me out in how to initialize I2C module..i m not able to understand how to configure the registers for I2C? also any suggestion for interfacing would be good too...
First read I2C protocol and datasheet of PIC16F877 its all about there then after understanding the concept of I2C it will become easy for you to write codes for digital clock.
For a short time you can use I2C libraries also which has fully working codes.
Interfacing is quite easy see the link. http://www.sixca.com/micro/pic/ds1307/index.html