Klok DS1302 verouderd
This page is outdated since the DS1302 is replaced by the DS1307 that has it`s own pagina.

Description
This brick is an complete clock, providing a date and time with a resolution of 1 second with leap-year compensation valid up to 2100. The DS1302 is designed to operate on very low power and retain data and clock information on less than 1µW. It uses Less Than 300nA at 2.0V. The DS1302 is the successor to the DS1202. A 3Vdc battery cell (CR2032) keeps it running while powered off. Interfacing the DS1302 with a microprocessor is simplified by using synchronous serial communication. Communication is done through I²C and the address is fixed at #D0.

Connections
Only three wires are required to communicate with the clock/RAM: CE, I/O (data line), and SCLK (serial clock). On the Arduino these lines can be connected to any I/O pin directly, without any resistors needed.
ConnectionsBrickLibrary
CERSTkCePin
I/ODATkIoPin
SCLKCLKkSclkPin

Libraries
There are several libraries available to function with the DS1302: