Using other than SDA/SCL to speak with RT1307 on Nano Every

Hi,
I'm on a project that needs the 8 analog pins (!) of my Nano Every, and a RTC module. Unfortunately SDA/SCL ports are on A4/A5.
How can I use other pin for serial?

What's "serial" has to do with the RT1307? The module uses a I2c bus rather than serial.

As about the question - you would transfer the connection to any other Nano's pins using a software-i2c interface.

You can try SoftI2C

Alternative is to use MCUdude's MegaCoreX which gives access to 16 analog inputs. The pin for A15 is not physically connected on the Nano Every, and is not shown on the diagram.

1 Like

Thank you, I'll try that.
But I guess then I can't use RTC lib as is...

Correct.
You can't have your cake and eat it too.

shure,
I couldn't find a code example to use DS1307 with softI2C...

Then you have to use @david_2018's solution or add an analog MUX.

Finally I learned how use SoftI2C, and I adapted the code on this page (in french):
https://www.carnetdumaker.net/articles/utiliser-un-module-horloge-temps-reel-ds1307-avec-une-carte-arduino-genuino/
It explains how to use DS1307 with Wire, but without any RTC lib.

thank you both!

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