Check for loose wires (especially GND). The DS1302 is sensitive to noisy connections. Conclusion
In many tutorials, you'll see wiring examples such as CLK->6, I/O->7, CE->8. Keep in mind that the virtuabotixRTC library's initialization order is myRTC(CLK_PIN, DAT_PIN, RST_PIN) .
It's crucial to understand that the VirtuabotixRTC library is built specifically for the real-time clock module. This module is distinct from the more common DS1307 and DS3231 modules, which typically use the I2C communication protocol. The DS1302 uses a 3-wire serial interface, which is simpler but less common than I2C. virtuabotixrtch arduino library
Here is an example code that demonstrates how to use the VirtuabotixRTCH library with Arduino:
The is a software wrapper designed to interface Arduino microcontrollers with Real-Time Clock (RTC) modules, specifically the popular DS1302, DS1307, and DS3231 chips often sold under the Virtuabotix brand. Check for loose wires (especially GND)
// Initialize RTC on A4 (SDA) and A5 (SCL) VirtuabotixRTC myRTC(A4, A5);
Standard examples often use the following pin configuration: SCLK (Clock) I/O (Data) : 5V or 3.3V (depending on module) Installation Guide The DS1302 uses a 3-wire serial interface, which
Automatically adjusts the day count for leap years valid up to the year 2100.