64 x 8, Serial, I 2 C Real-Time Clock



Similar documents
DS1307ZN. 64 x 8 Serial Real-Time Clock

DS1621 Digital Thermometer and Thermostat

DS1621 Digital Thermometer and Thermostat

DS1220Y 16k Nonvolatile SRAM

DS1678 Real-Time Event Recorder

DS1302 Trickle-Charge Timekeeping Chip

DS Wire Digital Thermometer and Thermostat

DS1220Y 16k Nonvolatile SRAM

DS1386/DS1386P RAMified Watchdog Timekeeper

DS12885, DS12885Q, DS12885T. Real Time Clock FEATURES PIN ASSIGNMENT

DS1225Y 64k Nonvolatile SRAM

±5ppm, I 2 C Real-Time Clock


Spread-Spectrum Crystal Multiplier DS1080L. Features

DS2401 Silicon Serial Number

PACKAGE OUTLINE DALLAS DS2434 DS2434 GND. PR 35 PACKAGE See Mech. Drawings Section

DS Real Time Clock FEATURES PIN ASSIGNMENT PIN DESCRIPTION

FM75 Low-Voltage Two-Wire Digital Temperature Sensor with Thermal Alarm

V CC TOP VIEW. f SSO = 20MHz to 134MHz (DITHERED)

Microprocessor Supervisory Circuits

Real Time Clock Module with I2C Bus

Cold-Junction-Compensated K-Thermocoupleto-Digital Converter (0 C to C)

ICS SPREAD SPECTRUM CLOCK SYNTHESIZER. Description. Features. Block Diagram DATASHEET

1 TO 4 CLOCK BUFFER ICS551. Description. Features. Block Diagram DATASHEET

7 OUT1 8 OUT2 9 OUT3 10 OUT4 11 OUT5 12 OUT6 13 OUT7 14 OUT8 15 OUT9 16 OUT10 17 OUT11 18 OUT12 19 OUT13 20 OUT14 21 OUT15 22 OUT16 OUT17 23 OUT18

ICS514 LOCO PLL CLOCK GENERATOR. Description. Features. Block Diagram DATASHEET

ICS379. Quad PLL with VCXO Quick Turn Clock. Description. Features. Block Diagram

DALLAS DS1233 Econo Reset. BOTTOM VIEW TO-92 PACKAGE See Mech. Drawings Section on Website

Application Note 58 Crystal Considerations for Dallas Real-Time Clocks

CAT28C64B F R E E. 64K-Bit CMOS PARALLEL EEPROM L E A D FEATURES DESCRIPTION BLOCK DIAGRAM

DM Segment Decoder/Driver/Latch with Constant Current Source Outputs

ABRIDGED DATA SHEET EVALUATION KIT AVAILABLE

DS1821 Programmable Digital Thermostat and Thermometer

TRIPLE PLL FIELD PROG. SPREAD SPECTRUM CLOCK SYNTHESIZER. Features

MMC314xMR. Ultra Small 3-axis Magnetic Sensor, With I 2 C Interface. Signal Path X. Signal Path Y. Signal Path Z FEATURES

INTEGRATED CIRCUITS DATA SHEET. SAA digit LED-driver with I 2 C-Bus interface. Product specification File under Integrated Circuits, IC01

LC898300XA. Functions Automatic adjustment to the individual resonance frequency Automatic brake function Initial drive frequency adjustment function

SPREAD SPECTRUM CLOCK GENERATOR. Features

DS18B20 Programmable Resolution 1-Wire Digital Thermometer

NCP Channel Programmable LED Driver

DP8570A DP8570A Timer Clock Peripheral (TCP)

Features. Modulation Frequency (khz) VDD. PLL Clock Synthesizer with Spread Spectrum Circuitry GND

Push-Pull FET Driver with Integrated Oscillator and Clock Output

DS1232LP/LPS Low Power MicroMonitor Chip

LC7218, 7218M, 7218JM

Application Note 58 Crystal Considerations with Dallas Real Time Clocks

LM75 Digital Temperature Sensor and Thermal Watchdog with Two-Wire Interface

1-to-8 I 2 C Bus Switches/Multiplexers with Bus Lock-Up Detection, Isolation, and Notification

2-wire Serial EEPROM AT24C512

256K (32K x 8) Static RAM

ICS SYSTEM PERIPHERAL CLOCK SOURCE. Description. Features. Block Diagram DATASHEET

8-Bit Flash Microcontroller for Smart Cards. AT89SCXXXXA Summary. Features. Description. Complete datasheet available under NDA

