DS2422 1-Wire Temperature/Datalogger with 8kB Datalog Memory www.maxim-ic.com GENERAL DESCRIPTION FEATURES The DS2422 temperature/datalogger combines the core functions of a fully featured datalogger in a single chip. It includes a temperature sensor, real® time clock (RTC), memory, 1-Wire interface, and serial interface for an analog-to-digital converter (ADC) as well as control circuitry for a charge pump.
DS2422 ABSOLUTE MAXIMUM RATINGS* ALARM, PUMP_ONZ, SDATA, SCLK, CNVST, VPAD, I/O Voltage to GND ALARM, PUMP_ONZ, I/O Combined Sink Current Operating Temperature Range Junction Temperature Storage Temperature Range Soldering Temperature -0.3V, +6V 20mA -40°C to +85°C +150°C -55°C to +125°C See IPC/JEDEC J-STD-020A Stresses beyond those listed under “Absolute Maximum Ratings” may cause permanent damage to the device.
DS2422 PARAMETER I/O Pin, 1-Wire Write Write-0 Low Time (Note 1) Write-1 Low Time (Notes 1, 14) I/O Pin, 1-Wire Read Read Low Time (Notes 1, 15) Read Sample Time (Notes 1, 15) ALARM Output Pin Output Low Voltage Pin Leakage Current CNVST, SCLK Output Pins SYMBOL tW0L tW1L tRL tMSR VOL ILP Output Low Voltage VOL Output High Voltage VOH CONDITIONS Standard speed Overdrive speed, VPUP > 4.
DS2422 Note 1: Note 2: Note 3: Note 4: Note 5: Note 6: Note 7: Note 8: Note 9: Note 10: Note 11: Note 12: Note 13: Note 14: Note 15: Note 16: Note 17: Note 18: Note 19: System Requirement 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.
DS2422 DS2422 Temperature Accuracy at 3V 3.500 3.000 2.500 2.000 Error (°C) 1.500 1.000 0.500 0.000 -0.500 -1.000 -1.500 -2.000 80 70 60 50 40 30 20 10 0 -10 -20 -30 -40 -2.500 Temperature (°C) Max. ± 0.1°C uncertainty Min. ± 0.1°C uncertainty Max. ±0.25°C uncertainty Min. ±0.25°C uncertainty Max. ±0.5°C uncertainty Min. ±0.5°C uncertainty Max. ±1°C uncertainty Min.
DS2422 PIN DESCRIPTION PIN NAME 1 VPAD 2 SCLK 3 SDATA 4 9 CNVST AGND 10 X1 11 ALARM 12 X2 13 IO 14 16 21 GND TEST_SPLY TEST_RX 22 PUMP_ONZ 23 VBAT 24 9 pins TEST_CG NC FUNCTION Operating voltage of the serial interface pads CNVST, SCLK, SDATA. Used for level translation from the VBAT-powered internal logic to the 5V-powered ADC. Connect to VBAT if the serial interface is not used. Serial clock signal for serial interface. May connect directly to the corresponding MAX1086 pin.
DS2422 under the control of SCLK. The DS2422 will activate its alarm output if the measured temperature or serial-input data reaches a user-programmed high or low alarm threshold. This alarm then can be used to shut down the equipment and enforce a service call. In contrast to microprocessor-based data loggers, the DS2422 does not require any firmware development. Software for setup and data retrieval through the 1-Wire interface is available for free download from the iButton website (www.ibutton.com).
DS2422 Figure 3. DS2422 Block Diagram 1-Wire Port ROM Function Control I/O 3V Lithium All circuitry is powered by the battery unless otherwise specified 64-Bit Lasered ROM Memory Function Control Parasite Powered Circuitry 256-Bit Scratchpad General-Purpose SRAM (512 Bytes) 32.768kHz Oscillator Thermal Sense Internal Timekeeping & Control Reg.
DS2422 Figure 4.
DS2422 Figure 5. 64-Bit Lasered ROM MSB LSB 8-Bit CRC Code MSB 8-Bit Family Code (41h) 48-Bit Serial Number LSB MSB LSB MSB LSB Figure 6. 1-Wire CRC Generator 8 5 4 Polynomial = X + X + X + 1 st nd 1 STAGE X 0 rd 2 STAGE X 1 th 3 STAGE X 2 th 4 STAGE X 3 th 5 STAGE X 4 th 6 STAGE X 5 th 7 STAGE X 6 8 STAGE X 7 INPUT DATA Figure 7.
DS2422 MEMORY The memory map of the DS2422 is shown in Figure 7. The 512 bytes general-purpose SRAM are located in pages 0 through 15. The various registers to set up and control the device fill page 16 and 17, called Register Pages 1 and 2 (details in Figure 8). Pages 18 and 19 provide storage space for calibration data. They can alternatively be used as extension of the general-purpose memory.
DS2422 ADDR 0228h — 022Fh 0230h — 0237h 0238h — b7 b6 b5 b4 b3 First Byte — Eighth Byte First Byte — Eighth Byte b2 b1 b0 (no function; all of these bytes read 00h) Function Read Access Password Full Access Password Access* (N/A) R; R Function tSP Access* R/W; R (N/A) R; R W; — W; — 023Fh Figure 8B.
DS2422 SAMPLE RATE The content of the Sample Rate Register (addresses 0206h, 0207h) specifies the time elapse (in seconds if EHSS = 1, or minutes if EHSS = 0) between two temperature/data logging events. The sample rate may be any value from 1 to 16383, coded as an unsigned 14-bit binary number. If EHSS = 1, the shortest time between logging events is 1 second and the longest (sample rate = 3FFFh) is 4.55 hours. If EHSS = 0, the shortest is 1 minute and the longest time is 273.
DS2422 Temperature Alarm Threshold Examples J(°C) 25.5 -10.0 TALM hex decimal 85h 133 3Eh 62 SERIAL DATA INPUT In addition to temperature, the DS2422 can log 8-bit or 16-bit digital information that it receives through its serial interface. This interface is designed to directly connect to ADCs such as the MAX1086 or other circuits that use the same interface timing. The general timing of the serial interface is shown in Figure 9.
DS2422 threshold registers that are associated to the serial data input. The registers for data alarm thresholds are located at address 020Ah (Low Alarm) and 020B (High Alarm). The comparison is based on the most significant serial input byte and assumes that the data is represented as unsigned binary number. TEMPERATURE SENSOR ALARM The DS2422 has two Temperature Alarm Threshold registers (address 0208h, 0209h) to store values, which determine whether a critical temperature has been reached.
DS2422 Register Details BIT DESCRIPTION BIT(S) EDLA: Enable Data Low Alarm b0 EDHA: Enable Data High Alarm b1 DEFINITION This bit controls whether, during a mission, the Data Low Alarm Flag DLF may be set, if a data value from the serial data interface is equal to or lower than the value in the Data Low Alarm Threshold Register. If EDLA is 1, data low alarms are enabled. If EDLA is 0, data low alarms are not generated.
DS2422 MISSION CONTROL The DS2422 is set up for its operation by writing appropriate data to its special function registers, which are located in the two register pages. The settings in the Mission Control Register determine whether temperature and/or external data is logged, which format (8 or 16 bits) is to be used and whether old data may be overwritten by new data, once the datalog memory is full.
DS2422 ALARM STATUS The fastest way to determine whether a programmed alarm threshold was exceeded during a mission is through reading the Alarm Status Register. In a networked environment that contains multiple DS2422-based dataloggers the devices that encountered an alarm can quickly be identified by means of the Conditional Search command (see ROM Function Commands). The data and temperature alarm only occurs if enabled (see Temperature Sensor Alarm and Serial Input Alarm).
DS2422 Register Details BIT DESCRIPTION BIT(S) MIP: Mission In Progress b1 MEMCLR: Memory Cleared b3 WFTA: Waiting for Temperature Alarm b4 DEFINITION If this bit reads 1 the device has been set up for a mission and this mission is still in progress. The MIP bit returns from logic 1 to logic 0 when a mission is ended. See function commands Start Mission and Stop Mission.
DS2422 MISSION PROGRESS INDICATOR Depending on settings in the Mission Control Register (address 0213h) the DS2422 will log temperature and/or serial input data in 8-bit or 16-bit format. The description of the ETL and EDL bit explains where the device stores data in its datalog memory.
DS2422 Password Control Register ADDR b7 b6 b5 b4 b3 0227h EPW During a mission, there is only read access to this register. b2 b1 b0 To enable password checking, the EPW bits need to form a binary pattern of 10101010 (AAh). The default pattern of EPW is different from AAh. If the EPW pattern is different from AAh, any pattern is accepted, as long as it has a length of exactly 64 bits.
DS2422 SERIAL DATA INTERFACE TUNING The serial interface consists of several signals that are intended to control external circuitry, such as an analog-todigital converter (see Figure 9A). There is one signal, called CNVST, which can be used to load data into a shift register or to trigger a data conversion. The delay tSP from the activation of the serial interface (PUMP_ONZ) to CNVST is user-programmable through the Delay Register.
DS2422 lower address. Knowing the starting time point (Mission Time Stamp) and the interval between temperature measurements one can reconstruct the time and date of each measurement. There are two alternatives to the way the DS2422 behaves after the datalog memory is filled with data.
DS2422 Figure 10C. Two-Channel Logging, Different Resolution ETL = EDL = 1 TLFS = 0; DLFS = 1 Temperature 2560 8-bit entries 1000h 19FFh 1A00h External Data 2560 16-bit entries 1000h Temperature 2560 16-bit entries 23FFh 2DFFh (not used) ETL = EDL = 1 TLFS = 1; DLFS = 0 2E00h 2FFFh External Data 2560 8-bit entries 2400h (not used) 2E00h 2FFFh With 16-bit format, the most-significant byte is stored at the lower address.
DS2422 If there is a risk of unauthorized access to the DS2422 or manipulation of data, one should define passwords for read access and full access. Before the passwords become effective, their use needs to be enabled. See Security by Password for more details. The last step to begin a mission is to issue the Start Mission command. As soon as it has received this command, the DS2422 sets the MIP flag and clear the MEMCLR flag.
DS2422 WRITING WITH VERIFICATION To write data to the DS2422, the scratchpad has to 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 scratchpad data, the DS2422 sends the requested target address TA1 and TA2 and the contents of the E/S Register.
DS2422 COPY SCRATCHPAD WITH PASSWORD [99h] This command is used to copy data from the scratchpad to the writable memory sections. After issuing the Copy Scratchpad command, the master must provide a 3-byte authorization pattern, which can be obtained by reading the scratchpad for verification. This pattern must exactly match the data contained in the three address registers (TA1, TA2, E/S, in that order). Next the master must transmit the 64-bit full-access password.
DS2422 Figure 12-1. Memory/Control Function Flow Chart From ROM Functions Flow Chart (Figure 14) Master TX Memory or Control Fkt.
DS2422 Figure 12-2. Memory/Control Function Flow Chart From Figure 12 st 1 Part 99H Copy Scrpd.
DS2422 Figure 12-3. Memory/Control Function Flow Chart From Figure 12 nd 2 Part 69H Read Mem.
DS2422 Figure 12-4. Memory/Control Function Flow Chart From Figure 12 rd 3 Part 96H Clear Mem. [w/PW] 55H Forced Conversion? N Y Y Master TX FFh dummy byte Master TX 64-Bits [Password] Master TX FFh dummy byte Mission in Progress? Y N N Password Accepted? To Figure 12 th N 5 Part DS2422 Performs a Temp.
DS2422 Figure 12-5.
DS2422 CLEAR MEMORY WITH PASSWORD [96h] The Clear Memory with Password command is used to prepare the device for another mission. This command will only be executed if no mission is in progress. After the command code the master must transmit the 64-bit fullaccess password followed by a FFh dummy byte. If passwords are enabled and the transmitted password is different from the stored full-access password or a mission is in progress, the Clear Memory with Password command will fail.
DS2422 INDICATION OF INTERFERENCE COMMAND Write Scratchpad Read Scratchpad Copy Scratchpad Read Memory with CRC Stop Mission REMEDY The CRC16 at the end of the command flow reads FFFFh. The data read changes to FFh bytes or all bytes received are FFh, including the CRC at the end of the command flow. The device behaves as if Authorization Code or password was not valid or as if the copy function would not end.
DS2422 bus performs a reset. The DS2422 will communicate properly when used in conjunction with a DS2480B or DS2490 1-Wire driver and adapters that are based on these driver chips. Figure 13. Hardware Configuration BUS MASTER VPUP DS2422 1-Wire PORT RPUP RX DATA TX RX = RECEIVE Open Drain Port Pin RX TX 5 µA Typ.
DS2422 1-Wire ROM FUNCTION COMMANDS Once the bus master has detected a presence, it can issue one of the eight ROM function commands that the DS2422 supports. All ROM function commands are 8 bits long. A list of these commands follows (refer to flowchart in Figure 14). READ ROM [33h] This command allows the bus master to read the DS2422’s 8-bit family code, unique 48-bit serial number, and 8-bit CRC. This command can only be used if there is a single slave on the bus.
DS2422 command. The only way to set the RC bit is through successfully executing the Match ROM, Search ROM or Overdrive Match ROM command. Once the RC bit is set, the device can repeatedly be accessed through the Resume Command function. Accessing another device on the bus will clear the RC bit, preventing two or more devices from simultaneously responding to the Resume Command function.
DS2422 Figure 14-1. ROM Functions Flow Chart Bus Master TX Reset Pulse From Memory Functions Flow Chart (Figure 12) From Figure 14, 2 OD Reset Pulse? N nd Part OD = 0 Y Bus Master TX ROM Function Command 33h Read ROM Command? Y RC = 0 DS2422 TX Presence Pulse N 55h Match ROM Command? F0h Search ROM Command? N Y To Figure 14 nd 2 Part ECh Cond.
DS2422 Figure 14-2.
DS2422 1-Wire SIGNALING The DS2422 requires strict protocols to ensure data integrity. The protocol consists of four types of signaling on one line: Reset Sequence with Reset Pulse and Presence Pulse, Write-Zero, Write-One and Read-Data. Except for the presence pulse the bus master initiates all these signals. The DS2422 can communicate at two different speeds, standard speed, and Overdrive Speed. If not explicitly set into the Overdrive mode, the DS2422 will communicate at standard speed.
DS2422 Master-to-Slave For a write-one time slot, the voltage on the data line must have crossed the VTH threshold before the write-one low time tW1LMAX is expired. For a write-zero time slot, the voltage on the data line must stay below the VTH threshold until the write-zero low time tW0LMIN is expired. For most reliable communication the voltage on the data line should not exceed VILMAX during the entire tW0L or tW1L window.
DS2422 The sum of tRL + d (rise rime) on one side and the internal timing generator of the DS2422 on the other side define the master sampling window (tMSRMIN to tMSRMAX) in which the master must perform a read from the data line. For most reliable communication, tRL should be as short as permissible and the master should read close to but no later than tMSRMAX. After reading from the data line, the master must wait until tSLOT is expired.
DS2422 and decides whether to continue with an operation or to reread the portion of the data with the CRC error. With the initial pass through the Read Memory with CRC flow chart, the 16-bit CRC value is the result of shifting the command byte into the cleared CRC generator, followed by the 2 address bytes and the data bytes. The password is excluded from the CRC calculation.
DS2422 COMMAND-SPECIFIC 1-Wire COMMUNICATION PROTOCOL—LEGEND SYMBOL DESCRIPTION RST PD Select WS RS CPS RM RMC CM FC SM STP TA TA-E/S <32 bytes> FFh CRC16\ FF loop AA loop 1-Wire Reset Pulse generated by master 1-Wire Presence Pulse generated by slave Command and data to satisfy the ROM function protocol Command "Write Scratchpad" Command "Read Scratchpad" Command "Copy Scratchpad with Password" Command "Read Memory with Password" Command "Read
DS2422 COPY SCRATCHPAD WITH PASSWORD (SUCCESS) RST PD Select CPS TA-E/S AA loop COPY SCRATCHPAD WITH PASSWORD (INVALID TA-E/S OR PASSWORD) RST PD Select CPS TA-E/S FF loop READ MEMORY WITH PASSWORD & CRC (SUCCESS) RST PD Select RMC TA CRC16\ <32 bytes> CRC16\ FF loop Loop READ MEMORY WITH PASSWORD & CRC (INVALID PASSWORD OR ADDRESS) RST PD Select RMC TA FF loop CLEAR MEMORY WITH PASSWORD RST PD Select CM
DS2422 STOP MISSION WITH PASSWORD RST PD Select STP FFh FF loop To verify success, read the General Status Register at address 0215h. If MIP is 0, the command was executed successfully. MISSION EXAMPLE: PREPARE AND START A NEW MISSION Assumption: The previous mission has been ended by using the Stop Mission command. Passwords are not enabled.
DS2422 STEP 2 During the setup, the device needs to learn the following information: § Time and Date § Sample Rate § Alarm Thresholds § Alarm Controls (Response to Conditional Search) § General Mission Parameters (e. g., channels to log and logging format, rollover, start mode) § Mission Start Delay The following data will setup the DS2422 for a mission that logs temperature using 8-bit format. Such a mission could last up to 56 days until the 8192-byte datalog memory is full.
MASTER MODE TX TX RX TX TX RX RX RX RX TX RX TX TX TX TX TX TX TX RX DATA (LSB FIRST) <7 FFh bytes> (Reset) (Presence) CCh AAh 00h 02h 1Fh <32 data bytes> (Reset) (Presence) CCh 99h 00h 02h 1Fh <8 FFh bytes> (Reset) (Presence) DS2422 COMMENTS Write through the end of the scratchpad Reset pulse Presence pulse Issue “skip ROM” command Issue “read scratchpad” command Read TA1, beginning offset=00h Read TA2, address=0200h Read E/S, ending offset=1Fh, flags=0h Read scratchpad data and verify Reset pulse Presen