In this tutorial we'll see, how to interface RTC with PIC18F4520 Starter board. For this we will be using RTC breakout which has DS1307 RTC on it. For basics of RTC just have a look at our Real Time Clock(DS1307) with AVR tutorial.


Prerequisites

Please check this tutorial for detailed explanation on DS1307 RTC.


Hookup

Starter PIC board has facility to connect LCD, we will be using 16x2 LCD for displaying the data and time.
The DS1307 RTC module will be connected I2C(SCL-RC.3,SDA-RC.4) pins of Starter board as shown in below image.


Code

Demo

00Interface RTC with Atmega128.gif

Downloads

Download the complete project folder from the below link:


Have a opinion, suggestion , question or feedback about the article let it out here!