You Are Here: Home » AVR ATmega Projects » Other Projects » Digital Clock using AVR Atmega16 Microcontroller

Digital Clock using AVR Atmega16 Microcontroller




Digital clocks revolutionize the way we live our daily life as it helps people to stick with their schedule. This article will teach you to build your own Digital clock using DS1307 RTC Chip with Atmega16 microcontroller. As we all know that DS1307 is a simple real time clock chip which shows seconds,minute,hours,day,date and year. We have used a simple 16×2 LCD along with it to display all the data obtained from the RTC chip using AVR microcontroller.

 Digital Clock using AVR Atmega16 Microcontroller

DESIGN OF DIGITAL CLOCK USING AVR :

This system was designed using a simple RTC chip ds1307 and AVR microcontroller. The RTC chip keeps track of the seconds,minutes,hours,day,month and year. This chip feeds the AVR with the real time parameters. The fed parameters was then displayed in a simple LCD screen. The RTC was programmed initially with the desired values such as seconds, minutes, hours and so on through I2C interface. After writing into the chip , it starts tracking the time which will be read and displayed in the LCD screen.

RTC DS1307:

This a simple Real time chip aka RTC which is widely used in many systems where real time is necessity. This chip consumes less power and can run with a back up battery supply. This chip supports I2C protocol through which the data transfer occurs. This Chip consists of Readable/Writable registers where it holds the time parameters and keep track of it.

If we want to make this chip run from our desired time, we want to write the registers with the data’s that is time parameters of our desire. Later we can read from those registers to know about the real time values. Read detailed description mode of usage about this chip in this Working of RTC chip DS1307. I suggest you to go through that article before proceeding further.

STEPS TO PROGRAM:

  • Initialize the controller to communicate using I2C protocol.
  • Send D0 to the RTC chip indicating that the controller is about to write.
  • Send address of the register you are about to start writing data, followed by writing time parameter to respective registers.
  • Transmit stop condition to terminate the I2C communication.
  • Now start the communication and send D1 to the chip indicating the read operation from the chip.
  •  Set the initial address and start reading the parameters and  display the values in the LCD screen, put it in a infinite loop.

Read More: Digital Clock using AVR Atmega16 Microcontroller

Leave a Comment

You must be logged in to post a comment.

Read previous post:
Building A Quadcopter For Newbie
Building A Quadcopter For Newbie

Drones are one of the rising technologies in the world and it became very popular that we see it in...

Close
Scroll to top