Manual Reset is Required to start LCD 2.4 inch TFT

Dear All,

I am Trying to create a analogue clock using TFT LCD 2.4 inch display,

Of course i use RTC which is working on I2C protocol so i need Pin number A4(SDA) and A5(SCL), at the same time LCD_RESET shares A4 pin for reset (which is not possible in my case)

so I read several forums, Incase if the A4 pin is not available we could tie LCD_RESET with Arduino reset pin. If i do that manual reset is required to start the clock.

I have taken a below code from “https://www.instructables.com/id/24-TFT-LCD-With-I2C-Modules/” attaching the same here.

Anyone please help me to solve this issue

DS32312.4TFTMCUFRIENDV2.ino (10.2 KB)

You can snip off the LCD_RST pin from the shield. And solder a 10k pullup to the LCD_RST terminal.

Call tft.begin() before rtc.begin().
I would expect this to work fine on a Uno. i.e. Uno has I2C on A4, A5.

The tft.begin() call will still wiggle A4 in software but this will not be a valid I2C wiggle.
Hence the rtc.begin() will initialise I2C and your DS3231 just fine.

Please describe any problem behaviour that you see.
I will try to replicate on my hardware.

David.

I attempted to build your code. However there are many libraries called "DS3231.h".

I do not recognise the library you are using. Please run the IDE Library Manager. It will tell you which DS3231 library(s) you have installed.

Please click the [More Info]. This will give you a Github URL. Paste it to your message.

David/

Hello David,

Thanks for the response,

I deleted the DS3231.h Library and through IDE Library manager, installed from DS3231 Library(s) from Github.

afterwards when i run the sketch, It is highlighting "DS3231 rtc(A4, A5);" this line and getting an error like

"no matching function to DS3231::DS3231(Const uint8_t, Const uint8_t)".

Sorry i am new to programming and could you please help me to solve the issue?

I was asking which DS3231 library you were using on your PC.
The Library Manager would probably have reported some information about your DS3231 library.

I strongly advise people to use libraries from the IDE Library Manager.
None of the "official" DS3231 libraries work with your sketch.

If you have deleted your library, no one will ever know what you were using.
Can you remember where you found the sketch and libraries ?
Post a link.

Yes, it is possible to re-write your sketch for an official library. But it would be interesting to know where you found your DS3231 library.

David.

Hello David,

I Downloaded the library file for DS3231 from "DS3231 - Rinky-Dink Electronics"

And regarding on your 1st reply (#1) : I called tft.begin() first and after that rtc.begin() but no use and i tried with 10K pullup resistor from 5V to LCD_RST but i will be getting a black screen.

If i use 10K pullup resistor from Ardunio reset (that is 1st pin of ardunio) to LCD_RST ofcourse i will be having black screen but if i do manual reset it will work (Some times i have to press multiple times to make it work).

Thanks & Regards,

Lokesh S

I downloaded the RinkyDink DS3231 library and put in local tabs in your sketch.
The sketch ran on a Mega2560 after I changed the constructor to

...
#include "DS3231.h"    //.kbv use local tab
...
DS3231 rtc(SDA, SCL);  //.kbv use hardware pins
...
  //tft.begin(idLCD);   //.kbv not in loop(),  only in setup()
...

If you have snipped the LCD_RST pin from the shield I would expect the sketch to work on your Uno.
Note that you must either solder a 10k pullup to 5V pin or a straight wire to the Arduino RESET pin (pin next to 3.3V)

The sketch is running on my desk. It is not perfect when redrawing hour and minute hands after the second hand crosses them. Nor does it redraw "Lokesh" properly.

What is your problem?

We can fix the redraw "holes" if you want to use this project in real life.

I am very suspicious of "RinkyDink" libraries. Mr Karlsen does not make them available from the IDE Library Manager. (which is why I used as a local library)

David.

Hello David,

My problem is only LCD_RST issue.. if i do wilth 10K Pullup from 5V to LCD_RST : NOT WORKING
if i put a straight wire to reset pin : Manual reset required

It will be great, If you could provide a solution for this

You have never said which controller is mounted.

MIPI style controllers like ILI9341 have a Software-Reset command that is always sent by the tft.begin()

If you have an old-style ILI9320 the tft.begin() sequence sends hardware commands but I would not trust them to Reset the controller properly.

Go on. Pressing a Reset button would work if you have a straight wire.
The pullup to 5V does nothing. It relies on a MIPI 0x01 command.

David.

Sorry David, My mistake

Yeah it is ILI9325.. This also old controller?

If yes do we have any other solution ?

ILI9325 does not have a specific Software Reset command.
A straight wire to the Arduino Reset pin will mean the Reset button will give a
Hardware Reset to the ILI9325.

David,