Go Down

Topic: Which library with DS1307? (Read 1 time) previous topic - next topic

robitabu

Hi :-)
I'm building a custom Temperature Logger, I'm going to use a standalone ATMega328, a DS1307 for timestampings,  a DS18B20 as a temperature sensor and an eeprom for data storing (I will only save a few dozen readings each day).
I'm powering it with a wall adapter providing a 5v source (no battery) and I'm not using any sleep technique as of now but I'm willing to switch to a battery powered standalone device and a powersaving sleep approach in the future.

I was wondering which RTC library I whould use. I've seen a lot out there, the Adafruit RTClib and the JeeLabs RTClib, the ds1307 and ds1307new, the DavidHBrown RealTimeClockDS1307, the Turicas DS1307 and so on ...

I really need basic RTC interactions, no fancy stuff. I just need to read date/time from time to time (not constantly) in order to provide a timestamp to any temperature readings I'm going to save on the eeprom. I will also have to set a new date/time when needed. As you see, I don't need a full fledged RTC library, but I don't know all those libraries well enough to judge what is too much or what is not worth even trying out.

Which one would you suggest me to use?

I was just missing a detail ... I'm going to try and port all that to a smaller processor in the future, some ATTiny may be enough. I wonder if someone has already used the DS1307 with an ATTiny ... should work too :-)

el_supremo

It doesn't really matter how large the library is as long as it has the few functions that you need. When your sketch is compiled and linked, the linker will only load those functions that you actually use.
Pick a library and try it out.

Pete
Don't send me technical questions via Private Message.

robitabu


It doesn't really matter how large the library is as long as it has the few functions that you need. When your sketch is compiled and linked, the linker will only load those functions that you actually use.
Pick a library and try it out.

Pete


After a little hesitation and reading the DS1307 datasheet ... you know what? I think I'm going for a no-library approach, I'm going to process saved data afterwards anyway. So why should I bother using a library when its main purpose is generally to simply translate stuff to Arduino? I don't need that (well ... almost).

I guess doing everything using native i2c read/write will not be that much of a hassle. So I will not have to bother with library compatibility issues when porting it to the ATTinys.

Go Up