Real Time Clock(How to interface DS1307 RTC to AT89S52 microcontroller)



          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. 2.
          I used AT89s52 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  P1.1 and SDA  pin is connected to pin P1.0 of 89s52 microcontroller. LCD 16x2 is interfaced in the following way.

PIN OF LCD       PIN OF AT89s52
           D7          -    P3.7
           D6          -    P3.6
           D5          -    P3.5
           D4          -    P3.4
           RS          -   P1. 6
           RW         -   P1. 5
           E            -    P1.4

Working Video


The program is designed in Keil uvision 5 software. Separate library files are used for each interface. please go through the readme file before proceeding further. The description of each function is also available in this attachment

For any query please write at



Popular posts from this blog

How to Build Electronics calculator using Arduino uno and TFT Display Shield

How to interface 16x2 LCD with Raspberry Pi using GPIO & Python