Now in this tutorial we will interface RTC (Real time clock) with Atmega32 breakout board. For this tutorial we will require RTC Breakout ,LCD Breakout and 16x2 LCD to display the time.

Basics

In this example we are using DS1307 RTC. It will communicate through I2C protocol with controller. Connect SCL and SDA of RTC Breakout to SCL and SDA of ATmega32. Connect D4 to D7 of LCD Breakout to PORT B4 to PORT B7 and RS,R/W,E to PORT B0 to PORT B2 respectively as shown in hook up.
Refer Real Time Clock(DS1307) with AVR tutorial for RTC basics.

Hook Up

0 AVRbreakout RTC.png

Code


Interfaceing RTC with Atmega128.gif