Posts: 28
Threads: 4
Joined: Mar 2023
Reputation:
0
Hello everybody!
I am looking at adding a DS1307 RTC connected via I2C, anyone you can recommended that has been testet and easy to connect?
Presume source code are the same as for the KC868-A6.
Posts: 6,379
Threads: 827
Joined: Oct 2020
Reputation:
158
any DS1307 chip can use, just define correct I2C bus pins is ok.
Posts: 6,379
Threads: 827
Joined: Oct 2020
Reputation:
158
you can use "DuPont Line" connect with each pins.
Posts: 28
Threads: 4
Joined: Mar 2023
Reputation:
0
04-08-2023, 10:36 AM
(This post was last modified: 04-08-2023, 10:43 AM by Olsen@HuaHin.)
I think I found the solution, se below.
// Set i2c for RTC DS1307
#define SDA:4
#define SCL:5
or
// Set i2c for RTC DS1307
#define IIC SDA:4
#define IIC SCL:5
or
// Set i2c for RTC DS1307
#define i2c SDA:4
#define i2c SCL:5
Which one is the correct one???
Posts: 6,379
Threads: 827
Joined: Oct 2020
Reputation:
158
IIC SDA:4
IIC SCL:5
you should set it in your arduino "pins_arduino.h" file set SDA and SCL pins.