If in doubt, contact your local waste disposal authorities. Thank you for choosing Whadda! Please read the manual thoroughly before bringing this device into service. If the device was damaged in transit, do not install or use it and contact your dealer.
Product Overview The DS1302 trickle-charge timekeeping chip contains a real-time clock/calendar and 31 bytes of static RAM. It communicates with a microprocessor via a simple serial interface. The real-time clock/calendar provides seconds, minutes, hours, day, date, month, and year information.
Connection Arduino® WPI301 SCLK Pin Layout Input. The CE signal must be asserted high during a read or a write. This pin has an internal 40 kΩ (typ) pulldown resistor to ground. Note: Previous data sheet revisions referred to CE as RST. The functionality of the pin has not changed. Input/push-pull output.
Page 5
Before being able to use the sample program, an additional library needs to be installed. Go to Sketch > Include Library > Manage Libraries... Put "DS1302" in the search bar and install the RTC library by Makuna (should be the first result).
Page 6
Whadda WPI301 DS1302 Real-time clock module example This demo sets the time on the DS1302 RTC module to the compiled time of the sketch. After this is configured the time returned by the DS1302 module is periodically printed on the serial monitor Check whadda.com for more information including a wiring diagram for this demo.
Page 7
Rtc.SetIsWriteProtected(false); if (!Rtc.GetIsRunning()) Serial.println("RTC was not actively running, starting now"); Rtc.SetIsRunning(true); RtcDateTime now = Rtc.GetDateTime(); if (now < compiled) Serial.println("RTC is older than compile time! (Updating DateTime)"); Rtc.SetDateTime(compiled); else if (now > compiled) Serial.println("RTC is newer than compile time. (this is expected)"); else if (now == compiled) Serial.println("RTC is the same as compile time! (not expected but all is fine)");...
Need help?
Do you have a question about the DS1302 and is the answer not in the manual?
Questions and answers