Introduction: Real TIme Clock Using AT89s52

Picture of Real TIme Clock Using AT89s52

WELCOME BACK , This is shubham Trivedi and today i am going to design Real Time Clock using At89s52 Microcontroller. The AT89S52 Microcontroller is the heart of this project. DS1307 IC is used as RTC . This DS1307 IC required I2C interface , but 89s52 is not have any I2C port on board. That makes it typical to designed. So i designed a I2C bus in program and used it to fulfill the requirements.

Step 1: Construction

Picture of 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. 2.

I used AT89s52 Development Board which i designed 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 following way.

PIN OF LCD PIN OF PIC18F452

  • D7 - P3.7
  • D6 - P3.6
  • D5 - P3.5
  • D4 - P3.4
  • RS - P1. 6
  • RW - P1. 5
  • E - P1.4

Step 2: Working Video

Step 3: Code

Code

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

Click here to download attachment

errors are welcome at shubhamtrivedi95@gmail.com

click here to like on facebook

Comments

About This Instructable

1,048views

6favorites

License:

Bio: This is shubham, very cool boy. passionate about electronics.
More by shubhamtrivedi95:LCD 16x2 Interface With Raspberry PiReal TIme Clock Using AT89s52Real TIme Clock Using PIC18F452
Add instructable to: