ENGLISH 简体中文 日本語 한국어  

    로그인 | 회원가입 


   
 
키워드나 부품번호를 입력해주세요    




애플리케이션 노트 3974

Using a DS32x35 with an 8051-Type Microcontroller

Abstract: This application note describes how to interface the DS32x35 real-time clock with an 8051-type microcontroller. It also provides a schematic of the application circuit and example software code for implementing basic operating routines.

Overview of the DS32x35

The DS32x35 real-time clock (RTC) is a temperature-compensated clock/calendar that includes an integrated 32.768kHz crystal, an I²C interface, and a bank of nonvolatile memory in a single package. The DS32x35's integration of a crystal resonator enhances the long-term accuracy of the device and reduces the piece-part count in a manufacturing line.

The RTC provides seconds, minutes, hours, day, date, month, and year information. The date at the end of the month 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. Additionally, the clock provides two programmable time-of-day alarms and a programmable square-wave output.

Interfacing the DS32x35 to a µC

This application note demonstrates how to interface the DS32x35 to an 8051-type microcontroller, such as the DS2250 soft-microcontroller module. Additionally, Figure 1 provides example code, written in C, for implementing basic interface routines, including routines for reading the time and date from the real-time clock (RTC); writing time and date data to the RTC from user entries; writing and reading data to and from the FRAM; reading the temperature from the temperature sensor; and selecting the proper FRAM density. The software supports both FRAM densities: 16kb (DS32B35) and 64kb (DS32C35).

Figure 2 is a schematic that illustrates the connections required for interfacing the DS32x35 RTC with an 8051-type microcontroller. The program uses two general-purpose (GP) port pins on the microcontroller to communicate with the DS32x35 using an I²C serial interface; a third GP port pin is used to enable or disable the write-protect (WP) input pin for the FRAM. The microcontroller's internal UART drives two port pins, which are connected to a DS232 line driver/receiver. User inputs and data outputs from the program are passed through the RS-232 interface from a PC's terminal-emulator program to the microcontroller. The RS-232 DTR input line controls the microcontroller's reset input.

Figure 1. Program Listing.
Download Program Files
(ZIP, 4kB)
Figure 1. Program Listing

Figure 2. A schematic illustrating the connections for interfacing the DS32x35 with an 8051-type microcontroller.
More detailed image
(PDF, 260kB)
Figure 2. A schematic illustrating the connections for interfacing the DS32x35 with an 8051-type microcontroller.


관련 부품  APP 3974: Mar 23, 2007
DS32B35 TCXO/크리스털/FRAM이 내장된 정밀 I²C RTC 전체 데이터 시트
(PDF, 416kB)
무료 샘플
DS32C35 TCXO/크리스털/FRAM이 내장된 정밀 I²C RTC 전체 데이터 시트
(PDF, 416kB)
무료 샘플

자동 업데이트
관심 분야의 애플리케이션 노트가 나올 때 자동으로 업데이트를 원하십니까? 그렇다면 EE-Mail™을 신청하십시오.


We Want Your Feedback!



의견을 보내주세요!
위 내용이 도움이 되셨나요?
여러분의 의견을 기다립니다 — Maxim은 보내주신 정정이나 제안사항을 반영하고 있습니다. 이 페이지를 평가하고 의견을 보내주십시오.

 

다운로드, PDF 형식다운로드, PDF 형식 (41kB)
 AN3974, AN 3974, APP3974, Appnote3974, Appnote 3974

        •         •         •     개인정보보호 정책     •     법적 고지

    Copyright © 2009 by Maxim Integrated Products