Need Library for RTC chip (RV-8263) - Page 1
Forum section: electronics / general

author: LainisLain
author_rank: Contributor
timestamp: March 30, 2022, 11:45:37 am
content: I'm in a pickle and need some advice!I've designed and built a small ESP32 board and decided to incorporate an RTC chip. I made a mistake and ordered a chip I can't find a library for.The chip is RV-8263-C7. There is a common Arduino library for the RV-3028-C7 which is from the same manufacture and has the same footprint. This 8263 was cheaper because it has less features which is fine.The chip is functional on my board and shows up as I2C 0x51, however the 3028 library will not recognize it and my limited programing skills has brought this to a fault.My question, does anyone know of a library that will work with this chip? Is it possible to modify the 3028 library to work? I assume it's possible to write my own library but I lack the skills for that at this time. If it's possible to modify the 3028 library, could someone maybe give an example of what to change in source code to get basic functions like "read time" and "set time"?Any advice would be great and thx ahead of time!

author: DC1MC
author_rank: Super Contributor
timestamp: March 30, 2022, 12:23:18 pm
content: A library can at any time be written, either from scratch or modifying the exiting RV-3028-C7 to recognize RV-8263-C7 as well.As on how to proceed, first try to contact the writer/project space of the existing driver, maybe the authors will be willing to integrate the new chip, or post a little "job announcement" in the forum's job section and offer some peanuts for the willing monkeys.Or if it's a hobby project and not commercial, just buy the supported chip, they cost almost nothing.Cheers,DC1MC

author: tooki
author_rank: Super Contributor
timestamp: March 30, 2022, 11:58:57 pm
content: There are libraries for other RV series RTCs, like the RV-8803. Have you tried any of those?

author: LainisLain
author_rank: Contributor
timestamp: March 31, 2022, 12:31:20 am
content: No I haven't. Looking at the .h file I can see that the seconds, minutes, hours addressing don't correspond to the 8362.I have no experience modifying a library but i wonder if I can just change all the address points to match the datasheet. And delete all the features that the 8362 doesn't have.

author: agehall
author_rank: Frequent Contributor
timestamp: March 31, 2022, 12:49:10 am
content: Would it not be easier to just write your own library? It looks like a trivial device to talk to assuming you have access to an I2C master device API in your platform.

author: LainisLain
author_rank: Contributor
timestamp: March 31, 2022, 02:24:50 am
content: Trivial maybe for other people. I know the hardware side well enough but writting a library is a bit above my knowledge. l'm guess I could brute force my way through. I really don't know where to start though.

author: LainisLain
author_rank: Contributor
timestamp: March 31, 2022, 08:47:19 am
content: Got home and tried the 8803 library. It actually does something! LOL The month counts up instead of the seconds!

author: tooki
author_rank: Super Contributor
timestamp: March 31, 2022, 11:11:46 am
content: Honestly, this chip is simple enough (at least for basic timekeeping) that it’d be afantastictest subject to learn how to write a simple library. I’m actually doing my first one right now as a school project.I2C on Arduino is very easy, so it’s a great platform to learn this on.Tip: Compiling for ESP32 takes far longer than compiling for AVR (e.g. Arduino Uno or Mega). So even if you’re going to be using an ESP32 in the end, use an Arduino for testing while writing your library.