Real TIme Clock Using PIC18F452

Summary of Real TIme Clock Using PIC18F452


This article describes the design and implementation of a Real Time Clock (RTC) using the PIC18F452 microcontroller. The project utilizes the DS1307 RTC IC, which communicates via the I2C bus integrated on the PIC18F452. The RTC data is displayed on a 16x2 LCD. The design includes specific pin connections for the I2C lines and LCD interface. The project is developed using MPLAB IDE and the C18 compiler, with code programming done via PICKIT 2.

Parts used in the Real Time Clock Using PIC18F452:

  • DS1307 RTC IC
  • PIC18F452 microcontroller
  • PIC18F452 Development Board
  • 16x2 LCD display
  • Breadboard
  • Connecting wires
  • PICKIT 2 programmer

Welcome to you . Here i am designed a Real Time Clock using PIC18F452 microcontroller.I will explain how to design Real Time Clock using PIC microcontroller.RTC Using PIC18F452

PIC is advance microcontroller series. In PIC microcontroller I2C(Inter-Integrated Circuit) Bus is available on board. RTC used in this project is DS1307 which needed I2C interface to read and write data from and to RTC. Because I2C bus is on board in PIC microcontroller Interfacing becomes easy. There will no need to write separate code for I2C bus.

Components Required:

  1. DS1307
  2. PIC18F Development board
  3. breadboard
  4. connecting wires
  5. 16×2 LCD

Step 1: Construction

The circuit is designed in two separate parts. Fig. 1 Shows the RTC DS 1307 IC connection. This connection is done by using zero PCB. The connection is same as shown in Fig. 3.

I used PIC18F452 Development Board which i designed few months ago using Screen print technique for pcb design. The SCL pin of RTC is connected to pin 18 and SDA pin is connected to pin 23 of PIC microcontroller. LCD 16×2 is interfaced in following way.

PIN OF LCD PIN OF PIC18F452

  • D7 – RD7
  • D6 – RD6
  • D5 – RD5
  • D4 – RD4
  • RS – RB5
  • RW – RB4
  • E – RB3

Step 2: Working Video

Step 3: Code


The code is written in MPLAB IDE and C18 compiler is used to to compiler the code. PICKIT 2 is used to burn the code on PIC18F452 IC. Please read the README file which available in the attachment before proceed.

Click here to download this code.

For any query please write at [email protected]

click here to like on facebook

Source: Real TIme Clock Using PIC18F452


About The Author

Muhammad Bilal

I am a highly skilled and motivated individual with a Master's degree in Computer Science. I have extensive experience in technical writing and a deep understanding of SEO practices.

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.