Help using ds1302

Hey guys. I'm new here, so sorry if my question looks stupid but I really need some help. I am trying to use DS1302 RTC as clock (I use clock to control sim module). It still works when I test. But when combined with the sim module code, it doesn't work.


I added the first part

Hi, welcome to the forum.

When you show code, then please show a complete sketch as text between lines with three backslash-single-quotes.

Your sketch

To get an idea of what you have, we need to know more.
What is a sim module ? How is it connected and which library do you use ?
Which Arduino board do you use ?
Can you make a drawing of everything that is connected ?

The DS1302 has a bad and clumsy interface. Some libraries work, some don't. Some modules with a DS1302 have a bad crystal.

Can you use a DS3231 module ?
Some modules are supposed to have a rechargeable battery, but those modules over-charge the batter when used with 5V.
A module with a DS3231 without charging circuit and normal battery is best.

Thank you
I use 800L . sim module
I use arduino uno R3
Rx sim module - pin 11 arduino
Tx sim module - pin 10 arduino
The problem is that when testing each module, it works properly. But when combined, the DS1302 does not work. Currently I cannot change the ds1302 module.
CE pin - Arduino Digital 7
I/O pin - Arduino Digital 6
SCLK pin - Arduino Digital 5
Thư viện Ds1302: DS1302

@giakhiem2, your topic has been moved to a more suitable location on the forum.

Can you please read How to get the best out of this forum.

Perhaps that library is not okay. Some libraries do the signals wrong. Perhaps the SoftwareSerial interferes with the DS1302 library.

Could you try another library ?
This one has the most stars on Github, it is in the Library Manager:

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.