ENGLISH 简体中文 日本語 한국어  


APPLICATION NOTE  3921

Using a DS1307 with a PIC Microcontroller

Abstract: This application note is intended to demonstrate an application using the DS1307 Real-Time Clock with a Microchip PIC microcontroller. The software example includes basic operating routines, and a schematic of the application circuit is included.

Discussion

This application note demonstrates how to use the DS1307 real-time clock (RTC) with a Microchip PIC16F628 microcontroller.

The example code, written in assembly code, includes a routine for reading the time and date from the RTC and a routine to write time and date data to the RTC from user entries.

Operation

The program uses two general-purpose port pins on the microcontroller to communicate with the DS1307 using the I2C serial interface. 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 terminal emulator program on a PC to the microcontroller. The RS-232 DTR input line controls the microcontroller's reset input.

The microcontroller in this example is a PIC16F628. For information on the microcontroller used in this application note, including available programming tools, visit the Microchip web site.

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

Figure 1. Program Listing
Download (TXT, 10kB)

Figure 1. Program Listing

Figure 2. Schematic drawing of the DS1307 circuit used with a PIC microcontroller.
More detailed image (PDF, 126kB)

Figure 2. Schematic drawing of the DS1307 circuit used with a PIC microcontroller.


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


자동 업데이트
관심있는 분야의 애플리케이션 노트가 나올 때 자동으로 업데이트 받고 싶으세요? 그렇다면 EE-Mail™을 신청하십시오.



추가 정보  APP 3921: Sep 29, 2006
DS1307 64 x 8, 직렬, I²C 실시간 클록 전체 데이터 시트
(PDF, 700kB)
무료 샘플
DS1337 I²C 직렬 실시간 클록 전체 데이터 시트
(PDF, 576kB)
무료 샘플
DS1338 56바이트 NV RAM이 내장된 I²C RTC 전체 데이터 시트
(PDF, 804kB)
무료 샘플
DS1338 56바이트 NV RAM이 내장된 I²C RTC 전체 데이터 시트
(PDF, 804kB)
무료 샘플
DS1339 I²C 직렬 실시간 클록 전체 데이터 시트
(PDF, 560kB)
무료 샘플
DS1340 트리클 충전기가 내장된 I²C RTC 전체 데이터 시트
(PDF, 244kB)
무료 샘플
DS1388 트리클 충전기 및 512 바이트 EEPROM이 내장된 I²C RTC/감시소자 전체 데이터 시트
(PDF, 392kB)
무료 샘플
 

다운로드, PDF 형식다운로드, PDF 형식 (38kB)
 AN3921, AN 3921, APP3921, Appnote3921, Appnote 3921



         



   Copyright © 2008 by Maxim Integrated Products, Dallas Semiconductor    법적 고지    개인정보보호 정책