DS1921G_11 MAXIM | Alldatasheet
Document overview
- Manufacturer or author: Provided By ALLDATASHEET.COM(FREE DATASHEET DOWNLOAD SITE)
- PDF pages: 42
Technical content
Features
♦ Digital Thermometer Measures Temperature in 0.5°C Increments ♦ Accuracy ±1°C from -30°C to +70°C (See the Electrical Characteristics for Accuracy Specification) ♦ Built-In Real-Time Clock (RTC) and Timer Has Accuracy of ±2 Minutes per Month from 0°C to +45°C ♦ Water Resistant or Waterproof if Placed Inside DS9107 i Button Capsule (Exceeds Water Resistant 3 ATM Requirements) ♦ Automatically Wakes Up and Measures Temperature at User-Programmable Intervals from 1 Minute to
255 Minutes
♦ Logs Up to 2048 Consecutive Temperature Measurements in Protected NV RAM ♦ Records a Long-Term Temperature Histogram with 2.0°C Resolution ♦ Programmable Temperature High and Temperature Low Alarm Trip Points ♦ Records Up to 24 Timestamps and Durations When Temperature Leaves the Range Specified by the Trip Points ♦ 512 Bytes of General-Purpose Read/Write NV RAM ♦ Communicates to Host with a Single Digital Signal at 15.4kbps or 125kbps Using 1-Wire Protocol Common iButton Features ♦ Digital Identification and Information by Momentary Contact ♦ Unique, Factory-Lasered, and Tested 64-Bit Registration Number (8-Bit Family Code + 48-Bit Serial Number + 8-Bit CRC Tester) Assures Absolute Traceability Because No Two Parts are Alike ♦ Multidrop Controller for 1-Wire Net ♦ Chip-Based Data Carrier Compactly Stores Information ♦ Data Can Be Accessed While Affixed to Object ♦ Button Shape is Self-Aligning with Cup-Shaped Probes ♦ Durable Stainless-Steel Case Engraved with Registration Number Withstands Harsh Environments ♦ Easily Affixed with Self-Stick Adhesive Backing, Latched by Its Flange, or Locked with a Ring Pressed Onto Its Rim ♦ Presence Detector Acknowledges When Reader First Applies Voltage ♦ Meets UL 913, 5th Ed., Rev. 1997-02-24; Intrinsically Safe Apparatus: Approved Under Entity Concept for Use in Class I, Division 1, Group A, B, C, and D Locations DS1921G Thermochron iButton
Ordering Information
19-5101; Rev 4; 4/11 For pricing, delivery, and ordering information, please contact Maxim Direct at 1-888-629-4642, or visit Maxim’s website at www.maxim-ic.com. PART TEMP RANGE PIN-PACKAGE DS1921G-F5# -40°C to +85°C F5 i Button Examples of Accessories PART ACCESSORY DS9096P Self-Stick Adhesive Pad DS9101 Multipurpose Clip DS9093RA Mounting Lock Ring DS9093A Snap-In Fob DS9092 i Button Probe Pin Configuration appears at end of data sheet. Thermochron, iButton, and 1-Wire are registered trademarks of Maxim Integrated Products, Inc. #Denotes a RoHS-compliant device that may include lead(Pb) that is exempt under the RoHS requirements. Temperature Logging in Cold Chain, Food Safety, Pharmaceutical, and Medical Products
ELECTRICAL CHARACTERISTICS
(VPUP = +2.8V to +5.25V, TA = -40°C to +85°C.) 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 absolute maximum rating conditions for extended periods may affect device reliability. PARAMETER SYMBOL CONDITIONS MIN TYP MAX UNITS IO PIN: GENERAL DATA 1-Wire Pullup Resistance RPUP (Notes 1, 2) 2.2 k Input Capacitance CIO (Notes 3, 4) 100 800 pF Input Load Current IL IO pin at VPUP (Note 5) 10 μA VPUP > 4.5V 1.14 2.70 High-to-Low Switching Threshold (Notes 4, 6, 7, 8) VTL 0.71 2.70 V Input Low Voltage VIL (Notes 1, 6, 9) 0.30 V VPUP > 4.5V 1.00 2.70 Low-to-High Switching Threshold (Notes 4, 6, 7, 10) VTH 0.66 2.70 V Output Low Voltage at 4mA V OL (Notes 6, 11) 0.4 V Standard speed, RPUP = 2.2k 5 Overdrive speed, R PUP = 2.2k 2 Recovery Time (Notes 1, 4) t REC Overdrive speed, directly prior to reset pulse; R PUP = 2.2k 5 μs Standard speed 65 Time-Slot Duration (Notes 1, 12) t SLOT Overdrive speed 8 μs IO PIN: 1-Wire RESET, PRESENCE-DETECT CYCLE Standard speed, VPUP > 4.5V 480 640 Standard speed 540 640 Overdrive speed, VPUP > 4.5V 48 80 Reset Low Time (Notes 1,12) t RSTL Overdrive speed 58 80 μs Standard speed 15 60 Presence-Detect High Time (Note 12) tPDH Overdrive speed 1.1 6 μs Standard speed 60 270 Overdrive speed, VPUP > 4.5V 7.5 24 Presence-Detect Low Time (Note 12) tPDL Overdrive speed 7.5 32 μs Standard speed 60 75Presence-Detect Sample Time (Notes 1, 4) tMSP Overdrive speed 6 8.6 μs *Storage or operation above +50°C significantly reduces battery life.
Note 1: System requirement. Note 2: Maximum allowable pullup resistance is a function of the number of 1-Wire devices in the system and 1-Wire recovery times. The specified value here applies to systems with only one device and with the minimum 1-Wire recovery times. For more heavily loaded systems, an active pullup such as that found in the DS2480B may be required. Note 3: Capacitance on IO could be 800pF when power is first applied. If a 2.2kΩ resistor is used to pull up the data line, 2.5µs after VPUP has been applied, the parasite capacitor does not affect normal communication. Note 4: These values are derived from simulation across process, voltage, and temperature and are not production tested. Note 5: Input load is to ground. Note 6: All voltages are referenced to ground. Note 7: VTL and VTH are functions of the internal supply voltage, which is a function of VPUP and the 1-Wire recovery times. The VTH and VTL maximum specifications are valid at VPUP = 5.25V. In any case, VTL < VTH < VPUP. Note 8: Voltage below which, during a falling edge of IO, a logic 0 is detected. Note 9: The voltage on IO must be less than or equal to VILMAX whenever the master drives the line low. Note 10: Voltage above which, during a rising edge on IO, a logic 1 is detected. Note 11: The I-V characteristic is linear for voltages less than 1V. Note 12: Numbers in bold are not in compliance with the published iButton standards. See the Comparison Table. Note 13: ε in Figure 15 represents the time required for the pullup circuitry to pull the voltage on the IO pin up from VIL to VTH. The actual maximum duration for the master to pull the line low is tW1LMAX + tF - ε and tW0LMAX + tF - ε, respectively. Note 14: δ in Figure 15 represents the time required for the pullup circuitry to pull the voltage on the IO pin up from VIL to the input high threshold of the bus master. The actual maximum duration for the master to pull the line low is tRLMAX + tF. Note 15: This number was derived from a test conducted by Cemagref in Antony, France, in July 2000. http://www.cemagref.fr/English/index.htm Test Report No. E42 Note 16: Total accuracy is Δϑ plus 0.25°C quantization due to the 0.5°C digital resolution of the device. ELECTRICAL CHARACTERISTICS (continued) (VPUP = +2.8V to +5.25V, TA = -40°C to +85°C.) PARAMETER SYMBOL CONDITIONS MIN TYP MAX UNITS IO PIN: 1-Wire WRITE Standard speed 60 120 Overdrive speed, VPUP > 4.5V 6 15Write-Zero Low Time (Notes 1, 12, 13) tW0L Overdrive speed 8.5 15 μs Standard speed 5 15 Write-One Low Time (Notes 1, 13) tW1L Overdrive speed 1 2 μs IO PIN: 1-Wire READ Standard speed 5 15 - Read Low Time (Notes 1, 14) t RL Overdrive speed 1 2 - μs Standard speed tRL + 15 Read Sample Time (Notes 1, 14) tMSR Overdrive speed tRL + 2 μs REAL-TIME CLOCK Frequency Deviation F -5°C to +46°C -48 +46 ppm TEMPERATURE CONVERTER Tempcore Operating Range T TC -40 +85 °C Conversion Time tCONV 19 90 ms Thermal Response Time Constant RESP (Note 15) 130 s -30°C to +70°C -1.0 +1.0 Conversion Error (Notes 16, 17) Number of Conversions NCONV (Notes 4, 18) (See the lifetime graphs.) —
Note 17: WARNING: Not for use as the sole method of measuring or tracking temperature in products and articles that could affect the health or safety of persons, plants, animals, or other living organisms, including but not limited to foods, beverages, pharmaceuticals, medications, blood and blood products, organs, flammable, and combustible products. User shall assure that redundant (or other primary) methods of testing and determining the handling methods, quality, and fitness of the articles and products should be implemented. Temperature tracking with this product, where the health or safety of the aforementioned persons or things could be adversely affected, is only recommended when supplemental or redundant information sources are used. Data-logger products are 100% tested and calibrated at time of manufacture by Maxim to ensure that they meet all data sheet parameters, including temperature accuracy. User shall be responsible for proper use and storage of this product. As with any sensor-based product, user shall also be responsible for occasionally rechecking the temperature accuracy of the product to ensure it is still operating properly. Note 18: The number of temperature conversions (= samples) possible with the built-in energy source depends on the operating and storage temperature of the device. When not in use for a mission, the RTC oscillator should be turned off and the device should be stored at a temperature not exceeding +25°C. Under this condition the shelf life time is 10 years minimum. Thermochron iButton COMPARISON TABLE LEGACY VALUES DS1921G VALUES STANDARD SPEED (μs) OVERDRIVE SPEED (μs) ST ANDARD SPEED (μs) OVERDRIVE SPEED (μs) PARAMETER MIN MAX MIN MAX MIN MAX MIN MAX tSLOT (including tREC) 61 (undefined) 7 (undefined) 65* (undefined) 8* (undefined) tRSTL 480 (undefined) 48 80 540 640 58 80 tPDH 15 60 2 6 15 60 1.1 6 tPDL 60 240 8 24 60 270 7.5 32 tW0L 60 120 6 16 60 120 8.5 15 iButton CAN PHYSICAL SPECIFICATION SIZE See the Package Information section. WEIGHT Ca. 3.3g SAFETY Meets UL 913, 5th Ed., Rev. 1997-02-24; Intrinsically Safe Apparatus, approval under Entity Concept for use in Class I, Division 1, Group A, B, C, and D Locations. *Intentional change; longer recovery time between time slots. Note: Numbers in bold are not in compliance with the published iButton standards. ELECTRICAL CHARACTERISTICS (continued) (VPUP = +2.8V to +5.25V, TA = -40°C to +85°C.)
RTC Deviation vs. Temperature -10 -40 -30 -20 -10 0 10 20 30 40 50 60 70 80 TEMPERATURE (°C) RTC DEVIATION (MINUTES/MONTH) UPPER LIMIT LOWER LIMIT Minimum Product Lifetime vs. Temperature at Different Sample Rates 0.00 1.00 2.00 3.00 4.00 5.00 6.00 7.00 8.00 9.00 10.00 11.00MINIMUM PRODUCT LIFETIME (YEARS) -40 -30 -20 -10 0 10 20 30 40 50 60 70 80 TEMPERATURE (°C) EVERY MINUTE EVERY 3 MINUTES EVERY 10 MINUTES NO SAMPLES OSCILLATOR OFF
Minimum Product Lifetime vs. Sample Rate at Different Temperatures 0.00 1.00 2.00 3.00 4.00 5.00 6.00 7.00 8.00 9.00 10.00 11.00 1 10 100 1000 MINUTES BETWEEN SAMPLES MINIMUM PRODUCT LIFETIME (YEARS) +15°C +40°C +60°C +70°C +85°C +45°C +50°C +55°C -20°C -40°C Accuracy Limits -2.0 -1.5 -1.0 -0.5 0.5 1.0 1.5 2.0 ACCURACY (°C) -40 -30 -20 -10 0 10 20 30 40 50 60 70 80 TEMPERATURE (°C) UPPER LIMIT LOWER LIMIT
Figure 5. Memory Map
20 Hour
10 Hour
Figure 6. Register Pages Map ones), however, ends the mission and overwrites selected writable registers.
Figure 6. Register Pages Map (continued) ones), however, ends the mission and overwrites selected writable registers. 5 is the 20hr bit (20hr to 23hr). DS1921G includes a counter with a range from 1 to 7. between the years 2000 and 2099.
The DS1921G also contains an RTC alarm function. The RTC Alarm registers are located in registers 0207h to 020Ah. The most significant bit of each of the alarm registers is a mask bit. When all the mask bits are logic 0, an alarm occurs once per week when the values stored in timekeeping registers 0200h to 0203h match the values stored in the RTC Alarm registers. Any alarm sets the timer alarm flag (TAF) in the device’s Status register (address 214h). The bus master can set the search conditions in the Control register (address 20Eh) to identify devices with timer alarms by means of the conditional search function (see the ROM Function Commands section). Thermochron iButton RTC Alarm Control ALARM REGISTER MASK BITS (BIT 7 OF 0207h TO 20Ah) MS MM MH MD FUNCTION 1 1 1 1 Alarm once per second. 0 1 1 1 Alarm when seconds match (once per minute). 0 0 1 1 Alarm when minutes and seconds match (once every hour). 0 0 0 1 Alarm when hours, minutes, and seconds match (once every day). 0 0 0 0 Alarm when day, hours, minutes, and seconds match (once every week). RTC and RTC Alarm Registers Map ADDRESS BIT 7 BIT 6 BIT 5 BIT 4 BIT 3 BIT 2 BIT 1 BIT 0 0200h 0 10 Seconds Single Seconds 0201h 0 10 Minutes Single Minutes 0202h 0 12/24 20 Hour AM/PM 10 Hour Single Hours 0203h 0 0 0 0 0 Day of Week 0204h 0 0 10 Date Single Date 0205h CENT 0 0 10 Months Single Months 0206h 10 Years Single Years 0207h MS 10 Seconds Alarm Single Seconds Alarm 0208h MM 10 Minutes Alarm Single Minutes Alarm 0209h MH 12/24 020Ah MD 0 0 0 0 Day of Week Alarm
The DS1921G measures temperatures with a resolution of 0.5°C. Temperature values are represented in a sin- gle byte as an unsigned binary number, which trans- lates into a theoretical range of 128°C. The range, however, has been limited to values from 0000 0000 (00h) through 1111 1010 (FAh). The codes 01h to F9h are considered valid temperature readings. If a temperature conversion yields a temperature that is out of range, it is recorded as 00h (if too low) or FAh (if too high). Since out-of-range results are accumulated in histogram bins 0 and 62 (see the Temperature Logging and Histogram section), the data in these bins is of lim- ited value. For this reason the specified temperature range of the DS1921G is considered to begin at code 04h and end at code F7h, which corresponds to his- togram bins 1 to 61. With T[7…0] representing the decimal equivalent of a tem- perature reading, the temperature value is calculated as This equation is valid for converting temperature read- ings stored in the data-log memory as well as for data read from the Forced Temperature Conversion Readout register (address 0211h). To specify the temperature alarm thresholds, this equa- tion needs to be resolved to A value of 23°C, for example, thus translates into 126 decimal or 7Eh. This corresponds to the binary patterns 0111 1110, which could be written to a Temperature Alarm register (address 020Bh and 020Ch, respectively). Sample Rate The content of the Sample Rate register (address 020Dh) determines how many minutes the temperature conversions are apart from each other during a mission. The sample rate can be any value from 1 to 255, coded as an unsigned 8-bit binary number. If the memory has been cleared (Status register bit MEMCLR = 1) and a mission is enabled (Control register bit EM = 0), writing a nonzero value to the Sample Rate register starts a mis- sion. For a full description of the correct sequence of steps to start a temperature-logging mission, see the Missioning or Mission Example: Prepare and Start a New Mission sections. DS1921G Thermochron iButton Temperature Alarm Register Map ADDRESS BIT 7 BIT 6 BIT 5 BIT 4 BIT 3 BIT 2 BIT 1 BIT 0 020Bh Temperature Low Alarm Threshold 020Ch Temperature High Alarm Threshold Sample Rate Register Map ADDRRESS BIT 7 BIT 6 BIT 5 BIT 4 BIT 3 BIT 2 BIT 1 BIT 0 020Dh Sample Rate
The DS1921G is set up for its operation by writing appropriate data to its special function registers that are located in the register page. Several functions that are controlled by a single bit only are combined into a single byte called the Control register (address 020Eh). This register can be read and written. If the device is programmed for a mission, writing to the Control regis- ter ends the mission and changes the register contents. The functional assignments of the individual bits are explained below. Bit 5 has no function. It always reads 0 and cannot be written to 1. Bit 7: Enable Oscillator ( EOSC). This bit controls the crystal oscillator of the RTC. When set to logic 0, the oscillator starts operation. When written to logic 1, the oscillator stops and the device is in a low-power data- retention mode. This bit must be 0 for normal opera- tion. The RTC must have advanced at least 1 second before a Mission Start is accepted. Bit 6: Memory Clear Enable (EMCLR). This bit needs to be set to logic 1 to enable the Clear Memory func- tion, which is invoked as a memory function command. The timestamp, histogram memory as well as the Mission Timestamp, Mission Samples Counter, Mission Start Delay, and Sample Rate are cleared only if the Clear Memory command is issued with the next access to the device. The EMCLR bit returns to 0 as the next memory function command is executed. Bit 4: Enable Mission ( EM). This bit controls whether the DS1921G begins a mission as soon as the sample rate is written. To enable the device for a mission, this bit must be 0. Bit 3: Rollover Enable/Disable (RO). This bit controls whether the temperature logging memory is overwritten with new data or whether data logging is stopped once the memory is filled with data during a mission. Setting this bit to a 1 enables the rollover and data logging continues at the beginning, overwriting previously col- lected data. Clearing this bit to 0 disables the rollover and no further temperature values are stored in the temperature logging memory once it is filled with data. This does not stop the mission. The device continues measuring temperatures and updating the histogram and alarm timestamps and durations. Bit 2: Temperature Low Alarm Search (TLS). If this bit is 1, the device responds to a Conditional Search ROM command if, during a mission, the temperature has reached or is lower than the Low Temperature Threshold stored at address 020Bh. Bit 1: Temperature High Alarm Search (THS). If this bit is 1, the device responds to a Conditional Search ROM command if, during a mission, the temperature has reached or is higher than the High Temperature Threshold stored at address 020Ch. Bit 0: Timer Alarm Search (TAS). If this bit is 1, the device responds to a Conditional Search ROM com- mand if, during a mission, a timer alarm has occurred. Since a timer alarm cannot be disabled, the TAF flag usually reads 1 during a mission. Therefore, it is advis- able to set the TAS bit to a 0, in most cases. Mission Start Delay Counter The content of the Mission Start Delay Counter register determines how many minutes the device waits before starting the logging process. The Mission Start Delay value is stored as an unsigned 16-bit integer number at addresses 0212h (low byte) and 0213h (high byte). The maximum delay is 65,535 minutes, equivalent to 45 days, 12 hours, and 15 minutes. For a typical mission, the Mission Start Delay is 0. If a mission is too long for a single DS1921G to store all temperature readings at the selected sample rate, one can use several devices, staggering the Mission Start Delay to record the full period. In this case, the rollover enable (RO) bit in the Control register (address 020Eh) must be set to 0 to prevent overwriting of the recorded temperature log after the data-log memory is full. See the Mission Start and Logging Process section and Figure 11 for details. Thermochron iButton Control Register Map ADDRESS BIT 7 BIT 6 BIT 5 BIT 4 BIT 3 BIT 2 BIT 1 BIT 0 020Eh EOSC EMCLR 0 EM RO TLS THS TAS
The Status register holds device status information and alarm flags. The register is located at address 0214h. Writing to this register does not necessarily end a mission. The functional assignments of the individual bits are explained below. The bits MIP, TLF, THF, and TAF can only be written to 0. All other bits are read-only. Bit 3 has no function. Bit 7: Temperature Core Busy (TCB). If this bit reads 0, the DS1921G is currently performing a temperature conversion. This temperature conversion is either self- initiated because of a mission being in progress or initi- ated by a command when a mission is not in progress. The TCB bit goes low just before a conversion starts and returns to high just after the result is latched into the Read-Out register at address 0211h. Bit 6: Memory Cleared (MEMCLR). If this bit reads 1, the memory pages 17 and higher (alarm timestamps/ durations, temperature histogram, excluding data-log memory), as well as the Mission Timestamp, Mission Samples Counter, Mission Start Delay, and Sample Rate have been cleared to 0 from executing a Clear Memory function command. The MEMCLR bit returns to 0 as soon as writing a nonzero value to the Sample Rate register starts a new mission, provided that the EM bit is also 0. The memory has to be cleared in order for a mission to start. Bit 5: Mission in Progress (MIP). If this bit reads 1, the DS1921G has been set up for a mission and this mis- sion is still in progress. A mission is started if the EM bit of the Control register (address 20Eh) is 0 and a nonze- ro value is written to the Sample Rate register, address 20Dh. The MIP bit returns from logic 1 to logic 0 when a mission is ended. A mission ends with the first write attempt (Copy Scratchpad command) to any register in the address range of 200h to 213h. Alternatively, a mis- sion can be ended by directly writing to the Status reg- ister and setting the MIP bit to 0. The MIP bit cannot be set to 1 by writing to the Status register. BIT 4: Sample in Progress (SIP). If this bit reads 1, the DS1921G is currently performing a temperature conver- sion as part of a mission in progress. The mission sam- ples occur on the seconds rollover from 59 to 00. The SIP bit changes from 0 to 1 approximately 250ms before the actual temperature conversion begins allow- ing the circuitry of the chip to wake up. A temperature conversion including a wake-up phase takes maximum 875ms. During this time, read accesses to the memory pages 17 and higher are permissible but can reveal invalid data. Bit 2: Temperature Low Flag (TLF). Logic 1 in the temperature low flag bit indicates that a temperature measurement during a mission revealed a temperature equal to or lower than the value in the Temperature Low Threshold register. The temperature low flag can be cleared at any time by writing this bit to 0. This flag must be cleared before starting a new mission. Bit 1: Temperature High Flag (THF). Logic 1 in the temperature high flag bit indicates that a temperature measurement during a mission revealed a temperature equal to or higher than the value in the Temperature High Threshold register. The temperature high flag can be cleared at any time by writing this bit to 0. This flag must be cleared before starting a new mission. Bit 0: Timer Alarm Flag (TAF). If this bit reads 1, a RTC alarm has occurred (see the Timekeeping section for details). The timer alarm flag can be cleared at any time by writing this bit to logic 0. Since the timer alarm cannot be disabled, the TAF flag usually reads 1 during a mission. This flag should be cleared before starting a new mission. DS1921G Thermochron iButton Status Register Map ADDRESS BIT 7 BIT 6 BIT 5 BIT 4 BIT 3 BIT 2 BIT 1 BIT 0 0214h TCB MEMCLR MIP SIP 0 TLF THF TAF
Mission Timestamp Register Map ADDRESS BIT 7 BIT 6 BIT 5 BIT 4 BIT 3 BIT 2 BIT 1 BIT 0 0215h 0 10 Minutes Single Minutes 0216h 0 12/24 20 Hour AM/PM 10 Hour Single Hours 0217h 0 0 10 Date Single Date 0218h 0 0 0 10 Months Single Months 0219h 10 Years Single Years Mission Samples Counter Register Map ADDRESS BIT 7 BIT 6 BIT 5 BIT 4 BIT 3 BIT 2 BIT 1 BIT 0 021Ah Low Byte 021Bh Center Byte 021Ch High Byte Device Samples Counter Register Map ADDRESS BIT 7 BIT 6 BIT 5 BIT 4 BIT 3 BIT 2 BIT 1 BIT 0 021Dh Low Byte 021Eh Center Byte 021Fh High Byte Mission Timestamp The Mission Timestamp register indicates the time and date of the first temperature conversion of a mission. Subsequent temperature conversions take place as many minutes apart from each other as specified by the value in the Sample Rate register. Mission samples occur on minute boundaries. Mission Samples Counter The Mission Samples Counter register indicates how many temperature measurements have taken place during the current mission in progress (if MIP = 1) or during the latest mission (if MIP = 0). The value is stored as an unsigned 24-bit integer number. This counter is reset through the Clear Memory command. Device Samples Counter The Device Samples Counter register indicates how many temperature measurements have taken place since the device was assembled at the factory. The value is stored as an unsigned, 24-bit integer number. The maximum number that can be represented in this format is 16,777,215, which is higher than the expected lifetime of the DS1921G i Button. This counter cannot be reset under software control. Temperature Logging and Histogram Once set up for a mission, the DS1921G logs the tem- perature measurements simultaneously byte after byte in the data-log memory as well as in histogram form in the histogram memory. The data-log memory is able to store 2,048 temperature values measured at equidis- tant time points. The first temperature value of a mission is written to address location 1000h of the data-log memory, the second value to address location 1001h and so on. Knowing the starting time point (Mission Timestamp register), the interval between temperature measurements, the Mission Samples Counter register, and the rollover setting, one can reconstruct the time and date of each measurement stored in the data log. There are two alternatives to the way the DS1921G behaves after the 2048 bytes of data-log memory is filled with data. With rollover disabled (RO = 0), the device fills the data-log memory with the first 2048 mis- sion samples. Additional mission samples are not logged in the data-log, but the histogram and tempera- ture alarm RAM continue to update. With rollover enabled (RO = 1), the data log wraps around and over- writes previous data starting at 1000h for the every 2049th mission sample. In this mode, the device stores the last 2048 mission samples.
ture readings fall into the same bin. Figure 7. Histogram Bin and Temperature Cross-Reference
ing the duration of the alarming temperature. time distance between each temperature reading. least significant byte is stored at the lower address. the temperature of a temperature-sensitive object. be configured. This procedure is called missioning. must be running (EOSC = 0) for at least one second. and the duration of the mission. Figure 8. Alarm Timestamps and Durations Address Map
Next, the low temperature and high temperature thresh- olds that specify the temperature tolerance band must be defined. The Temperature Conversion section describes how to convert a temperature value into the binary code to be written to the threshold registers. The state of the search condition bits in the Control register does not affect the mission. If multiple devices are connected to form a 1-Wire net, the setting of the search condition enables these devices to participate in the conditional search if certain events, such as timer or temperature alarms, have occurred. Details on the search conditions are found in the ROM Function Commands section and in the Control regis- ter description. The setting of the rollover-enable bit (RO) and sample rate depends on the duration of the mission and the monitoring requirements. If the most recent temperature history is important, the rollover should be enabled (RO = 1). Otherwise, one should estimate the duration of the mission in minutes and divide the number by 2048 to calculate the value of the sample rate (number of minutes between temperature conversions). For example, if the estimated duration of a mission is 10 days (14,400min), then the 2048-byte capacity of the data-log memory would be sufficient to store a new value every 7min. If the DS1921G’s data-log memory is not large enough to store all temperature readings, one can use several devices and set the Mission Start Delay to values that make the second device start recording as soon as the memory of the first device is full and so on. The RO bit needs to be set to 0 to disable rollover that would otherwise overwrite the recorded tempera- ture log. After the RO bit and the Mission Start Delay are set, the Sample Rate register is the last element of data that is written. The sample rate can be any value from 1 to 255, coded as an unsigned 8-bit binary number. As soon as the sample rate is written, the DS1921G sets the MIP flag and clears the MEMCLR flag. After as many minutes as specified by the Mission Start Delay are over, the device waits for the next minute boundary, then wakes up, copies the current time and date to the Mission Timestamp register, and makes the first tem- perature conversion of the mission. This increments both the Mission Samples Counter and Device Samples Counter. All subsequent temperature measurements are taken on minute boundaries specified by the value in the Sample Rate register. One can read the memory of the DS1921G to watch the mission as it progresses. Care should be taken to avoid memory access con- flicts. See the Memory Access Conflicts section for details. Address Registers and Transfer Status Because of the serial data transfer, the DS1921G employs three address registers, called TA1, TA2, and E/S (Figure 9). Registers TA1 and TA2 must be loaded with the target address to which the data is written or from which data is sent to the master upon a read com- mand. Register E/S acts like a byte counter and transfer status register. It is used to verify data integrity with write commands. Therefore, the master has only read access to this register. The lower 5 bits of the E/S regis- ter indicate the address of the last byte that has been written to the scratchpad. This address is called Ending Offset. Bit 5 of the E/S register, called PF or partial byte flag, is set if the number of data bits sent by the master is not an integer multiple of 8. Bit 6 is always a 0. Note that the lowest 5 bits of the target address also deter- mine the address within the scratchpad where interme- diate storage of data begins. This address is called byte offset. If the target address for a write command is 13Ch, for example, then the scratchpad stores incom- ing data beginning at the byte offset 1Ch and is full after only 4 bytes. The corresponding ending offset in this example is 1Fh. For the best economy of speed and efficiency, the target address for writing should point to the beginning of a new page, i.e., the byte off- set is 0. Thus, the full 32-byte capacity of the scratch- pad is available, resulting also in the ending offset of 1Fh. However, it is possible to write one or several con- tiguous bytes somewhere within a page. The ending offset together with the partial and overflow flag are a means to support the master checking the data integri- ty after a write command. The highest valued bit of the E/S register, called authorization accepted (AA), indi- cates that a valid copy command for the scratchpad has been received and executed. Writing data to the scratchpad clears this flag. Writing with Verification To write data to the DS1921G, the scratchpad must be used as intermediate storage. First, the master issues the Write Scratchpad command to specify the desired target address, followed by the data to be written to the scratchpad. In the next step, the master sends the Read Scratchpad command to read the scratchpad and to verify data integrity. As preamble to the scratch- pad data, the DS1921G sends the requested target address TA1 and TA2 and the contents of the E/S regis- ter. If the PF flag is set, data did not arrive correctly in the scratchpad. The master does not need to continue reading; it can start a new trial to write data to the scratchpad. Similarly, a set AA flag indicates that the DS1921G Thermochron iButton
data, it has to send the Copy Scratchpad command. Conflicts section for details. TA2 as supplied by the master, and all the data bytes. inverted CRC-16 generated by the DS1921G. Figure 9. Address Registers
Figure 9. Regardless of the actual ending offset, the obtained by reading the scratchpad for verification. typically takes 2µs per byte. 213h during a mission, ends the mission.
EMCLR = 0 MASTER Tx DATA BYTE TO SCRATCHPAD OFFSET DS1921G INCREMENTS SCRATCHPAD OFFSET DS1921G SETS SCRATCHPAD OFFSET = [T4:T0] AND CLEARS (PF, AA) 0Fh WRITE SCRATCHPAD? N Y Y N Y N N Y N MASTER Tx RESET? SCRATCHPAD OFFSET = 11111b? MASTER Tx RESET? MASTER Tx RESET? MASTER Tx TA1 [T7:T0], TA2 [T15:T8] DS1921G SETS [E4:E0] = SCRATCHPAD OFFSET N FROM ROM FUNCTIONS FLOWCHART (FIGURE 13) TO ROM FUNCTIONS FLOWCHART (FIGURE 13) Y Y TO FIGURE 10b FROM FIGURE 10b MASTER Rx CRC-16 OF COMMAND, ADDRESS, DATA MASTER Rx "1"s PARTIAL BYTE WRITTEN? PF = 1 AA = 1 DS1921G SETS EMCLR = 0 DS1921G SETS SCRATCHPAD OFFSET = [T4:T0] DS1921G INCREMENTS SCRATCHPAD OFFSET MASTER Rx ENDING OFFSET WITH DATA STATUS (E/S) AAh READ SCRATCHPAD? N Y Y N Y N Y N MASTER Tx RESET? SCRATCHPAD OFFSET = 11111b? MASTER Tx RESET? MASTER Rx TA1 [T7:T0], TA2 [T15:T8] MASTER Rx DATA BYTE FROM SCRATCHPAD OFFSET MASTER Rx CRC-16 OF COMMAND, ADDRESS, DATA, E/S BYTE, AND DATA STARTING AT THE TARGET ADDRESS MASTER Rx "1"s 55h COPY SCRATCHPAD N Y Y N N MASTER Tx RESET? MASTER Tx RESET? COPYING FINISHED MASTER Tx TA1 [T7:T0], TA2 [T15:T8] DS1921G SETS EMCLR = 0 MASTER Tx E/S BYTE DS1921G COPIES SCRATCHPAD DATA TO MEMORY N Y N Y Y N MASTER Tx RESET? Y AUTHORIZATION CODE MATCH? DS1921G Tx "0" DS1921G Tx "1" MASTER Rx "1"s MASTER Rx "1"s Figure 10a. Memory/Control Function Flowchart
N Y Y N MASTER Tx RESET? CRC OK? MASTER Tx TA1 [T7:T0], TA2 [T15:T8] DS1921G SETS EMCLR = 0 MASTER Rx DATA BYTE FROM MEMORY ADDRESS MASTER Tx RESET DS1921G SETS MEMORY ADDRESS = [T15:T0] Y Y N N END OF PAGE? DECISION MADE BY MASTER DECISION MADE BY DS1921G Y N N END OF MEMORY? MASTER Rx "0" MASTER Rx CRC-16 OF COMMAND, ADDRESS, DATA (1ST PASS); CRC-16 OF DATA (SUBSEQUENT PASSES) DS1921G INCREMENTS ADDRESS COUNTER N Y DS1921G CLEARS ALARM TIMESTAMPS AND DURATIONS MASTER Tx RESET? Y DS1921G CLEARS MISSION TIMESTAMP, MISSION SAMPLES COUNTER, MISSION START DELAY, SAMPLE RATE REGISTER 3Ch CLEAR MEMORY N Y DS1921G CLEARS HISTOGRAM MEMORY DS1921G SETS EMCLR = 0 DS1921G SETS MEMCLR = 1 EMCLR = 1? DS1921G SETS EMCLR = 0 DS1921G SETS MEMORY ADDRESS = [T15:T0] DS1921G INCREMENTS ADDRESS COUNTER F0h READ MEMORY? N Y Y N Y N MASTER Tx RESET? END OF MEMORY? MASTER Rx TA1 [T7:T0], TA2 [T15:T8] MASTER Rx DATA BYTE FROM MEMORY ADDRESS MASTER Rx
00 BYTE
Figure 10b. Memory/Control Function Flowchart
TCB = 0 DS1921G SETS TCB = 1 DS1921G PERFORMS A TEMPERATURE CONVERSION DS1921G SETS EMCLR = 0 DS1921G STARTS TEMPERATURE CONVERSION PROCESS 44h CONVERT TEMPERATURE? N Y Y N Y N MISSION IN PROGRESS? MASTER Tx RESET? DS1921G COPIES RESULT TO ADDRESS 0211h Y N MASTER Tx RESET? TEMPERATURE CONVERSION PROCESS END OF PROCESS Figure 10c. Memory/Control Function Flowchart
Read Memory with CRC [A5h] The Read Memory with CRC command is used to read memory data that cannot be packetized, such as the register page and the data recorded by the device dur- ing a mission. The command works the same way as the simple Read Memory command, except for the 16- bit CRC that the DS1921G generates and transmits fol- lowing the last data byte of a memory page. After having sent the command code of the Read Memory with CRC command, the bus master sends a 2-byte address (TA1 = T[7:0], TA2 = T[15:8]) that indi- cates a starting byte location. With the subsequent read-data time slots, the master receives data from the DS1921G starting at the initial address and continues until the end of a 32-byte page is reached. At that point the bus master sends 16 additional read-data time slots and receives an inverted 16-bit CRC. With subsequent read-data time slots the master receives data starting at the beginning of the next page followed again by the inverted CRC for that page. This sequence continues until the bus master resets the device. With the initial pass through the Read Memory with CRC command flow, the 16-bit CRC value is the result of shifting the command byte into the cleared CRC gen- erator followed by the two address bytes and the con- tents of the data memory. Subsequent passes through the Read Memory with CRC command flow generate a 16-bit CRC that is the result of clearing the CRC gener- ator and then shifting in the contents of the data memo- ry page. After the 16-bit CRC of the last page is read, the bus master receives logical “0”s from the DS1921G and inverted CRC-16s at page boundaries until a reset pulse is issued. The Read Memory with CRC command sequence can be ended at any point by issuing a reset pulse. Clear Memory [3Ch] The Clear Memory command is used to clear the Sample Rate, Mission Start Delay, Mission Timestamp, and Mission Samples Counter in the register page and the temperature alarm memory and the temperature histogram memory. These memory areas must be cleared for the device to be set up for another mission. The Clear Memory command does not clear the data- log memory or the temperature and timer alarm flags in the Status register. The RTC oscillator must be on and have counted at least 1s before issuing the command. For the Clear Memory command to function, the EMCLR bit in the Control register must be set to 1, and the Clear Memory command must be issued with the very next access to the device’s memory functions. Issuing any other memory function command resets the EMCLR bit. The Clear Memory process takes 500µs. When the command is completed the MEMCLR bit in the Status register reads 1 and the EMCLR bit is 0. Convert Temperature [44h] If a mission is not in progress (MIP = 0), the Convert Temperature command can be issued to measure the current temperature of the device. The result of the tem- perature conversion can be found at memory address 211h in the register page. This command takes maxi- mum 90ms to complete. During this time the device remains fully accessible for memory/control and ROM function commands. Mission Start and Logging Process The DS1921G does not use a special command to start a mission. Instead, a mission is started by writing a nonzero value to the Sample Rate register using the Copy Scratchpad command. As shown in Figure 11, a new mission can only be started if the previous mission has been stopped (MIP = 0), the memory is cleared (MEMCLR = 1), and the mission is enabled (EM = 0). If the new sample rate is different from zero, the value is copied to the Sample Rate register. At the same time the MIP bit is set and the MEMCLR bit is cleared to indi- cate that the device is on a mission. Next, the Mission Start Delay Counter starts decrementing every minute until it is down to 0. Now the DS1921G waits until the next minute boundary and starts the logging process, which as its first action copies the applicable RTC reg- isters to the Mission Timestamp register. Stop Mission The DS1921G does not have a special command to stop a mission. A mission can be stopped at any time by writing to any address in the range of 0200h to 0213h or by writing the MIP bit of the Status register at address 0214h to 0. Either approach involves the use of the Copy Scratchpad command. There is no need for the Mission Start Delay to expire before a mission can be stopped (see Figure 11). Memory Access Conflicts While a mission is in progress, a temperature sample is periodically taken and stored in the data-log, his- togram, and potential alarm memory. This “internal activity” has priority over a Read Memory command’s or Read Memory with CRC command’s access to these pages. If a conflict occurs, the data read may be invalid, even if the CRC value matches the data. To ensure that the data read is valid, it is recommended to first read the SIP bit of the Status register. If the SIP bit is set, delay reading the data-log, histogram, and alarm memory until SIP is 0. The interference is more likely to be seen with a high sample rate (one sample every DS1921G Thermochron iButton
11 BITS OF DATA-LOG ADDRESS
REGISTER AT ADDRESS 020Dh. ONE MINUTE AFTER THE START DELAY COUNTDOWN IS OVER, THE LOGGING PROCESS BEGINS AND THE MISSION START PROCESS ENDS. Figure 11. Mission Start and Logging Process
and to take measures to work around it. boosted to 142kbps by activating the overdrive mode. pullup resistor of maximum 2.2kΩ at any speed.
- Initialization
- ROM Function Command
- Memory/Control Function Command
- Transaction/Data DS1921G Thermochron iButton Rx RPUP IL VPUP BUS MASTER OPEN-DRAIN PORT PIN 100Ω MOSFET Tx Rx Tx DATA DS1921G 1-Wire PORT Rx = RECEIVE Tx = TRANSMIT
Figure 12. Hardware Configuration
All transactions on the 1-Wire bus begin with an initial- ization sequence. The initialization sequence consists of a reset pulse transmitted by the bus master, followed by presence pulse(s) transmitted by the slave(s). The presence pulse lets the bus master know that the DS1921G is on the bus and is ready to operate. For more details, see the 1-Wire Signaling section. ROM Function Commands Once the bus master has detected a presence, it can issue one of the seven ROM function commands. All ROM function commands are 8 bits long. A list of these commands follows (see the flowchart in Figure 13). Read ROM [33h] This command allows the bus master to read the DS1921G’s 8-bit family code, unique 48-bit serial num- ber and 8-bit CRC. This command can only be used if there is a single slave on the bus. If more than one slave is present on the bus, a data collision occurs when all slaves try to transmit at the same time (open drain produces a wired-AND result). The resultant fami- ly code and 48-bit serial number result in a mismatch of the CRC. Match ROM [55h] The Match ROM command, followed by a 64-bit ROM sequence, allows the bus master to address a specific DS1921G on a multidrop bus. Only the DS1921G that exactly matches the 64-bit ROM sequence responds to the memory function command. All other slaves wait for a reset pulse. This command can be used with a single device or multiple devices on the bus. Search ROM [F0h] When a system is initially brought up, the bus master might not know the number of devices on the 1-Wire bus or their registration numbers. By taking advantage of the wired-AND property of the bus, the master can use a process of elimination to identify the registration numbers of all slave devices. For each bit of the regis- tration number, starting with the least significant bit, the bus master issues a triplet of time slots. On the first slot, each slave device participating in the search outputs the true value of its registration number bit. On the sec- ond slot, each slave device participating in the search outputs the complemented value of its registration num- ber bit. On the third slot, the master writes the true value of the bit to be selected. All slave devices that do not match the bit written by the master stop participat- ing in the search. If both of the read bits are zero, the master knows that slave devices exist with both states of the bit. By choosing which state to write, the bus master branches in the ROM code tree. After one com- plete pass, the bus master knows the registration num- ber of a single device. Additional passes identify the registration numbers of the remaining devices. Refer to Application Note 187: 1-Wire Search Algorithm for a detailed discussion, including an example. Conditional Search ROM [ECh] The Conditional Search ROM command operates simi- larly to the Search ROM command except that only devices fulfilling the specified condition participate in the search. The condition is specified by the bit func- tions TAS, THS, and TLS in the Control register, address 20Eh. The Conditional Search ROM provides an efficient means for the bus master to determine devices on a multidrop system that have to signal an important event, such as a temperature leaving the tol- erance band. After each pass of the conditional search that successfully determined the 64-bit ROM code for a specific device on the multidrop bus, that particular device can be individually accessed as if a Match ROM command had been issued, since all other devices have dropped out of the search process and are wait- ing for a reset pulse. For the conditional search, one can select any combi- nation of the three search conditions by writing the associated bit to a logical 1. These bits correspond directly to the flags in the Status register of the device. If the flag in the Status register reads 1 and the corre- sponding bit in the Control register is a logical 1 too, the device responds to the Conditional Search ROM command. If more than one bit search condition is selected, the first event that occurs makes the device respond to the Conditional Search ROM command. Skip ROM [CCh] This command can save time in a single-drop bus sys- tem by allowing the bus master to access the memory functions without providing the 64-bit ROM code. If more than one slave is present on the bus and, for example, a read command is issued following the Skip ROM command, data collision occurs on the bus as multiple slaves transmit simultaneously (open-drain pulldowns produce a wired-AND result). Thermochron iButton
*TO BE TRANSMITTED OR RECEIVED AT OVERDRIVE SPEED IF OD = 1. ** PRESENCE PULSE IS SHORT IF OD = 1. DS1921G Tx FAMILY CODE (1 BYTE) DS1921G Tx SERIAL NUMBER (6 BYTES) OD = 0 MASTER Tx BIT 0 Y SHORT RESET PULSE? YY Y Y Y Y N 33h READ ROM COMMAND? N 55h MATCH ROM COMMAND? BIT 0 MATCH? BIT 0 MATCH? N N N N N N N F0h SEARCH ROM COMMAND? N ECh CONDITIONAL SEARCH COMMAND? N Y MASTER Tx BIT 1 MASTER Tx BIT 63 BIT 1 MATCH? BIT 63 MATCH? Y Y FROM MEMORY/CONTROL FUNCTIONS FLOWCHART (FIGURE 10) TO MEMORY FUNCTIONS FLOWCHART (FIGURE 10) DS1921G Tx BIT 0 DS1921G Tx BIT 0 MASTER Tx BIT 0 BIT 1 MATCH? BIT 63 MATCH? DS1921G Tx BIT 1 DS1921G Tx BIT 1 MASTER Tx BIT 1 DS1921G Tx BIT 63 DS1921G Tx BIT 63 MASTER Tx BIT 63 Y BIT 0 MATCH?N N N Y Y DS1921G Tx BIT 0 DS1921G Tx BIT 0 MASTER Tx BIT 0 CONDITION MET? N Y BIT 1 MATCH? BIT 63 MATCH? DS1921G Tx BIT 1 DS1921G Tx BIT 1 MASTER Tx BIT 1 DS1921G Tx BIT 63 DS1921G Tx BIT 63 MASTER Tx BIT 63 Y FROM FIGURE 13b TO FIGURE 13b TO FIGURE 13b FROM FIGURE 13b Figure 13a. ROM Functions Flowchart
OD = 1 Y N Y 3Ch OVERDRIVE- SKIP ROM? N Y CCh SKIP ROM COMMAND? Y 69h OVERDRIVE- MATCH ROM? N N N N MASTER Tx BIT 1 MASTER Tx BIT 63 Y Y Y BIT 0 MATCH? MASTER Tx RESET PULSE? BIT 63 MATCH? BIT 1 MATCH? N TO FIGURE 13a FROM FIGURE 13a FROM FIGURE 13a TO FIGURE 13a OD = 1 *ALWAYS TO BE TRANSMITTED AT OVERDRIVE SPEED. * * * Figure 13b. ROM Functions Flowchart
bus to standard speed (OD = 0). mode, the fast timing applies to all waveforms. and the capacitance of the 1-Wire network attached. RSTL + tF to compensate for the edge. Figure 14. Intitialization Procedure: Reset and Presence Pulses
than 80µs, the device remains in overdrive mode. must test the logical state of the 1-Wire line at tMSP. expired, the DS1921G is ready for data communication. overdrive speed to accommodate other 1-Wire devices. write and read time slots are illustrated in Figure 15. valid during a read time slot. threshold until the write-zero low time tW0LMIN is expired. REC before it is ready for the next time slot. A read-data time slot begins like a write-one time slot. at the factory and lasered into the ROM. Figure 10. The bus master compares the CRC value or to reread the portion of the data with the CRC error. start at any location within the scratchpad.
Figure 15. Read/Write Timing Diagram
Figure 16. CRC-16 Hardware Description and Polynomial
Command-Specific 1-Wire Communication Protocol—Color Codes DS1921G Thermochron iButton Master-to-Slave Slave-to-Master <data to EOS> FF loopRST CPS RST WS RS TA CRC-16 <data to EOS> <data to EOM> FF loop FF loop 00 loop CRC-16TA-E/S TA-E/S CPS TA-E/S <data>WS TA TA Write Scratchpad, Reaching the End of the Scratchpad PD PD Select RST Write Scratchpad, Not Reaching the End of the Scratchpad PD Select RST Read Scratchpad PD Select AA loopRST RM Copy Scratchpad (Success) PD Select RST Copy Scratchpad (Invalid TA-E/S) PD Select RST Read Memory (Success) PD Select 00 loopTARMRST Read Memory (Invalid Address) PD Select Reading reserved pages 20 through 63 or 68 through 127 or pages 192 and higher (beyond data-log memory) results in 00h bytes. Command-Specific 1-Wire Communication Protocol—Legend (continued) SYMBOL DESCRIPTION <00 to EOP> Transfer of as many 00h bytes as are needed to reach a memory page boundary <32 bytes> Transfer of 32 bytes <data> Transfer of an undetermined amount of data CRC-16 Transfer of an inverted CRC-16 FF loop Indefinite loop where the master reads FFh bytes AA loop Indefinite loop where the master reads AAh bytes 00 loop Indefinite loop where the master reads 00h bytes 1-Wire Communication Examples
Mission Example: Prepare and Start a New Mission Assumption: The previous mission has ended. To end an ongoing mission write the MIP bit in the Status regis- ter to 0. The preparation of a DS1921G for a mission including the start of the mission requires up to four steps: Step 1: Set the RTC (if it needs to be adjusted). Step 2: Clear the data of the previous mission. Step 3: Set the search condition and Mission Start Delay and clear the alarm flags. Step 4: Set the temperature alarms and write the Sample Rate to start the mission. Thermochron iButton 1-Wire Communication Examples (continued) FF loop FF loop CMRST Clear Memory PD Select To verify success, read the Status register at address 0214h. If MEMCLR is 1, the command was executed successfully. To read the result and to verify success, read the addresses 0211h (result) and the Device Samples Counter at address 021Dh to 021Fh. If the count has incremented, the command was executed successfully. CTRST Convert Temperature PD Select <32 bytes><data to EOP> CRC-16 CRC-16 Loop RMC TARST Read Memory with CRC (Success) PD Select The “32 bytes” are either valid page data or 00h bytes when reading reserved pages 20 through 63 or 68 through 127 or pages 192 and higher (beyond data-log memory). <32 bytes><00 to EOP> CRC-16 CRC-16 Loop RMC TARST Read Memory with CRC (Invalid Address) PD Select The “32 bytes” are all 00h.
Step 1: Set the RTC Let the actual time be 15:30:00 hours on Monday, the 1st of April in 2002. This results in the following data to be writ- ten to the RTC registers: With only a single DS1921G connected to the bus master, the communication of step 1 is as follows: DS1921G Thermochron iButton ADDRESS 200h 201h 202h 203h 204h 205h 206h DATA 00h 30h 15h 01h 81h 04h 02h MASTER MODE DATA (LSB FIRST) COMMENTS Tx (Reset) Reset pulse (480μs to 960μs) Rx (Presence) Presence pulse Tx CCh Issue Skip ROM command Tx 0Fh Issue Write Scratchpad command Tx 00h TA1, beginning offset = 00h Tx 02h TA2, address = 02 00h Tx <7 data bytes> Write 7 bytes of data to scratchpad Tx (Reset) Reset pulse Rx (Presence) Presence pulse Tx CCh Issue Skip ROM command Tx AAh Issue Read Scratchpad command Rx 00h Read TA1, beginning offset = 00h Rx 02h Read TA2, address = 02 00h Rx 06h Read E/S, ending offset = 6h, flags = 0h Rx <7 data bytes> Read scratchpad data and verify Tx (Reset) Reset pulse Rx (Presence) Presence pulse Tx CCh Issue Skip ROM command Tx 55h Issue Copy Scratchpad command Tx 00h TA1 Tx 02h TA2 Tx 06h E/S (AUTHORIZATION CODE) Tx (Reset) Reset pulse Rx (Presence) Presence pulse
Step 2: Clear the data of the previous mission Set the EMCLR bit to 1, enable the RTC, and then execute the Clear Memory command. The RTC oscillator must be stable before the Clear Memory command is issued. Wait 500µs after issuing the Clear Memory command before proceeding to step 3. This results in the following data to be written to the Status register: With only a single DS1921G connected to the bus master, the communication of step 2 is as follows: Thermochron iButton ADDRESS 20Eh DATA 40h MASTER MODE DATA (LSB FIRST) COMMENTS Tx (Reset) Reset pulse (480μs to 960μs) Rx (Presence) Presence pulse Tx CCh Issue Skip ROM command Tx 0Fh Issue Write Scratchpad command Tx 0Eh TA1, beginning offset = 0Eh Tx 02h TA2, address = 02 0Eh Tx 40h Write status byte to scratchpad Tx (Reset) Reset pulse Rx (Presence) Presence pulse Tx CCh Issue Skip ROM command Tx AAh Issue Read Scratchpad command Rx 0Eh Read TA1, beginning offset = 0Eh Rx 02h Read TA2, address = 02 0Eh Rx 0Eh Read E/S, ending offset = 0Eh, flags = 0h Rx 40h Read scratchpad data and verify Tx (Reset) Reset pulse Rx (Presence) Presence pulse Tx CCh Issue Skip ROM command Tx 55h Issue Copy Scratchpad command Tx 0Eh TA1 Tx 02h TA2 Tx 0Eh E/S (AUTHORIZATION CODE) Tx (Reset) Reset pulse Rx (Presence) Presence pulse Tx CCh Issue Skip ROM command Tx 3Ch Issue Clear Memory command Tx (Reset) Reset pulse Rx (Presence) Presence pulse
Step 3: Set the search condition and Mission Start Delay and clear the alarm flags In this example, the rollover is disabled and the search condition is set for a high temperature only. The mission is to start with a delay of 90min (005Ah) and the alarm flags TLF, THF, and TAF are cleared. This results in the follow- ing data to be written to the special function registers: With only a single DS1921G connected to the bus master, the communication of step 3 is as follows: DS1921G Thermochron iButton ADDRESS 20Eh 20Fh 210h 211h 212h 213h 214h DATA 02h 00h* 00h* 00h* 5Ah 00h 00h MASTER MODE DATA (LSB FIRST) COMMENTS Tx (Reset) Reset Pulse (480μs to 960μs) Rx (Presence) Presence pulse Tx CCh Issue Skip ROM command Tx 0Fh Issue Write Scratchpad command Tx 0Eh TA1, beginning offset = 0Eh Tx 02h TA2, address = 02 0Eh Tx <7 data bytes> Write 7 bytes of data to scratchpad Tx (Reset) Reset pulse Rx (Presence) Presence pulse Tx CCh Issue Skip ROM command Tx AAh Issue Read Scratchpad command Rx 0Eh Read TA1, beginning offset = 0Eh Rx 02h Read TA2, address = 02 0Eh Rx 14h Read E/S, ending offset = 14h, flags = 0h Rx <7 data bytes> Read scratchpad data and verify Tx (Reset) Reset pulse Rx (Presence) Presence pulse Tx CCh Issue Skip ROM command Tx 55h Issue Copy Scratchpad command Tx 0Eh TA1 Tx 02h TA2 Tx 13h E/S (AUTHORIZATION CODE) Tx (Reset) Reset pulse Rx (Presence) Presence pulse *Writing through address locations 20Fh to 211h is faster than accessing the Mission Start Delay register in a separate cycle. The write attempt has no effect on the contents of these registers.
Step 4: Set the temperature alarms and write the Sample Rate to start the mission In this example, the temperature alarms are set to -5°C for the low temperature threshold and 0°C for the high tem- perature threshold. The sample rate is once every 10min, allowing the mission to last up to 14 days. This results in the following data to be written to the special function registers: With only a single DS1921G connected to the bus master, the communication of step 4 is as follows: Thermochron iButton ADDRESS 20Bh 20Ch 20Dh DATA 46h 50h 0Ah MASTER MODE DATA (LSB FIRST) COMMENTS Tx (Reset) Reset pulse (480μs to 960μs) Rx (Presence) Presence pulse Tx CCh Issue Skip ROM command Tx 0Fh Issue Write Scratchpad command Tx 0Bh TA1, beginning offset = 0Bh Tx 02h TA2, address = 02 0Bh Tx <3 data bytes> Write 3 bytes of data to scratchpad Tx (Reset) Reset pulse Rx (Presence) Presence pulse Tx CCh Issue Skip ROM command Tx AAh Issue Read Scratchpad command Rx 0Bh Read TA1, beginning offset = 0Bh Rx 02h Read TA2, address = 02 0Bh Rx 0Dh Read E/S, ending offset = 0Dh, flags = 0h Rx <3 data bytes> Read scratchpad data and verify Tx (Reset) Reset pulse Rx (Presence) Presence pulse Tx CCh Issue Skip ROM command Tx 55h Issue Copy Scratchpad command Tx 0Bh TA1 Tx 02h TA2 Tx 0Dh E/S (AUTHORIZATION CODE) Tx (Reset) Reset pulse Rx (Presence) Presence pulse If step 4 is successful, the MIP bit in the Status register is 1, the MEMCLR bit is 0, and the Mission Start Delay counts down.
1-Wire® Thermochrom® iBut t o n® . com YYWW ZZZ DS1921G-F5 16.25mm 5.89mm 0.51mm 17.35mm BRANDING GND IO Pin Configuration Package Information For the latest package outline information and land patterns (footprints), go to www.maxim-ic.com/packages. Note that a “+”, “#”, or “-” in the package code indicates RoHS status only. Package drawings may show a different suffix character, but the drawing pertains to the package regardless of RoHS status. PACKAGE TYPE PACKAGE CODE OUTLINE NO. LAND PATTERN NO. F5 iButton IB#5CP 21-0266 —
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. 42 ____________________Maxim Integrated Products, 120 San Gabriel Drive, Sunnyvale, CA 94086 408-737-7600 © 2011 Maxim Integrated Products Maxim is a registered trademark of Maxim Integrated Products, Inc.
Revision History
Added bullet “Water resistant or waterproof if placed inside DS9107 iButton capsule (Exceeds Water Resistant 3 ATM requirements)” Deleted “application pending” from UL bullet and safety statement
120407 Added text to Detailed Description section: Note that the initial sealing level of DS1921G achieves
IP56. Aging and use conditions can degrade the integrity of the seal over time, so for applications with significant exposure to liquids, sprays, or other similar environments, it is recommended to place the Thermochron in the DS9107 i Button capsule. The DS9107 provides a watertight enclosure that has been rated to IP68 (See www.maxim-ic.com/AN4126 ) 1, 2 4/09 Created newer template-style data sheet All 4/10 Overdrive specifications for t RSTL, tPDL, and tW0L split into range V PUP > 4.5V and full range. New values for the full range 2–4 Updated UL certificate reference; deleted from the tW1L specification in the Electrical Characteristics table; applied note 13 to the t W0L specification in the Electrical Characteristics table; added more details to Electrical Characteristics table notes 7, 13 , a nd 14 1, 3, 4