Real Time Clock(How to interface DS1307 RTC to pic18f452 microcontroller)
on
Get link
Facebook
X
Pinterest
Email
Other Apps
Welcome to you,
Here I am designed a Real Time Clock using a PIC18F452 microcontroller.
I will explain how to design the 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 the 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 the I2C bus.
Construction
Fig.1
Fig. 2
Fig. 3
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 the same as shown in Fig. 3.
I used the PIC18F452 Development Board which I designed a 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 16x2 is interfaced in the following way.
PIN OF LCD PIN OF PIC18F452
D7 - RD7
D6 - RD6
D5 - RD5
D4 - RD4
RS - RB5
RW - RB4
E - RB3
Working Video
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.
Comments