Page 1 of 1

MCP795xx RTC ESP-IDF Library

Posted: Fri Apr 12, 2019 9:57 pm
by commando_j
Hello,

Since I had such great success in requesting a library for the MCP23S17, I'm going to see if I get lucky twice!
Does anyone have a native ESP-IDF library working for the MCP795xx RTC/Calendar chip? I have found not one person on the web using this and the ESP32.
In case anyone asked why I used a separate RTC chip; I needed an RTC and Calendar to keep accurate time and date through resets and short power losses. When I made my board, there was so much talk of the ESP32 RTC resetting or having trouble being accurate, I decided to go with a stand-alone chip. I don't know if that's still the case, but I'm sticking with this chip. Also, I needed the IO's on the ESP32 for other things and couldn't use them for the crystal, AND the ESP32 doesn't have a backup battery input for the RTC.
Last point to add, I needed it to be SPI, not I2C, since I am not using I2C for anything, only SPI. So DS1307 was not possible.

Anyways, any info would be appreciated. I'd even take suggetions of another chip that's well supported by ESP32 and is SPI. Thanks

Re: MCP795xx RTC ESP-IDF Library

Posted: Mon May 06, 2019 3:15 pm
by commando_j
Just to update my post. In my search for a different RTC that met my needs (size and cost) I discovered a pin-compatible chip to the MCP79510. The Maxim DS1390U/DS1394U. The advantage with this chip is better documentation, and there are at least some ESP32 projects with maxim RTC chips, although not the exact same series. But it's at least something to work with. The Maxim chip is more expensive at about triple the cost, but ok with that. I just wasn't ok paying 9$ for some of the other options out there. I can manage 3$.
If anyone has any advice on this Maxim chip, please forward it along. Thanks.

Re: MCP795xx RTC ESP-IDF Library

Posted: Mon May 06, 2019 3:35 pm
by commando_j
Further update. The negatives on the Maxim chip is the much higher standby current of around 100uA vs 1.xuA on the MCP part. Also, the leap year works until 2100 with Maxim, vs 2399 in the MCP. The Maxim has an integrated diode and resistor for the backup which saves you two parts on your board. Not sure if the higher current is something I want to deal with since my project is current sensitive.

Re: MCP795xx RTC ESP-IDF Library

Posted: Mon May 06, 2019 4:14 pm
by WiFive