Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
DS1307 RTC
#1
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.
Reply
#2
here is DS1307 RTC arduino demo code for KC868-A6:
https://www.kincony.com/forum/showthread.php?tid=1863
if you want to use DS1307 connect to IIC bus extender , also can use A6's code, just define the GPIOs for SDA and SCL pin.
Reply
#3
(03-13-2023, 11:05 AM)admin Wrote: here is DS1307 RTC arduino demo code for KC868-A6:
https://www.kincony.com/forum/showthread.php?tid=1863
if you want to use DS1307 connect to IIC bus extender , also can use A6's code, just define the GPIOs for SDA and SCL pin.

Thanks

Any DS1307 RTC you can recommend to use that will work on the KC868-A16 and are easy to connect
Reply
#4
any DS1307 chip can use, just define correct I2C bus pins is ok.
Reply
#5
I have finally received my KC868-A16 board and found that the I1C uses special plug
What type of plug is this as I need to connect RTC module see attached pictures.
       
Reply
#6
you can use "DuPont Line" connect with each pins.
Reply
#7
I have now got my DS1307 connected and RTClib.h including Adafruit BusIO (i2c) in my sketch

I have not been able to find in any demo code in the forum how to define SDA & SCL (4, 5 for the KC868-A16 board) in Arduino IDE

Tried the example from KC868-A6 -- #05-DS1307 demo

If I try IIC SDA:4 & IIC SCL:5 as in I-O pin define (KC868-A16 I-O pin define) it comes up with an error.  Huh
Reply
#8
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???
Reply
#9
IIC SDA:4
IIC SCL:5

you should set it in your arduino "pins_arduino.h" file set SDA and SCL pins.
Reply
#10
(04-08-2023, 11:37 AM)admin Wrote: IIC SDA:4
IIC SCL:5

you should set it in your arduino "pins_arduino.h" file set SDA and SCL pins.

All good, but I don't see the use of a library "pins_arduino.h" in any of your source code examples.

Is there not a source code for KC868-A16 showing the complete pin-define for the board as that would be the first step to do when starting a sketch regardless of what you want to code so that all pins are available now and later on in a project.

Does anybody have an example including the complete pin-define for the KCS868-A16?????
Reply


Forum Jump:


Users browsing this thread:
1 Guest(s)