DS1302 Clock With a 2.4 TFT LCD




Introduction: DS1302 Clock With a 2.4 TFT LCD

Hello there!

Today i will show you how to make a simple clock with a RTC and a TFT LCD for Arduino.

Simple project for beginners, it can be assembled and set up for less than 30 minutes.

Step 1: Another Clock

A few months ago i decided to make myself a simple clock with this 2.4 inch LCD.

I am using it in the living room and it is a good night light. It prevents me from kicking in to the furniture by accident; and mom likes it too :)

This RTC module is relatively inexpensive and very easy to use with Arduino. It is not like the ones that uses the I2C protocol(DS3231, 1307) .


The module has 5 pins: VCC, Ground, RST, CLK, DAT The 3 pins can be connected to any digital pin of arduino.

The biggest advantage of the rtc is that it is not using the I2C(SCL,SDA) BUS.

The biggest disadvantage: The rtc chip is not heat compensated. What does it mean?? It means that the temperature most likely has an effect on the time drift. On room temperature the time drift was 2-4 minutes per month. Therefore we can not say this is a precise rtc.

This TFT LCD most commonly needs the A4 pin for RESET, and i have been trying to tweak this feature (A4 to reset pin) to use a DS3231 module. By so far i could not make it work, but i am still searching for a solution.

Step 2: Materials and Sketch

The parts needed for this project:

-Arduino Uno (Mega etc...)

-DS1302 RTC

-2.4 TFT LCD

-some jumper wires

-Arduino IDE, sketch, libraries and a little free time

Step 3: Connections

It is a very simple setup. Connect the LCD to Arduino. I soldered the pins the opposite way on arduino, so the rtc is connected on the backside of the board.

VCC: 3.3 or 5 volts

Ground: Ground

RST: Digital 10

DAT: Digital 11

CLK: Digital 12

Step 4: Finished

After connecting the parts upload the sketch to the board and you are done.

In the sketch you can easily set the time to the module.


//rtc.setTime(17, 15, 00);

//rtc.setDate(15, 3, 2018);

Firts uncomment the lines, then set the correct time, day and date.

Upload it, comment the lines again and upload.

That's it! Time is set and ready to go.

Step 5: Done!

You are done!

Use it as you like.

Have a nice day!

1 Person Made This Project!


  • Puzzles Challenge

    Puzzles Challenge
  • Lamps Challenge

    Lamps Challenge
  • CNC and 3D Printing Contest

    CNC and 3D Printing Contest



1 year ago

I have try to make a CLOCK using DS1302 module with Arduino UNO and 2.4 inch TFT LCD shield. when I go to compile code which given here then I got a error mentioned below

"no matching function for call to 'Time::Time()"


Reply 1 year ago

Thats odd! I made an McuFriend version a few months ago and had no compiling errors with the sketch and libraries. I try to take a look at it.

shafi bhat
shafi bhat

2 years ago

I made tft clock with ds1302 but your code is not keeping time when unpluged from power supply but I modified the code and make it done.


Reply 1 year ago

hey sir,
I am try to use this code but a error occurred when I am going to compile it.
error- "no matching function for call to 'Time::Time()'


Question 2 years ago

From where I can download the library for the DS1302