ENGLISH 简体中文 日本語 한국어  

    Login | Register 


   
 
Enter keywords or part number    




APPLICATION NOTE 3449

Interfacing a DS1302 With an 8051-Type Microcontroller

Abstract: This application describes how to interface a DS1302 RTC using the 3-wire interface to an 8051-type microcontroller. The example includes a schematic and example software written in C.

DS1302 Pin Assignment
DS1302 Pin Assignment

Description

This application note demonstrates how to interface a DS1302 real-time clock to an 8051-type microcontroller and provides example code showing basic interface routines. The microcontroller used in this example is the DS2250, and the software is written in C.

Operation

The program uses three general-purpose port pins on the microcontroller to control the 3-wire synchronous bus. The microcontroller initiates a data transfer by sending a command byte to the DS1302. The microcontroller then sends additional data and/or SCLKs to the DS1302, which transmits or receives data based upon the command byte.

The software is shown in Figure 1. A schematic of the circuit is shown in Figure 2.

Figure 1. Program Listing (Download ZIP file)

Figure 2. Schematic of DS1302 RTC.
For Larger Image

Figure 2. Schematic of DS1302 RTC.


Related Parts  APP 3449: Feb 21, 2005
DS1302 Trickle-Charge Timekeeping Chip Full Data Sheet
(PDF, 348kB)
Free Samples

Automatic Updates
Would you like to be automatically notified when new application notes are published in your areas of interest? Sign up for EE-Mail™.


We Want Your Feedback!

 

Download, PDF FormatDownload, PDF Format (20kB)
 AN3449, AN 3449, APP3449, Appnote3449, Appnote 3449

        •         •         •     Privacy Policy     •     Legal Notices

    Copyright © 2009 by Maxim Integrated Products