使用DS1307的PIC单片机-Using a DS1307 with a PIC Microcontroller

08-17| http://www.dianzi6.com | 单片机学习|人气:741

使用DS1307的PIC单片机-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 I²C 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.

如果觉得 使用DS1307的PIC单片机-Using a DS1307 with a PIC Microcontroller这篇文章不错,可以推荐给朋友分享哦。
本文Tags:单片机开发,单片机原理,单片机教程,单片机学习,
相关单片机学习资料


温馨提示; 本站的资料全部免费下载,为方便下次找到本站记得将本站加入收藏夹哦,牢记网址http://www.dianzi6.com

此页提供使用DS1307的PIC单片机-Using a DS1307 with a PIC Microcontroller单片机开发,单片机原理,单片机教程, 单片机学习参考。本站还有更多的单片机学习相关资料分享。
Copyright© www.dianzi6.com Inc. All rights reserved 。 1 2 3 4 5 6 7 8