HDMM01 V1.0. Dual-axis Magnetic Sensor Module With I 2 C Interface FEATURES. Signal Path X

INTEGRATED CIRCUITS DATA SHEET. PCF8574 Remote 8-bit I/O expander for I 2 C-bus. Product specification Supersedes data of 2002 Jul 29.

Features INSTRUCTION DECODER CONTROL LOGIC AND CLOCK GENERATORS COMPARATOR AND WRITE ENABLE EEPROM ARRAY READ/WRITE AMPS 16

Features. Instruction. Decoder Control Logic, And Clock Generators. Address Compare amd Write Enable. Protect Register V PP.

Bi-directional level shifter for I²C-bus and other systems.

Allows the user to protect against inadvertent write operations. Device select and address bytes are Acknowledged Data Bytes are not Acknowledged

INTEGRATED CIRCUITS DATA SHEET. PCF bit A/D and D/A converter. Product specification Supersedes data of 2001 Dec 13.

Low-Jitter I 2 C/SPI Programmable Dual CMOS Oscillator

TLI4946. Datasheet TLI4946K, TLI4946-2K, TLI4946-2L. Sense and Control. May 2009

M24512-W M24512-R M24512-HR M24256-BW M24256-BR M24256-BHR

HCF4056B BCD TO 7 SEGMENT DECODER /DRIVER WITH STROBED LATCH FUNCTION

DM74LS191 Synchronous 4-Bit Up/Down Counter with Mode Control

Clock and calendar with 240 x 8-bit RAM

X9C102/103/104/503. Terminal Voltages ±5V, 100 Taps. Digitally-Controlled (XDCP) Potentiometer

TDA CHANNEL VOLUME CONTROLLER 1 FEATURES 2 DESCRIPTION. Figure 1. Package

On/Off Controller with Debounce and

DS2187 Receive Line Interface

DS2786 Stand-Alone OCV-Based Fuel Gauge

PCT General description. I 2 C-bus Fm+, 1 degree C accuracy, digital temperature sensor and thermal watchdog

Programmable Single-/Dual-/Triple- Tone Gong SAE 800

GTS-4E Hardware User Manual. Version: V1.1.0 Date:

MAX14760/MAX14762/MAX14764 Above- and Below-the-Rails Low-Leakage Analog Switches

HT1632C 32 8 &24 16 LED Driver

css Custom Silicon Solutions, Inc.

HD61202U. (Dot Matrix Liquid Crystal GraphicDisplay Column Driver)

AAT3520/2/4 MicroPower Microprocessor Reset Circuit

DM74LS169A Synchronous 4-Bit Up/Down Binary Counter

YAS532B MS-3R Magnetic Field Sensor Type 3R

PCA9564 Parallel bus to I 2 C-bus controller INTEGRATED CIRCUITS Sep 01. Product data sheet Supersedes data of 2004 Jun 25

INTEGRATED CIRCUITS. NE558 Quad timer. Product data Supersedes data of 2001 Aug Feb 14

The I2C Bus. NXP Semiconductors: UM10204 I2C-bus specification and user manual HAW - Arduino 1

1-Mbit (128K x 8) Static RAM

Quad, Rail-to-Rail, Fault-Protected, SPST Analog Switches

DM74LS157 DM74LS158 Quad 2-Line to 1-Line Data Selectors/Multiplexers

Tire pressure monitoring

HCC4541B HCF4541B PROGRAMMABLE TIMER

Real Time Clock USB Evaluation Board V3.0

BATRON. Specification for BTHQ 21605V-FSTF-I2C-COG

8254 PROGRAMMABLE INTERVAL TIMER

EVALUATION KIT AVAILABLE Broadband, Two-Output, Low-Noise Amplifier for TV Tuner Applications MAX2130. Maxim Integrated Products 1

DG2302. High-Speed, Low r ON, SPST Analog Switch. Vishay Siliconix. (1-Bit Bus Switch with Level-Shifter) RoHS* COMPLIANT DESCRIPTION FEATURES

Interfacing Of PIC 18F252 Microcontroller with Real Time Clock via I2C Protocol

MicroMag3 3-Axis Magnetic Sensor Module

71M6521 Energy Meter IC. Real Time Clock Compensation. The Challenge. The RTC in the 71M6521D/F. Theory of Operation APPLICATION NOTE

PCF85063A. 1. General description. 2. Features and benefits. 3. Applications. Tiny Real-Time Clock/calendar with alarm function and I 2 C-bus

