DS2422 Maxim, DS2422 Datasheet - Page 26

no-image

DS2422

Manufacturer Part Number
DS2422
Description
The DS2422 temperature/data logger combines the core functions of a fully featured data logger in a single chip
Manufacturer
Maxim
Datasheet

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
DS2422S
Manufacturer:
DALLAS
Quantity:
20 000
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. 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 Write command was not recognized by the device. If everything went correctly, both flags are
cleared and the ending offset indicates the address of the last byte written to the scratchpad. Now the master can
continue verifying every data bit. After the master has verified the data, it has to send the Copy Scratchpad
command. This command must be followed exactly by the data of the three address registers TA1, TA2 and E/S as
the master has read them verifying the scratchpad. As soon as the DS2422 has received these bytes, it will copy
the data to the requested location beginning at the target address.
MEMORY- AND CONTROL-FUNCTION COMMANDS
The “Memory/Control Function Flow Chart” (Figure 12) describes the protocols necessary for accessing the
memory and the special function registers of the DS2422. An example on how to use these and other functions to
set up the DS2422 for a mission is included at the end of this document, preceding the Electrical Characteristics
section. The communication between master and DS2422 takes place either at regular speed (default, OD = 0) or
at Overdrive Speed (OD = 1). If not explicitly set into the Overdrive Mode the DS2422 assumes regular speed.
Internal memory access during a mission has priority over external access through the 1-Wire interface. This
affects several of the commands described below. See section Memory Access Conflicts for details and remedies.
WRITE SCRATCHPAD COMMAND [0Fh]
After issuing the Write Scratchpad command, the master must first provide the 2-byte target address, followed by
the data to be written to the scratchpad. The data is written to the scratchpad starting at the byte offset (T4:T0).
The master has to send as many bytes as are needed to reach the Ending Offset of 1Fh. If a data byte is
incomplete, its content is ignored and the partial byte flag PF is set.
When executing the Write Scratchpad command the CRC generator inside the DS2422 (see Figure 18) calculates
a CRC of the entire data stream, starting at the command code and ending at the last data byte sent by the master.
This CRC is generated using the CRC16 polynomial by first clearing the CRC generator and then shifting in the
command code (0Fh) of the Write Scratchpad command, the Target Addresses TA1 and TA2 as supplied by the
master and all the data bytes. The master may end the Write Scratchpad command at any time. If the ending offset
is 11111b, the master may send 16 read-time slots and receives the inverted CRC16 generated by the DS2422.
Note that both register pages are write-protected during a mission. Although the Write Scratchpad command works
normally at any time, the subsequent copy scratchpad to a register page will fail during a mission.
READ SCRATCHPAD COMMAND [AAh]
This command is used to verify scratchpad data and target address. After issuing the Read Scratchpad command,
the master begins reading. The first 2 bytes will be the target address. The next byte will be the ending offset/data
status byte (E/S) followed by the scratchpad data beginning at the byte offset (T4:T0), as shown in Figure 11. The
master may continue reading data until the end of the scratchpad after which it will receive an inverted CRC16 of
the command code, Target Addresses TA1 and TA2, the E/S byte, and the scratchpad data starting at the target
address. After the CRC is read, the bus master will read logical 1s from the DS2422 until a reset pulse is issued.
26 of 49

Related parts for DS2422