RTC using Ds1307 and 89c52 with Multiplex 7-segment display
Salam ....Friends in this tutorial ,we are interfacing real time clock Ds1307 with 89c52 and displaying time on multiplex 7-segment display .In google there are many related projects about the Real Time Clock but no one use the 7-segment display so my method is different and less expensive ,because i don't use the crystal LCD. step1 is about RTC and I2c .
RTC is an electronic device which plays an essential role in realtime embedded system design.
It provides a precise time and date in various applications such as
system clock, student attendance system and alarm etc, that keep track
on current time and provides consistent result to the respective task.
This article presents RTC interfacing with 8051microcotrollerand basic
accessing of internal registers.
RTC Programming and Interfacing
RTC interfacing with 89c52
microcontroller is similar to all other kinds of “Real Time Clocks”
interfaced to it. So let us look on simple RTC interfacing with 89c52 microcontroller and programming procedure involving in it.
Step1: Select RTC Device
The various kinds of RTC chips are
available in the real time embedded world, which are classified based on
various criteria such as package type, supply voltage and pin
configuration etc. A few types of RTC devices are;
- Two-Wire Serial Interface (I2C Bus)
- Three-Wire Serial Interface (USB BUS)
- Four-wire Serial interface (SPI BUS)
First, we need to select type of RTC
device by category based on requirement like I2C Bus RTC or SPI Bus RTC
or other, which suitsfor interfacingwith respective microcontroller.
Then we can select features of RTC device depending on requirement of
application such as battery life, suitable package and clock frequency.
Let us consider two-wire interfacing RTC with 8051 microcontroller such as DS1307.