Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Problem with DS1307 on KC868-A6
#1
Brick 
Hello,
 
I received a KC868-A6 few days ago. I have been able to read and write both PCF8574 but I’m having issues with the DS1307. I tried to load a I2C scanner and both PCF8574 are seeing (0x22H, 0x24H) but the DS1307 doesn’t.
 
I have tried to check with my logic analyzer that the I2C signal is arriving to the DS1307 trough the MOSFET transistors and signal is Ok but there is no answer while scanning the I2C bus nor trying to read it.
 
Any ideas what could be happening?
Reply
#2
can you use this DS1307 arduino code to test it?
https://www.kincony.com/forum/showthread.php?tid=1863
Reply
#3
(08-13-2024, 11:04 PM)admin Wrote: can you use this DS1307 arduino code to test it?
https://www.kincony.com/forum/showthread.php?tid=1863

I tried the code and it doesn't work. There are no signals on SCL nor SDA seen on my logic analyser. I guess the I2C pins are not mapped on that code, right?

Where can the I2C pins be configured properly to work with DS1307 lib on that code?

Thank you.
Reply
#4
yes, you need to modify arduino pins define file, set the SCL and SDA pin number.
Reply
#5
(08-14-2024, 07:57 AM)admin Wrote: yes, you need to modify arduino pins define file, set the SCL and SDA pin number.

Can you please indicate me where/how to set them? 

I'm using Arduino IDE on Mac OSX but I don't find the "arduino_pins.h" anywhere.

Thanks.
Reply
#6
find "pins_arduino.h" in your computer, open it, then you will see:
static const uint8_t SDA = xx;
static const uint8_t SCL = xx;

just replace xx with correct pin number.
Reply
#7
(08-14-2024, 12:56 PM)admin Wrote: find "pins_arduino.h" in your computer, open it, then you will see:
static const uint8_t SDA = xx;
static const uint8_t SCL = xx;

just replace xx with correct pin number.

I already found "pins_arduino.h" and modified it. Since then I see activity on the I2C with your test program. However, the result is an endless repeating telegram that doesn't receive any Time as answer. Please see the analyzer pictures. Furthermore the monitor on Arduino IDE is showing the "RTC is NOT running, let's set the time!" message while booting and the returned data which doesn't reflect the activity seen in the analyzer is always the same as per the attached picture.

Any further Idea?
Would be possible to receive a bin file for KC868-A6 to be loaded straight forward on the board?

Thank you!


Attached Files Image(s)
           
Reply
#8
if you want a BIN directly use for KC868-A6. next week we can compile send to you.
But i seen your last photo, the LOG already have read the DS1307 time successfully.
Reply
#9
(08-15-2024, 12:52 PM)admin Wrote: if you want a BIN directly use for KC868-A6. next week we can compile send to you.
But i seen your last photo, the LOG already have read the DS1307 time successfully.

Yes, would be nice to receive a BIN file for KC868-A6. I'm still stuck on this.

However, the photo you mention is showing always the same time. Furthermore the analyzer picture shows that only 1 byte of data are readed on every request.
Reply
#10
your code already is running correctly. you can also install DS1307 arduino library, then chose a example demo run testing.
Reply


Forum Jump:


Users browsing this thread:
1 Guest(s)