GSM Power Management System ADP3404

LM95231 Precision Dual Remote Diode Temperature Sensor with SMBus Interface and TruTherm Technology

Supply voltage Supervisor TL77xx Series. Author: Eilhard Haseloff

Transcription:

DS1307 64 x 8, Serial, I 2 C Real-Time Clock GENERAL DESCRIPTION The DS1307 serial real-time clock (RTC) is a lowpower, full binary-coded decimal (BCD) clock/calendar plus 56 bytes of NV SRAM. Address and data are transferred serially through an I 2 C, bidirectional 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 fewer 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 that detects power failures and automatically switches to the backup supply. Timekeeping operation continues while the part operates from the backup supply. TYPICAL OPERATING CIRCUIT V CC CPU R PU R PU R PU = t r /C b V CC CRYSTAL X1 SCL SDA X2 DS1307 GND ORDERING INFORMATION V CC V CC SQW/OUT V BAT BENEFITS AND FEATURES Completely Manages All Timekeeping Functions o Real-Time Clock Counts Seconds, Minutes, Hours, Date of the Month, Month, Day of the Week, and Year with Leap-Year Compensation Valid Up to 2100 o 56-Byte, Battery-Backed, General-Purpose RAM with Unlimited Writes o Programmable Square-Wave Output Signal Simple Serial Port Interfaces to Most Microcontrollers o I 2 C Serial Interface Low Power Operation Extends Battery Backup Run Time o Consumes Less than 500nA in Battery- Backup Mode with Oscillator Running o Automatic Power-Fail Detect and Switch Circuitry 8-Pin DIP and 8-Pin SO Minimizes Required Space Optional Industrial Temperature Range: -40 C to +85 C Supports Operation in a Wide Range of Applications Underwriters Laboratories (UL) Recognized PIN CONFIGURATIONS TOP VLEW X1 X2 V BAT GND SO (150 mils) V CC X1 SQW/OUT X2 SCL V BAT SDA GND PDIP (300 mils) V CC SQW/OUT SCL SDA PART TEMP RANGE VOLTAGE (V) PIN-PACKAGE TOP MARK* DS1307+ 0 C to +70 C 5.0 8 PDIP (300 mils) DS1307 DS1307N+ -40 C to +85 C 5.0 8 PDIP (300 mils) DS1307N DS1307Z+ 0 C to +70 C 5.0 8 SO (150 mils) DS1307 DS1307ZN+ -40 C to +85 C 5.0 8 SO (150 mils) DS1307N DS1307Z+T&R 0 C to +70 C 5.0 8 SO (150 mils) Tape and Reel DS1307 DS1307ZN+T&R -40 C to +85 C 5.0 8 SO (150 mils) Tape and Reel DS1307N +Denotes a lead-free/rohs-compliant package. *A + anywhere on the top mark indicates a lead-free package. An N anywhere on the top mark indicates an industrial temperature range device. Underwriters Laboratories, Inc. is a registered certification mark of Underwriters Laboratories, Inc. 1 of 14 REV: 3/15

ABSOLUTE MAXIMUM RATINGS Voltage Range on Any Pin Relative to Ground... -0.5V to +7.0V Operating Temperature Range (Noncondensing) Commercial... 0 C to +70 C Industrial... -40 C to +85 C Storage Temperature Range... -55 C to +125 C Soldering Temperature (DIP, leads)... +260 C for 10 seconds Soldering Temperature (surface mount)...refer to the JPC/JEDEC J-STD-020 Specification. Stresses beyond those listed under Absolute Maximum Ratings may cause permanent damage to the device. These are stress ratings only, and functional operation of the device at these or any other conditions beyond those indicated in the operational sections of the specifications is not implied. Exposure to the absolute maximum rating conditions for extended periods may affect device reliability. RECOMMENDED DC OPERATING CONDITIONS (T A = 0 C to +70 C, T A = -40 C to +85 C.) (Notes 1, 2) PARAMETER SYMBOL CONDITIONS MIN TYP MAX UNITS Supply Voltage V CC 4.5 5.0 5.5 V Logic 1 Input V IH 2.2 V CC + 0.3 V Logic 0 Input V IL -0.3 +0.8 V V BAT Battery Voltage V BAT 2.0 3 3.5 V DC ELECTRICAL CHARACTERISTICS (V CC = 4.5V to 5.5V; T A = 0 C to +70 C, T A = -40 C to +85 C.) (Notes 1, 2) PARAMETER SYMBOL CONDITIONS MIN TYP MAX UNITS Input Leakage (SCL) I LI -1 1 µa I/O Leakage (SDA, SQW/OUT) I LO -1 1 µa Logic 0 Output (I OL = 5mA) V OL 0.4 V Active Supply Current (f SCL = 100kHz) I CCA 1.5 ma Standby Current I CCS (Note 3) 200 µa V BAT Leakage Current I BATLKG 5 50 na Power-Fail Voltage (V BAT = 3.0V) V PF 1.216 x V BAT 1.25 x V BAT 1.284 x V BAT V DC ELECTRICAL CHARACTERISTICS (V CC = 0V, V BAT = 3.0V; T A = 0 C to +70 C, T A = -40 C to +85 C.) (Notes 1, 2) PARAMETER SYMBOL CONDITIONS MIN TYP MAX UNITS V BAT Current (OSC ON); SQW/OUT OFF V BAT Current (OSC ON); SQW/OUT ON (32kHz) V BAT Data-Retention Current (Oscillator Off) I BAT1 300 500 na I BAT2 480 800 na I BATDR 10 100 na WARNING: Negative undershoots below -0.3V while the part is in battery-backed mode may cause loss of data. 2 of 14

