DS1302 I2C

I'm using DS1302 in one of my projects. As far as I'm concerned it's not the best RTC module (I have observed an increasing difference between real time and module time), so by the occasion, I'd like to ask for your recommendations about other modules to track time.

However, my main question is about DS1302 connection. I have a version using I2C, which means I'm using SCK & SDA pins (described on the module as CLK & DAT). On Arduino UNO SCK & SDA pins are A5 and A4. But very often (even in lib I have used to set time), they connect DS1302 to pins 5,6,7 (additional pin is used for reset module). Why is that? Do those pins serve also as SCK and CLK? Or could I use any pins for I2C communication?

Thanks for the answers.

it's not the best RTC module

It is the worst, it is bad, it is terrible, boo! Statler & Waldorf - YouTube.

It has three pins and those pins are not I2C. I think that it is impossible that it will work when connected to a I2C bus.
Those pins are also not SPI or any other bus. There are no I2C versions.

The DS3231 is a good RTC chip. It has the crystal inside and compensates for temperature.
There are cheap DS3231 modules that damage the battery when used with 5V, so you should be careful with those modules.

Koepel is of course right about the DS1302 not being I2C. The datasheet: DS1302.pdf (maximintegrated.com) describes it as a "three wire interface" and defines the pins on page 4. He is of course also correct about the DS3231 being superior and that some of the modules will ruin batteries. I have had horrible experiences with the all too famous, fairly large module with integrated EEPROM! I am currently using an Adafruit version which is a lot smaller, uses a smaller battery, etc. but haven't been too impressed either.

Sp, the question remains unanswered. What IS the best RTC module?

Sp, the question remains unanswered. What IS the best RTC module?

The one that works well.

The following RTC module has been working for years without any trouble with Jeelab's fantastic RTClib.h library.



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