Category Index

DS1302 REAL TIME CLOCK MODULE

CAT # ME-48 (2 Reviews) Write a Review

$ 3.00
$3.00 each
Quantity:
+
+ Add to Wishlist
Product Description
The DS1302 trickle-charge timekeeping chip contains a real-time clock/calendar. 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. On-board CR2032 battery provides backup power. Operates on 2-5.5VDC @ 300nA. Overall dimensions 44mm x 23mm x 11mm.
Spec sheet available in PDF format.
WARNING: May cause cancer or reproductive harm.
California Prop. 65
Why is this here?
Customer Reviews (2 Reviews)

Write a Review (requires login)

Can't beat the price

Reviewer: from Hilo, Hawaii, U.S.

It is nice that it comes with a new CR2032 battery. The spec. sheet has a link to useful, well commented Arduino code. This is an older edition of the various real-time clocks available. The unit I connected to my Arduino appears to have fallen behind by six seconds over a three-day period, but so what.

2 of 2 people found this review helpful. Do you? Yes No  Certified buyer

Using DS1302 with Arduino... DS1307 better

Reviewer: from near Philadelphia, PA

The DS1302 is a VERY old clock module and it's probably better to use a DS1307 because you can't set this clock from your system clock. You have to enter the date/time manually by entering values from your system clock display just beore you upload your Arduino Sketch.
Here is the code I wrote. You will have to download and manually install the library.
// library from
// https://github.com/hickey/arduino/tree/master/Libraries/DateTime/DateTime
#include
MyRealTimeClock myRTC(6, 7, 8); // Assign Digital Pins
int DayOfWeek;
void setup() {
Serial.begin(9600);
// Read values from system clock screen display.
// Add a few seconds to account for upload time.
// (sec, min, hr, day of week (1-7), day, mon, day, year)
// Display for U.S. date format: month/day/year
myRTC.setDS1302Time(30, 3, 16, 2 , 10, 5, 2021);
}
void loop() {
myRTC.updateTime();
Serial.print("Current Date / Time: ");
DayOfWeek=(myRTC.dayofweek);
Serial.print(DayOfWeek); Serial.print(' ');
switch(DayOfWeek) {
case 1: Serial.print("Sun "); break;
case 2: Serial.print("Mon "); break;
case 3: Serial.print("Tue "); break;
case 4: Serial.print("Wed "); break;
case 5: Serial.print("Thu "); break;
case 6: Serial.print("Fri "); break;
case 7: Serial.print("Sat "); break;
}
Serial.print(myRTC.month); Serial.print("/");
Serial.print(myRTC.dayofmonth); Serial.print("/");
Serial.print(myRTC.year); Serial.print(" ");
Serial.print(myRTC.hours); Serial.print(":");
Serial.print(myRTC.minutes); Serial.print(":");
Serial.println(myRTC.seconds); delay( 5000);
}

1 of 1 people found this review helpful. Do you? Yes No  Certified buyer


You might also like