Part Datasheet Search > Real Time Clocks > Maxim Integrated > DS1307 Datasheet PDF > DS1307 Application Note Pages 1/16
DS1307
Price from AiPCBA
DS1307Datasheet PDF
Page:
of 16 Go
If the format of the manual is confusing, please download and read the original PDF file.
Maxim > Design Support > Technical Documents > Application Notes > Real-Time Clocks > APP 95
Keywords: DS1307, DS1339, DS1340, 2-wire, serial interface, example code, sample code, example
program, sample program, timekeeping, real time clocks, RTCs
APPLICATION NOTE 95
Interfacing the DS1307 with an 8051-Compatible
Microcontroller
Mar 29, 2001
Abstract: This application note provides information on how to interface a DS1307 real-time clock (RTC)
to a microcontroller and provides some example code for accessing the part.
Introduction
The DS1307 Serial Real Time Clock, which incorporates a 2-wire serial interface, can be controlled
using an 8051-compatible microcontroller. The DS1307 in this example is connected directly to two of
the I/O ports on a DS5000 microcontroller and the 2-wire handshaking is handled by low-level drivers,
which are discussed in this application note.
DS1307 Description
The DS1307 Serial Real Time Clock is a low-power, full BCD clock/calendar plus 56 bytes of nonvolatile
SRAM. Address and data are transferred serially via the 2-wire bi-directional bus. The clock/calendar
provides seconds, minutes, hours, day, date, month, and year information. The end of the month date is
automatically adjusted for months with less than 31 days, including corrections for leap year. The clock
operates in either the 24-hour or 12-hour format with AM/PM indicator. The DS1307 has a built-in power
sense circuit which detects power failures and automatically switches to the battery supply.
DS1307 Operation
The DS1307 operates as a slave device on the serial bus. Access is obtained by implementing a START
condition and providing a device identification code followed by a register address. Subsequent registers
can be accessed sequentially until a STOP condition is executed. The START and STOP conditions are
generated using the low level drives, SEND_START and SEND_STOP found in the attached DS5000
code. Also the subroutines SEND_BYTE and READ_BYTE provide the 2-wire handshaking required for
writing and reading 8-bit words to and from the DS1307.
Hardware Configuration
The system is configured as shown in Figure 1. The DS1307 has the 2-wire bus connected to two I/O
port pins of the DS5000: SCL - P1.0, SDA - P1.1. The V
DD
voltage is 5V, R
P
= 5KΩ and the DS5000 is
using a 12-MHz crystal. The other peripheral device could be any other device that recognizes the 2-
wire protocol, such as the DS1621 Digital Thermometer and Thermostat. The interface with the D5000
Page 1 of 16
idth:62.000000px;height:9.000000px;background-color:rgba(255,255,255,0.000001);">

DS1307 Documents

Maxim Integrated
14 Pages / 0.21 MByte
Maxim Integrated
23 Pages / 1.53 MByte
Maxim Integrated
16 Pages / 0.11 MByte
Part Datasheet PDF Search
72,405,303 Parts Datasheet PDF, Update more than 5,000 PDF files ervery day.
Popular Datasheet