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 less 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.
This RTC is the replacement for the eariler DS1202. The DS1302 will work is a circuit designed for a DS1202 and will be able to use DS1202 software, HOWEVER, there can be a problem with battery life when used in a DS1202 circuit. This is the problem:
The DS1202 only had one Vcc pin and the designer normally powered the chip from the system +5 Volt and from a battery through isolating diodes. With this technique the life of a small lithium coin cell could be years.
The DS1302 has two Vcc pins one for system +5 Volt power and a seperate pin for the battery. In a circuit designed to use both Vcc pins the battery life will be years but if a DS1302 is placed in a circuit designed for a DS1202 the life of a small lithium coin cell will only be weeks.
|The photo above is of a DS1302 mounted in the application area of the MC9S12DP256 EVBplus Development board, DRAGON12, from WYTEC. This circuit used the two diode DS1202 type layout. To correct this problem bend up pin 1 and connect it directly to the positive terminal of the battery. (The diode in the photo could have been replaced with a wire jumper.)||The photo above is of the DS1302 mounted in the application area of the FOX11 MC68HC11 trainer board from WYTEC. This board has a solderless breadboard mounted above the application area. It must be removed before the DS1302 and other parts are added. The battery part # is CR1225FV available from Mouser Electronics.|
|Click here to get HC12 software for the DS1302||Click here to get HC11 software for the DS1302|
|My MC9S08QE64 Miniboard example uses the DS1302 and there is software for it.
Low cost DIP chip from ElectroDragon
DS1302 Real Time Clock Module w/ CR2032 Button Battery from SuntekStore, similar from DX.com
See also my Software for the DS1307 page.
Roger's Embedded Microcontrollers Home Page
This page written by Roger Schaefer. Last updated August 9, 2013