Introduction: DS1307 Base Clock

About: arduino base projects, electronic project and info,

in this project we will see how to interface DS1307 with arduino and also display date & time to arduino

Step 1: Circuit Diagram

hear i connect oled display and component to arduino as per diageram


Vcc => 5v


SCL => A5

SDA => A4

also connect DS1307 as diagram i connect 32Khz crystal 3v battery and data line

DS1307 is real time module which provide present date and time.

DS1307 has external 3v cell which provide power to internal circuit when main power is turn off

Step 2: Connect Circuit on Breadboard

Step 3: Set Date and Time

for this project you need DS1307RTC.h , TimeLib.h,(for RTC) Adafruit_GFX.h,Adafruit_SSD1306.h (For OLED) library .

now set date and time of DA1307 by code

file -> example -> DS1307RTC -> SetTime

after set date and time read from ic by code

file -> example -> DS1307RTC -> ReadTime

Step 4: Now Upload Main Code

Step 5: