DS1904 RTC iButton SPECIAL FEATURES Easily affixed with self-stick adhesive back- Real-Time Clock/calendar in binary format ing, latched by its flange, or locked with a Uses the same binary time/date representation ring pressed onto its rim as the DS1994 but with 1 second resolution Presence detector acknowledges when reader Clock accuracy is better than 2 minutes per first applies voltage month at 25C Operating temperature range from -40C to F5 MicroCan +85C Over 10 years of operation 5.89 0.51 COMMON iButton FEATURES Unique, factory-lasered and tested 64-bit 16.25 registration number (8-bit family code + 48-bit serial number + 8-bit CRC tester) 40 24 17.35 assures absolute traceability because no two 000000FBC52B 1-Wire parts are alike Multidrop controller for MicroLAN Digital identification and information by momentary contact IO GND Chip-based data carrier compactly stores in- formation All dimensions are shown in millimeters Data can be accessed while affixed to object Economically communicates to host with a ORDERING INFORMATION single digital signal at 16.3 kbps DS1904L-F5 F5 MicroCan Standard 16 mm diameter and 1-Wire Denotes an RoHS-compliant device that may include protocol ensure compatibility with iButton lead(Pb) that is exempt under the RoHS requirements. Device family Button shape is self-aligning with cup-shaped EXAMPLES OF ACCESSORIES probes DS9096P Self-Stick Adhesive Pad Durable stainless steel case engraved with DS9101 Multi-Purpose Clip registration number withstands harsh envi- DS9093RA Mounting Lock Ring ronments DS9093A Snap-In Fob DS9092 iButton Probe iButton DESCRIPTION The DS1904 RTC iButton is a rugged real-time clock module that can be accessed with minimal hardware. Data is transferred serially via the 1-Wire protocol, which requires only a single data lead and a 1-Wire and iButton are registered trademarks of Maxim Integrated Products, Inc. For pricing, delivery, and ordering information, please contact Maxim Direct at 19-4864 Rev 6/13 1-888-629-4642, or visit Maxim Integrateds website at www.maximintegrated.com. 1 of 13 DS1904 ground return. The DS1904 contains a unique 64-bit factory-lasered ROM and a real-time clock/calendar implemented as a binary counter. The durable MicroCan package is highly resistant to environmental hazards such as dirt, moisture, and shock. Accessories permit the DS1904 to be mounted on almost any surface including printed circuit boards and plastic key fobs. The DS1904 adds functions such as calendar, time and date stamp, stopwatch, hour meter, interval timer, and logbook to any type of electronic device or embedded application that uses a microcontroller. OVERVIEW The DS1904 has two main data components: 1) 64-bit lasered ROM, and 2) real-time clock counter (Figure 1). The real-time clock utilizes an on-chip oscillator that is connected to a 32.768 kHz crystal. The hierarchical structure of the 1-Wire protocol is shown in Figure 2. The bus master must first provide one of four ROM function commands: 1) Read ROM, 2) Match ROM, 3) Search ROM, 4) Skip ROM. The protocol for these ROM functions is described in Figure 7. After a ROM function command is successfully executed, the real-time clock functions become accessible and the master may then provide one of the real-time clock function commands. The protocol for these commands is described in Figure 5. All data is read and written least significant bit first. BLOCK DIAGRAM Figure 1 ROM 64-BIT LID DATA FUNCTION LASERED CONTACT CONTROL ROM CLOCK FUNCTION CONTROL READ/WRITE BUFFER 3V 1 Hz RTC COUNTER (32-BIT) LITHIUM 32.768 kHz OSCILLATOR DIVIDER CONTROL OSCILLATOR 64-BIT LASERED ROM Each DS1904 contains a unique ROM code that is 64 bits long. The first eight bits are a 1-Wire family code. The next 48 bits are a unique serial number. The last eight bits are a CRC of the first 56 bits (see Figure 3). The 1-Wire CRC is generated using a polynomial generator consisting of a shift register and 8 5 4 XOR gates as shown in Figure 4. The polynomial is X + X + X + 1. Additional information about the Maxim 1-Wire Cyclic Redundancy Check is available in Application Note 937: Book of iButton Standards. The shift register bits are initialized to zero. Then starting with the least significant bit of the family code, one bit at a time is shifted in. After the 8th bit of the family code has been entered, then the serial number is entered. After the 48th bit of the serial number has been entered, the shift register contains the CRC value. Shifting in the eight bits of CRC should return the shift register to all zeros. The 64-bit ROM and ROM Function Control section allow the DS1904 to operate as a 1-Wire device and follow the 1-Wire protocol detailed in the 1-Wire Bus System section. 2 of 13