

The DS1302 RTC is a compact real time battery backed clock module capable of accurately keeping the current time and date. It includes a 24 hour clock consisting of hours, minutes & seconds and a calendar which stores the current year in 2 digits, month and date. The calendar is also capable of correcting for months with different amounts of days and leap years. Additionally there is a day of the week counter to keep track of the current date.
Besides keeping track of the time and date the module also includes 31 bytes of RAM that is free to be used by the end users application. This makes it useful as an additional memory storage area or to store temporary data in applications where the microcontroller is reset or placed into deep sleep modes.
The module includes a CR2032 button cell which maintains the clock and RAM when power is removed from the modules header.
EXCLUSIVE LIBRARY:
For Arduino users we have written an exclusive library (HCDS1302) that gives access to these features. See link at the bottom of this post.
FEATURES:
Real-Time Clock Counts Seconds, Minutes, Hours, Date of the Month, Month, Day of the Week, and Year with Leap-Year Compensation Valid Up to 2100
31 x 8 Battery-Backed General-Purpose RAM
Serial I/O for Minimum Pin Count
2.0V to 5.5V Full Operation
Uses Less than 300nA at 2.0V
Single-Byte or Multiple-Byte (Burst Mode)
Data Transfer for Read or Write of Clock or RAM Data
Simple 3-Wire Interface
TTL-Compatible (VCC = 5V)
Optional Industrial Temperature Range: -40°C to +85°C
DS1202 Compatible
PINOUT:
VCC……………..2 to 5.5V
GND………..…...GND
CLK/SCK……Clock
DAT/IO………..Data
RST/CE………..Chip enable
Note pin order may vary
Example sketches:
Downloads:
ARDUINO HCDS1302 LIBRARY:
The HCDS1302 library can be downloaded from the software section of this forum here:
viewtopic.php?f=58&t=3095&p=8713
Diagrams, libraries, and example code are provided as an additional free service by Hobby Components and are not sold as part of this product. We do no provide any guarantees or warranties as to their accuracy or fitness for purpose.
Descriptions and diagrams on this page are copyright Hobby Components Ltd and may not be reproduced without permission.