AN3921| Application Note

AN3921 PDF

AN3921| Application Note


Maxim/Dallas > App Notes > REAL-TIME CLOCKS Keywords: DS1307, RTC, Real-Time Clock

Sep 05, 2006

APPLICATION NOTE 3921

Using a DS1307 with a PIC Microcontroller
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.


AN3921 Application Note maxim Download PDF

Add this permalink to your bookmarks for future download of AN3921 ApplicationNote

Permalink: http://application.emcelettronica.com/maxim/AN3921

PDF AN3921 APPLICATION NOTE