Closed Olli69 closed 5 months ago
Can you use I2C scan to test whether PCF8563 is online? Normally, as long as the PCF8563 is powered on, the time will accumulate.
Can you use I2C scan to test whether PCF8563 is online? Normally, as long as the PCF8563 is powered on, the time will accumulate.
The rtc has a fresh CR-1220 battery. Also response from i2c scan (WIRE.begin(16,17);
): I2C device found at address 0x51 !
. The same response even if I remove the backup battery. So, it is powered and connected to i2c.
Earlier the board was powered only from USB 5VDC but I also added 24VDC power source - no difference (no accumulation in the RTC)
Then I may suspect that the RTC crystal is not working properly. Is it possible for you to measure the clock waveform of 32.768khz?
I do have an oscilloscope, but not very professional with it. If you could send a pic of pins to measure, I could try.
I will send it to you tomorrow and add instructions
Check these two pins, adjust the oscilloscope probe to the 10X gear, then adjust the period to 10us and the voltage to 50mV. If your oscilloscope supports period measurement, you can open the period measurement option and observe whether there is a 32.768khz waveform output.
I got quite nice sine waves from pin 1 and pin 2. But are the voltage levels correct for PCF8563 to operate, OSCI between 356mV-828mV? I measured VDD voltage levels from PIN 8: 2.88V-3.12V.
There seems to be no problem. The crystal is already oscillating. You can try my test file to see if it accumulates every one second.
There seems to be no problem. The crystal is already oscillating. You can try my test file to see if it accumulates every one second.
How to flash firmware , you can see here, the method is the same, the writing address is 0x0
Thanks for additional diagnostics. I flashed your test file and it does not seem to accumulate correctly.
Hardware clock :Monday, January 01 2024 00:00:00
Hardware clock :Monday, January 01 2024 00:00:00
Hardware clock :Monday, January 01 2024 00:00:00
Hardware clock :Monday, January 01 2024 00:00:00
Hardware clock :Monday, January 01 2024 00:00:00
Hardware clock :Monday, January 01 2024 00:00:00
Hardware clock :Monday, January 01 2024 00:00:00
a bit later:
Hardware clock :Monday, January 01 2024 00:00:00
Hardware clock :Monday, January 01 2024 00:00:00
Hardware clock :Monday, January 01 2024 00:00:01
Hardware clock :Monday, January 01 2024 00:00:01
Then there were 160 rows of 00:00:01
before it changed to `00:00:02``
Hardware clock :Monday, January 01 2024 00:00:01
Hardware clock :Monday, January 01 2024 00:00:01
Hardware clock :Monday, January 01 2024 00:00:02
Hardware clock :Monday, January 01 2024 00:00:02
Then 144 rows of 00:00:02
. Then 151 rows of 00:00:03
..., a bit random number of rows (between 122-153, last checked 00:00:08)
@Olli69 Sorry for confusing you At present, it seems from all aspects that the PCF8563 chip may be damaged, causing it to not work properly. Please contact customer service for after-sales service.
@lewisxhe , no problem! Thank you for prompt responses with diagnostics. So good that we got this far so quickly. I have contacted your sales and asked for a replacement board.
You're welcome. If you don't have any other questions, please close it.
Hi, I tested internal PCF8563 rtc with the sample program RTC_PCF8563_TimeSynchronization. It got updates from ntp-server and set date/time to the rtc, but the rtc was not incrementing. For example just after ntp update loop() printed out
but 10 seconds later:
I had the same problem with Adafruit library as well as https://github.com/Makuna/Rtc library. Could it be a hardware problem? I just got the board from LilyGo (order 13992).