AC ELECTRICAL CHARACTERISTICS (V CC = 4.5V to 5.5V; T A = 0 C to +70 C, T A = -40 C to +85 C.) PARAMETER SYMBOL CONDITIONS MIN TYP MAX UNITS SCL Clock Frequency f SCL 0 100 khz Bus Free Time Between a STOP and START Condition Hold Time (Repeated) START Condition t BUF 4.7 µs t HD:STA (Note 4) 4.0 µs LOW Period of SCL Clock t LOW 4.7 µs HIGH Period of SCL Clock t HIGH 4.0 µs Setup Time for a Repeated START Condition t SU:STA 4.7 µs Data Hold Time t HD:DAT 0 µs Data Setup Time t SU:DAT (Notes 5, 6) 250 ns Rise Time of Both SDA and SCL Signals Fall Time of Both SDA and SCL Signals t R 1000 ns t F 300 ns Setup Time for STOP Condition t SU:STO 4.7 µs CAPACITANCE (T A = +25 C) PARAMETER SYMBOL CONDITIONS MIN TYP MAX UNITS Pin Capacitance (SDA, SCL) C I/O 10 pf Capacitance Load for Each Bus Line C B (Note 7) 400 pf Note 1: Note 2: Note 3: Note 4: Note 5: Note 6: Note 7: All voltages are referenced to ground. Limits at -40 C are guaranteed by design and are not production tested. I CCS specified with V CC = 5.0V and SDA, SCL = 5.0V. After this period, the first clock pulse is generated. A device must internally provide a hold time of at least 300ns for the SDA signal (referred to the V IH(MIN) of the SCL signal) to bridge the undefined region of the falling edge of SCL. The maximum t HD:DAT only has to be met if the device does not stretch the LOW period (t LOW) of the SCL signal. C B total capacitance of one bus line in pf. 3 of 14

TIMING DIAGRAM SDA t BUF t LOW t HD:STA t R t F SCL t HD:STA t HIGH t SU:STA t SU:STO STOP START SU:DAT REPEATED START t HD:DAT Figure 1. Block Diagram 4 of 14

