DS2404
11 of 28
020998
Read Memory [F0h]
The read memory command may be used to read the entire memory. After issuing the command, the user
must provide the 2-byte target address. After the two bytes, the user reads data beginning from the target
address and may continue until the end of memory, at which point logic 1’s will be read. It is important to
realize that the target address registers will contain the address provided. The ending offset/data status
byte is unaffected.
The hardware of the DS2404 provides a means to accomplish error-free writing to the memory section.
To safeguard reading data in the 1-Wire environment and to simultaneously speed up data transfers, it is
recommended to packetize data into data packets of the size of one memory page each. Such a packet
would typically store a 16-bit CRC with each page of data to ensure rapid, error-free data transfers that
eliminate having to read a page multiple times to determine if the received data is correct or not. (See the
Book of DS19xx iButton Standards, Chapter 7 for the recommended file structure to be used with the 1-
Wire environment.)
MEMORY FUNCTION EXAMPLES
Example 1: Write one page of data to page 15
Read page 15 (3-wire port)
MASTER MODE
TX
TX
TX
TX
TX
TX
TX
RX
RX
RX
RX
TX
TX
TX
TX
TX
RX
TX
TX
TX
TX
RX
TX
DATA(LSB FIRST)
Reset
0Fh
E0h
01h
<32 data bytes>
Reset
AAh
E0h
01h
1Fh
<32 data bytes>
Reset
55h
E0h
01h
1Fh
<busy indicator>
Reset
F0h
E0h
01h
<32 data bytes>
Reset
COMMENTS
Master pulses
RST
low
Issue “write scratchpad” command
TA1, beginning offset=0
TA2, address=01E0h
Write 1 page of data to scratchpad
Master pulses
RST
low
Issue “read scratchpad” command
Read TA1, beginning offset=0
Read TA2, address=01E0h
Read E/S, ending offset=31d, flags=0
Read scratchpad data and verify
Master pulses
RST
low
Issue “copy scratchpad” command
TA1
TA2
AUTHORIZATION CODE
E/S
Wait until DQ=0 (~30
μ
s typical)
Master pulses
RST
low
Issue “read memory” command
TA1, beginning offset=0
TA2, address=01E0h
Read memory page 15 and verify
Master pulses
RST
low, done
NOTE:
The ROM function commands do not apply to the 3-wire port. After
RST
is at a high level, the
device expects to receive a memory function command.