Module – DS1302 – RTC Tijdklok

Hardware

ds1302-cr1220-bovenkantds1302-cr1220-onderkant  ds1302-cr2032

BESTELLEN

Een RTC tijdklok met batterij, de klok maakt gebruik van de DS1302 chip.

Informatie (ENG)

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. The end of the month date is automatically adjusted for months with fewer than 31 days, including corrections for leap year. The clock operates in either the 24-hour or 12-hour format with an AM/PM indicator.
Interfacing the DS1302 with a microprocessor is simplified by using synchronous serial communication. Only three wires are required to communicate with the clock/RAM: CE, I/O (data line), and SCLK (serial clock). Data can be transferred to and from the clock/RAM 1 byte at a time or in a burst of up to 31 bytes. The DS1302 is designed to operate on very low power and retain data and clock information on less than 1µW.The DS1302 is the successor to the DS1202. In addition to the basic timekeeping functions of the DS1202, the DS1302 has the additional features of dual power pins for primary and backup power supplies, programmable trickle charger for VCC1, and seven additional bytes of scratchpad memory.
Key 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
  • 8-Pin DIP or Optional 8-Pin SO for Surface Mount
  • Simple 3-Wire Interface
  • TTL-Compatible (VCC = 5V)
  • Optional Industrial Temperature Range: -40°C to +85°C
  • DS1202 Compatible

Pinout

ds1302-cr1220-bovenkant

Pin (batterij aan de voorkant):Functie:
01VCC1 (batterij opladen)
02VCC2 (+5v)
03GND
04SCLK (serial clock)
05I/O (data)
06RST (reset)

ds1302-cr2032

Pin (batterij aan de voorkant):Functie:
01VCC1 (+5v)
02GND
03CLK (serial clock)
04DAT (data)
05RST (reset)

IC Pinout:

Arduino

Sluit de Module aan zoals aangegeven op onderstaand schema:

Arduino DS1302 schema

Arduino pin:Pin (batterij aan de voorkant):
+5v01 - VCC1 (+5v)
GND02 - GND
D603 - CLK (serial clock)
D704 - DAT (data)
D805 - RST (reset)

Onderstaand script maakt gebruik van de “Henning Karlsen” bibliotheek deze stelt de tijd en datum in en leest de gegevens uit via de seriële poort.

Ps. Vergeet na de upload deze regels niet uit te zetten of weg te halen! en dan het script zonder deze regels opnieuw te uploaden.

Het resultaat:

Arduino DS1302 output

Alleen een gedeelte van de tijd, hieronder als voorbeeld de uren:


Arduino Library

rtc klok icon

Installatie van Arduino IDE libraries: Arduino info

Informatie (ENG):

Library: DS1302
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. The end of the month date is automatically adjusted for months with fewer than 31 days, including corrections for leap year. The clock operates in either the 24-hour or 12-hour format with an AM/PM indicator (The library only support the 24-hour mode).

Interfacing the DS1302 with a microprocessor is simplified by using synchronous serial communication. Only three wires are required to communicate with the clock/RAM: CE, I/O (data line), and SCLK (serial clock). Data can be transferred to and from the clock/RAM 1 byte at a time or in a burst of up to 31 bytes. The DS1302 is designed to operate on very low power and retain data and clock information on less than 1µW.

The DS1302 is the successor to the DS1202. In addition to the basic timekeeping functions of the DS1202, the DS1302 has the additional features of dual power pins for primary and backup power supplies, programmable trickle charger for VCC1, and seven additional bytes of scratchpad memory.

Download @ henningkarlsen.com

Afmetingen

GEEN GEGEVENS

Schema

Teardown

GEEN GEGEVENS

Datasheet

Fritzing

Downloads

GEEN GEGEVENS