TYPICAL OPERATING CHARACTERISTICS (V CC = 5.0V, T A = +25 C, unless otherwise noted.) SUPPLY CURRENT (ua 120 110 100 90 80 70 60 50 40 30 20 10 I CCS vs. V CC 0 1.0 2.0 3.0 4.0 5.0 V CC (V) V BAT=3.0V SUPPLY CURRENT (na 400 350 300 250 200 150 I BAT vs. V BAT V CC = 0V 100 2.0 2.5 3.0 3.5 V BACKUP (V) SQW=32kHz SQW off I BAT vs. Temperature V CC=0V, V BAT=3.0 SQW/OUT vs. Supply Voltage 325.0 SQW=32kHz 32768.5 SUPPLY CURRENT (na 275.0 225.0 FREQUENCY (Hz) 32768.4 32768.3 32768.2 32768.1 175.0-40 -20 0 20 40 60 80 TEMPERATURE ( C) SQW off 32768 2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 Supply (V) 5 of 14

PIN DESCRIPTION PIN NAME FUNCTION DS1307 64 x 8, Serial, I 2 C Real-Time Clock 1 X1 2 X2 3 V BAT Connections for Standard 32.768kHz Quartz Crystal. The internal oscillator circuitry is designed for operation with a crystal having a specified load capacitance (C L ) of 12.5pF. X1 is the input to the oscillator and can optionally be connected to an external 32.768kHz oscillator. The output of the internal oscillator, X2, is floated if an external oscillator is connected to X1. Note: For more information on crystal selection and crystal layout considerations, refer to Application Note 58: Crystal Considerations with Dallas Real-Time Clocks. Backup Supply Input for Any Standard 3V Lithium Cell or Other Energy Source. Battery voltage must be held between the minimum and maximum limits for proper operation. Diodes in series between the battery and the V BAT pin may prevent proper operation. If a backup supply is not required, V BAT must be grounded. The nominal power-fail trip point (V PF ) voltage at which access to the RTC and user RAM is denied is set by the internal circuitry as 1.25 x V BAT nominal. A lithium battery with 48mAh or greater will back up the DS1307 for more than 10 years in the absence of power at +25 C. UL recognized to ensure against reverse charging current when used with a lithium battery. Go to: www.maxim-ic.com/qa/info/ul/. 4 GND Ground 5 SDA Serial Data Input/Output. SDA is the data input/output for the I 2 C serial interface. The SDA pin is open drain and requires an external pullup resistor. The pullup voltage can be up to 5.5V regardless of the voltage on V CC. 6 SCL Serial Clock Input. SCL is the clock input for the I 2 C interface and is used to synchronize data movement on the serial interface. The pullup voltage can be up to 5.5V regardless of the voltage on V CC. 7 SQW/OUT Square Wave/Output Driver. When enabled, the SQWE bit set to 1, the SQW/OUT pin outputs one of four square-wave frequencies (1Hz, 4kHz, 8kHz, 32kHz). The SQW/OUT pin is open drain and requires an external pullup resistor. SQW/OUT operates with either V CC or V BAT applied. The pullup voltage can be up to 5.5V regardless of the voltage on V CC. If not used, this pin can be left floating. 8 V CC Primary Power Supply. When voltage is applied within normal limits, the device is fully accessible and data can be written and read. When a backup supply is connected to the device and V CC is below V TP, read and writes are inhibited. However, the timekeeping function continues unaffected by the lower input voltage. DETAILED DESCRIPTION The DS1307 is a low-power clock/calendar with 56 bytes of battery-backed SRAM. The clock/calendar provides seconds, minutes, hours, day, date, month, and year information. The date at the end of the month is automatically adjusted for months with fewer than 31 days, including corrections for leap year. The DS1307 operates as a slave device on the I 2 C 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. When V CC falls below 1.25 x V BAT, the device terminates an access in progress and resets the device address counter. Inputs to the device will not be recognized at this time to prevent erroneous data from being written to the device from an out-of-tolerance system. When V CC falls below V BAT, the device switches into a lowcurrent battery-backup mode. Upon power-up, the device switches from battery to V CC when V CC is greater than V BAT +0.2V and recognizes inputs when V CC is greater than 1.25 x V BAT. The block diagram in Figure 1 shows the main elements of the serial RTC. 6 of 14

OSCILLATOR CIRCUIT The DS1307 uses an external 32.768kHz crystal. The oscillator circuit does not require any external resistors or capacitors to operate. Table 1 specifies several crystal parameters for the external crystal. Figure 1 shows a functional schematic of the oscillator circuit. If using a crystal with the specified characteristics, the startup time is usually less than one second. CLOCK ACCURACY The accuracy of the clock is dependent upon the accuracy of the crystal and the accuracy of the match between the capacitive load of the oscillator circuit and the capacitive load for which the crystal was trimmed. Additional error will be added by crystal frequency drift caused by temperature shifts. External circuit noise coupled into the oscillator circuit may result in the clock running fast. Refer to Application Note 58: Crystal Considerations with Dallas Real-Time Clocks for detailed information. Table 1. Crystal Specifications* PARAMETER SYMBOL MIN TYP MAX UNITS Nominal Frequency f O 32.768 khz Series Resistance ESR 45 kω Load Capacitance C L 12.5 pf *The crystal, traces, and crystal input pins should be isolated from RF generating signals. Refer to Application Note 58: Crystal Considerations for Dallas Real-Time Clocks for additional specifications. Figure 2. Recommended Layout for Crystal LOCAL GROUND PLANE (LAYER 2) X1 CRYSTAL X2 GND NOTE: AVOID ROUTING SIGNAL LINES IN THE CROSSHATCHED AREA (UPPER LEFT QUADRANT) OF THE PACKAGE UNLESS THERE IS A GROUND PLANE BETWEEN THE SIGNAL LINE AND THE DEVICE PACKAGE. RTC AND RAM ADDRESS MAP Table 2 shows the address map for the DS1307 RTC and RAM registers. The RTC registers are located in address locations 00h to 07h. The RAM registers are located in address locations 08h to 3Fh. During a multibyte access, when the address pointer reaches 3Fh, the end of RAM space, it wraps around to location 00h, the beginning of the clock space. 7 of 14

CLOCK AND CALENDAR The time and calendar information is obtained by reading the appropriate register bytes. Table 2 shows the RTC registers. The time and calendar are set or initialized by writing the appropriate register bytes. The contents of the time and calendar registers are in the BCD format. The day-of-week register increments at midnight. Values that correspond to the day of week are user-defined but must be sequential (i.e., if 1 equals Sunday, then 2 equals Monday, and so on.) Illogical time and date entries result in undefined operation. Bit 7 of Register 0 is the clock halt (CH) bit. When this bit is set to 1, the oscillator is disabled. When cleared to 0, the oscillator is enabled. On first application of power to the device the time and date registers are typically reset to 01/01/00 01 00:00:00 (MM/DD/YY DOW HH:MM:SS). The CH bit in the seconds register will be set to a 1. The clock can be halted whenever the timekeeping functions are not required, which minimizes current (I BATDR ). The DS1307 can be run in either 12-hour or 24-hour mode. Bit 6 of the hours register is defined as the 12-hour or 24-hour mode-select bit. When high, the 12-hour mode is selected. In the 12-hour mode, bit 5 is the AM/PM bit with logic high being PM. In the 24-hour mode, bit 5 is the second 10-hour bit (20 to 23 hours). The hours value must be re-entered whenever the 12/24-hour mode bit is changed. When reading or writing the time and date registers, secondary (user) buffers are used to prevent errors when the internal registers update. When reading the time and date registers, the user buffers are synchronized to the internal registers on any I 2 C START. The time information is read from these secondary registers while the clock continues to run. This eliminates the need to re-read the registers in case the internal registers update during a read. The divider chain is reset whenever the seconds register is written. Write transfers occur on the I 2 C acknowledge from the DS1307. Once the divider chain is reset, to avoid rollover issues, the remaining time and date registers must be written within one second. Table 2. Timekeeper Registers ADDRESS BIT 7 BIT 6 BIT 5 BIT 4 BIT 3 BIT 2 BIT 1 BIT 0 FUNCTION RANGE 00h CH 10 Seconds Seconds Seconds 00 59 01h 0 10 Minutes Minutes Minutes 00 59 02h 0 10 12 1 12 Hour 10 Hours Hours +AM/PM PM/ Hour 24 00 23 AM 03h 0 0 0 0 0 DAY Day 01 07 04h 0 0 10 Date Date Date 01 31 05h 0 0 0 10 Month Month Month 01 12 06h 10 Year Year Year 00 99 07h OUT 0 0 SQWE 0 0 RS1 RS0 Control 08h 3Fh RAM 56 x 8 00h FFh 0 = Always reads back as 0. 8 of 14

CONTROL REGISTER The DS1307 control register is used to control the operation of the SQW/OUT pin. DS1307 64 x 8, Serial, I 2 C Real-Time Clock BIT 7 BIT 6 BIT 5 BIT 4 BIT 3 BIT 2 BIT 1 BIT 0 OUT 0 0 SQWE 0 0 RS1 RS0 Bit 7: Output Control (OUT). This bit controls the output level of the SQW/OUT pin when the square-wave output is disabled. If SQWE = 0, the logic level on the SQW/OUT pin is 1 if OUT = 1 and is 0 if OUT = 0. On initial application of power to the device, this bit is typically set to a 0. Bit 4: Square-Wave Enable (SQWE). This bit, when set to logic 1, enables the oscillator output. The frequency of the square-wave output depends upon the value of the RS0 and RS1 bits. With the square-wave output set to 1Hz, the clock registers update on the falling edge of the square wave. On initial application of power to the device, this bit is typically set to a 0. Bits 1 and 0: Rate Select (RS[1:0]). These bits control the frequency of the square-wave output when the squarewave output has been enabled. The following table lists the square-wave frequencies that can be selected with the RS bits. On initial application of power to the device, these bits are typically set to a 1. RS1 RS0 SQW/OUT OUTPUT SQWE OUT 0 0 1Hz 1 X 0 1 4.096kHz 1 X 1 0 8.192kHz 1 X 1 1 32.768kHz 1 X X X 0 0 0 X X 1 0 1 9 of 14

I 2 C DATA BUS The DS1307 supports the I 2 C protocol. A device that sends data onto the bus is defined as a transmitter and a device receiving data as a receiver. The device that controls the message is called a master. The devices that are controlled by the master are referred to as slaves. The bus must be controlled by a master device that generates the serial clock (SCL), controls the bus access, and generates the START and STOP conditions. The DS1307 operates as a slave on the I 2 C bus. Figures 3, 4, and 5 detail how data is transferred on the I 2 C bus. Data transfer can be initiated only when the bus is not busy. During data transfer, the data line must remain stable whenever the clock line is HIGH. Changes in the data line while the clock line is high will be interpreted as control signals. Accordingly, the following bus conditions have been defined: Bus not busy: Both data and clock lines remain HIGH. START data transfer: A change in the state of the data line, from HIGH to LOW, while the clock is HIGH, defines a START condition. STOP data transfer: A change in the state of the data line, from LOW to HIGH, while the clock line is HIGH, defines the STOP condition. Data valid: The state of the data line represents valid data when, after a START condition, the data line is stable for the duration of the HIGH period of the clock signal. The data on the line must be changed during the LOW period of the clock signal. There is one clock pulse per bit of data. Each data transfer is initiated with a START condition and terminated with a STOP condition. The number of data bytes transferred between START and STOP conditions is not limited, and is determined by the master device. The information is transferred byte-wise and each receiver acknowledges with a ninth bit. Within the I 2 C bus specifications a standard mode (100kHz clock rate) and a fast mode (400kHz clock rate) are defined. The DS1307 operates in the standard mode (100kHz) only. Acknowledge: Each receiving device, when addressed, is obliged to generate an acknowledge after the reception of each byte. The master device must generate an extra clock pulse which is associated with this acknowledge bit. A device that acknowledges must pull down the SDA line during the acknowledge clock pulse in such a way that the SDA line is stable LOW during the HIGH period of the acknowledge related clock pulse. Of course, setup and hold times must be taken into account. A master must signal an end of data to the slave by not generating an acknowledge bit on the last byte that has been clocked out of the slave. In this case, the slave must leave the data line HIGH to enable the master to generate the STOP condition. 10 of 14

Figure 3. Data Transfer on I 2 C Serial Bus SDA MSB R/ W DIRECTION BIT ACKNOWLEDGEMENT SIGNAL FROM RECEIVER ACKNOWLEDGEMENT SIGNAL FROM RECEIVER SCL START CONDITION 1 2 6 7 8 9 1 2 3-7 8 9 ACK ACK REPEATED IF MORE BYTES ARE TRANSFERED STOP CONDITION OR REPEATED START CONDITION Depending upon the state of the R/W bit, two types of data transfer are possible: 1. Data transfer from a master transmitter to a slave receiver. The first byte transmitted by the master is the slave address. Next follows a number of data bytes. The slave returns an acknowledge bit after each received byte. Data is transferred with the most significant bit (MSB) first. 2. Data transfer from a slave transmitter to a master receiver. The first byte (the slave address) is transmitted by the master. The slave then returns an acknowledge bit. This is followed by the slave transmitting a number of data bytes. The master returns an acknowledge bit after all received bytes other than the last byte. At the end of the last received byte, a not acknowledge is returned. The master device generates all the serial clock pulses and the START and STOP conditions. A transfer is ended with a STOP condition or with a repeated START condition. Since a repeated START condition is also the beginning of the next serial transfer, the bus will not be released. Data is transferred with the most significant bit (MSB) first. 11 of 14

The DS1307 can operate in the following two modes: 1. Slave Receiver Mode (Write Mode): Serial data and clock are received through SDA and SCL. After each byte is received an acknowledge bit is transmitted. START and STOP conditions are recognized as the beginning and end of a serial transfer. Hardware performs address recognition after reception of the slave address and direction bit (see Figure 4). The slave address byte is the first byte received after the master generates the START condition. The slave address byte contains the 7-bit DS1307 address, which is 1101000, followed by the direction bit (R/W), which for a write is 0. After receiving and decoding the slave address byte, the DS1307 outputs an acknowledge on SDA. After the DS1307 acknowledges the slave address + write bit, the master transmits a word address to the DS1307. This sets the register pointer on the DS1307, with the DS1307 acknowledging the transfer. The master can then transmit zero or more bytes of data with the DS1307 acknowledging each byte received. The register pointer automatically increments after each data byte are written. The master will generate a STOP condition to terminate the data write. 2. Slave Transmitter Mode (Read Mode): The first byte is received and handled as in the slave receiver mode. However, in this mode, the direction bit will indicate that the transfer direction is reversed. The DS1307 transmits serial data on SDA while the serial clock is input on SCL. START and STOP conditions are recognized as the beginning and end of a serial transfer (see Figure 5). The slave address byte is the first byte received after the START condition is generated by the master. The slave address byte contains the 7-bit DS1307 address, which is 1101000, followed by the direction bit (R/W), which is 1 for a read. After receiving and decoding the slave address the DS1307 outputs an acknowledge on SDA. The DS1307 then begins to transmit data starting with the register address pointed to by the register pointer. If the register pointer is not written to before the initiation of a read mode the first address that is read is the last one stored in the register pointer. The register pointer automatically increments after each byte are read. The DS1307 must receive a Not Acknowledge to end a read. Figure 4. Data Write Slave Receiver Mode <RW> <Slave Address> <Word Address (n)> <Data(n)> <Data(n+1)> <Data(n+X)> S 1101000 0 A XXXXXXXX A XXXXXXXX A XXXXXXXX A... XXXXXXXX A P S - Start A - Acknowledge (ACK) P - Stop Master to slave Slave to master DATA TRANSFERRED (X+1 BYTES + ACKNOWLEDGE) Figure 5. Data Read Slave Transmitter Mode <RW> <Slave Address> <Data(n)> <Data(n+1)> <Data(n+2)> <Data(n+X)> S 1101000 1 A XXXXXXXX A XXXXXXXX A XXXXXXXX A... XXXXXXXX A P S - Start A - Acknowledge (ACK) P - Stop A - Not Acknowledge (NACK) Master to slave Slave to master DATA TRANSFERRED (X+1 BYTES + ACKNOWLEDGE); NOTE: LAST DATA BYTE IS FOLLOWED BY A NOT ACKNOWLEDGE (A) SIGNAL) 12 of 14

<RW> <Slave Address> <Word Address (n)> <Slave Address> DS1307 64 x 8, Serial, I 2 C Real-Time Clock Figure 6. Data Read (Write Pointer, Then Read) Slave Receive and Transmit <RW> S 1101000 0 A XXXXXXXX A Sr 1101000 1 A <Data(n)> <Data(n+1)> <Data(n+2)> <Data(n+X)> XXXXXXXX A XXXXXXXX A XXXXXXXX A... XXXXXXXX A P S - Start Sr - Repeated Start A - Acknowledge (ACK) P - Stop A - Not Acknowledge (NACK) Master to slave Slave to master DATA TRANSFERRED (X+1 BYTES + ACKNOWLEDGE); NOTE: LAST DATA BYTE IS FOLLOWED BY A NOT ACKNOWLEDGE (A) SIGNAL) PACKAGE INFORMATION For the latest package outline information and land patterns, go to www.maxim-ic.com/packages. PACKAGE TYPE PACKAGE CODE DOCUMENT NO. 8 PDIP 21-0043 8 SO 21-0041 13 of 14

REVISION HISTORY REVISION DATE 100208 DESCRIPTION DS1307 64 x 8, Serial, I 2 C Real-Time Clock PAGES CHANGED Moved the Typical Operating Circuit and Pin Configurations to first page. 1 Removed the leaded part numbers from the Ordering Information table. 1 Added an open-drain transistor to SQW/OUT in the block diagram (Figure 1). 4 Added the pullup voltage range for SDA, SCL, and SQW/OUT to the Pin Description table and noted that SQW/OUT can be left open if not used. 6 Added default time and date values on first application of power to the Clock and Calendar section and deleted the note that initial power-on state is not 8 defined. Added default on initial application of power to bit info in the Control Register section. 9 Updated the Package Information section to reflect new package outline drawing numbers. 13 3/15 Updated Benefits and Features section 1 14 of 14 Maxim cannot assume responsibility for use of any circuitry other than circuitry entirely embodied in a Maxim product. No circuit patent licenses are implied. Maxim reserves the right to change the circuitry and specifications without notice at any time. Maxim Integrated Products, 120 San Gabriel Drive, Sunnyvale, CA 94086 408-737- 7600 2015 Maxim Integrated Products Maxim is a registered trademark of Maxim Integrated Products, Inc.