^new^ - Virtuabotixrtc.h Arduino Library
This is where the Virtuabotix library shines. It does not use standard I2C pins for the DS1302, giving you flexibility. You can define any digital pins for CLK, DAT, and RST.
The DS1302 uses a three-wire serial interface, which is different from standard I2C. The common pinout used with this library is as follows: Suggested Arduino Pin Power (2V - 5.5V) 5V or 3.3V GND CLK / SCLK Serial Clock Digital Pin 6 DAT / IO Bidirectional Data Digital Pin 7 RST / CE Chip Enable / Reset Digital Pin 8 Common Code Implementation virtuabotixrtc.h arduino library
| DS1302 Pin | Arduino Pin | Description | | :--- | :--- | :--- | | | 5V | Power | | GND | GND | Ground | | CE / RST | Digital Pin 2 | Chip Enable / Reset | | I/O / DAT | Digital Pin 3 | Data Input/Output | | SCLK | Digital Pin 4 | Serial Clock | This is where the Virtuabotix library shines
Ensure the baud rate selected in your code (e.g., 9600 ) matches the baud rate set in the bottom right corner of your Arduino IDE Serial Monitor. The DS1302 uses a three-wire serial interface, which