ENGLISH 简体中文 日本語 한국어  



   
 
キーワードまたは型番を入力    




アプリケーションノート 3921

Using a DS1307 with a PIC Microcontroller

Abstract: This application note is intended to demonstrate an application using the DS1307 real-time clock (RTC) with a Microchip PIC microcontroller. The software example includes basic operating routines. 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.


関連製品  APP 3921: Sep 29, 2006
DS1307 64 x 8、シリアル、I²Cリアルタイムクロック フルデータシート
(PDF, 304kB)
無料
サンプル
DS1337 I²Cシリアルリアルタイムクロック フルデータシート
(PDF, 240kB)
無料
サンプル
DS1338 56バイトNV RAM付き、I²C RTC フルデータシート
(PDF, 268kB)
無料
サンプル
DS1338 56バイトNV RAM付き、I²C RTC フルデータシート
(PDF, 268kB)
無料
サンプル
DS1339 I²Cシリアルリアルタイムクロック フルデータシート
(PDF, 208kB)
無料
サンプル
DS1340 トリクルチャージャ付きI²C RTC フルデータシート
(PDF, 240kB)
無料
サンプル
DS1388 トリクルチャージャおよび512バイトEEPROM内蔵I²C RTC/監視回路 フルデータシート
(PDF, 256kB)
無料
サンプル

自動アップデート
お客様が関心のある分野でアプリケーションノートが新規に掲載された際に自動通知Eメールの受信を希望する場合は、EE-Mail™にご登録ください。


We Want Your Feedback!



フィードバックをお寄せください。
内容に満足されましたか、あるいは満足されていませんか?もっと良いページにできると思いますか?あるいは、単なるコメントでも結構です。フィードバックをお待ちしています。—マキシムはお客様からいただく訂正、提案を元に改善していきます。 このページを評価し、フィードバックを送信する。

 

ダウンロード、PDFフォーマットダウンロード、PDFフォーマット(39kB)
 AN3921, AN 3921, APP3921, Appnote3921, Appnote 3921

        •         •         •     プライバシーポリシー     •     法的お知らせ

    Copyright © 2009 by Maxim Integrated Products