
DS1923: Hygrochron Temperature/Humidity Logger iButton with 8kB Data Log Memory
in this example is 1Fh. For best economy of speed and efficiency, the target address for writing should point to the
beginning of a page, i.e., the byte offset is 0. Thus the full 32-byte capacity of the scratchpad is available, resulting
also in the ending offset of 1Fh. The ending offset together with the Partial and Overflow Flag is mainly a means to
support the master checking the data integrity after a Write command. The highest valued bit of the E/S Register,
called AA or Authorization Accepted, indicates that a valid copy command for the scratchpad has been received
and executed. Writing data to the scratchpad clears this flag.
Figure 8. ADDRESS REGISTERS
27 of 52
WRITING WITH VERIFICATION
To write data to the DS1923, 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 DS1923 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 DS1923 has received these bytes, it copies
the data to the requested location beginning at the target address.
MEMORY- AND CONTROL-FUNCTION COMMANDS
The “Memory/Control Function Flow Chart” (Figure 9) describes the protocols necessary for accessing the memory
and the special function registers of the DS1923. An example on how to use these and other functions to set up the
DS1923 for a mission is included at the end of this document, preceding the
Electrical Characteristics
section. The
communication between master and DS1923 takes place either at regular speed (default, OD = 0) or at Overdrive
Speed (OD = 1). If not explicitly set into the Overdrive Mode the DS1923 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
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 will be 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 DS1923 (see Figure 15) calculates
a CRC of the entire data stream, starting at the command code and ending at the last data byte sent by the master.
Bit #
7
6
5
4
3
2
1
0
Target Address (TA1)
T7
T6
T5
T4
T3
T2
T1
T0
Target Address (TA2)
T15
T14
T13
T12
T11
T10
T9
T8
Ending Address with
Data Status (E/S)
(Read Only)
AA
0
PF
E4
E3
E2
E1
E0