Function commands – Rainbow Electronics DS2740 User Manual
Page 10
DS2740
10 of 15
Skip Net Address [CCh]. This command saves time when there is only one DS2740 on the bus by
allowing the bus master to issue a function command without specifying the address of the slave. If more
than one slave device is present on the bus, a subsequent function command can cause a data collision
when all slaves transmit data at the same time.
Search Net Address [F0h]. This command allows the bus master to use a process of elimination to
identify the 1-Wire net addresses of all slave devices on the bus. The search process involves the
repetition of a simple three-step routine: read a bit, read the complement of the bit, then write the desired
value of that bit. The bus master performs this simple three-step routine on each bit location of the net
address. After one complete pass through all 64 bits, the bus master knows the address of one device. The
remaining devices can then be identified on additional iterations of the process. See Chapter 5 of the Book
of DS19xx iButton
®
Standards for a comprehensive discussion of a net address search, including an actual
example. (This publication can be found on the Maxim/Dallas Semiconductor website at www.maxim-
ic.com.)
Resume [A5h]. This command increases data throughput in multidrop environments where the DS2740
needs to be accessed several times. Resume is similar to the Skip Net Address command in that the 64-
bit net address does not have to be transmitted each time the DS2740 is accessed. After successfully
executing a Match Net Address command or Search Net Address command, an internal flag is set in the
DS2740. When the flag is set, the DS2740 can be repeatedly accessed through the Resume command
function. Accessing another device on the bus clears the flag, thus preventing two or more devices from
simultaneously responding to the Resume command function.
FUNCTION COMMANDS
After successfully completing one of the net address commands, the bus master can access the features of
the DS2740 with any of the function commands described in the following paragraphs and summarized in
Table 4. The name of each function is followed by the 8-bit opcode for that command in square brackets.
Read Data [69h, XX]. This command reads data from the DS2740 starting at memory address XX. The
LSb of the data in address XX is available to be read immediately after the MSb of the address has been
entered. Because the address is automatically incremented after the MSb of each byte is received, the LSb
of the data at address XX + 1 is available to be read immediately after the MSb of the data at address XX.
If the bus master continues to read beyond address FFh, the DS2740 starts over at address 00h.
Addresses labeled “Reserved” in the memory map contain undefined data. The read data command can be
terminated by the bus master with a reset pulse at any bit boundary.
Write Data [6Ch, XX]. This command writes data to the DS2740 starting at memory address XX. The
LSb of the data to be stored at address XX can be written immediately after the MSb of address has been
entered. Because the address is automatically incremented after the MSb of each byte is written, the LSb
to be stored at address XX + 1 can be written immediately after the MSb to be stored at address XX. If
the bus master continues to write beyond address FFh, the DS2740 starts over writing at address 00h.
Writes to read-only addresses and reserved addresses are ignored. Incomplete bytes are not written. See
the Memory section for more details.
iButton is a registered trademark of Dallas Semiconductor.