DS2740
Figure 9. 1-Wire BUS INTERFACE CIRCUITRY
10 of 16
TRANSACTION SEQUENCE
The protocol for accessing the DS2740 through the 1-Wire port is as follows:
Initialization
Net Address Command
Function Command
Transaction/Data
The sections that follow describe each of these steps in detail.
All transactions of the 1-Wire bus begin with an initialization sequence consisting of a reset pulse
transmitted by the bus master followed by a presence pulse simultaneously transmitted by the DS2740
and any other slaves on the bus. The presence pulse tells the bus master that one or more devices are on
the bus and ready to operate. For more details, see the
1-Wire Signaling section.
NET ADDRESS COMMANDS
Once the bus master has detected the presence of one or more slaves, it can issue one of the net address
commands described in the following paragraphs. The name of each net address command is followed by
the 8-bit opcode for that command in square brackets. Figure 10 presents a transaction flowchart of the
net address commands.
Read Net Address [33h or 39h]. This command allows the bus master to read the DS2740’s 1-Wire net
address. This command can only be used if there is a single slave on the bus. If more than one slave is
present, a data collision occurs when all slaves try to transmit at the same time (open drain produces a
wired-AND result). The RNAOP bit in the status register selects the opcode for this command, with
RNAOP = 0 indicating 33h, and RNAOP = 1 indicating 39h.
Match Net Address [55h]. This command allows the bus master to specifically address one DS2740 on
the 1-Wire bus. Only the addressed DS2740 responds to any subsequent function command. All other
slave devices ignore the function command and wait for a reset pulse. This command can be used with
one or more slave devices on the bus.
1
μ
A
(typ)
100Ω
MOSFET
Tx
Rx
Rx
Tx
Rx = RECEIVE
Tx = TRANSMIT
V
PULLUP
(2.0V to 5.5V)
4.7k
BUS MASTER DS2740 1-Wire PORT
Ω
DS2740
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.
11 of 16
DS2740
Figure 10. NET ADDRESS COMMAND FLOW CHART
MASTER Tx
RESET PULSE
DS2740 Tx
PRESENCE PULSE
MASTER Tx NET
ADDRESS
COMMAND
55h
MATCH
33h / 39h
READ
F0h
SEARCH
CCh
SKIP
DS2740 Tx
FAMILY CODE
1 BYTE
DS2740 Tx
SERIAL NUMBER
6 BYTES
DS2740 Tx
CRC
1 BYTE
MASTER Tx
BIT 0
BIT 0
MATCH ?
MASTER Tx
BIT 1
DS2740 Tx BIT 0
DS2740 Tx BIT 0
MASTER Tx BIT 0
BIT 0
MATCH ?
DS2740 Tx BIT 1
DS2740 Tx BIT 1
MASTER Tx BIT 1
BIT 1
MATCH ?
BIT 1
MATCH ?
MASTER Tx
FUNCTION
COMMAND
MASTER Tx
BIT 63
DS2740 Tx BIT 63
DS2740 Tx BIT 63
MASTER Tx BIT 63
BIT 63
MATCH ?
MASTER Tx
FUNCTION
COMMAND
YES
NO NO NO
NO
YESYES YES
NO NO
NO NO
YESYES
YESYES
NO
YES
A5h
RESUME
YES
NO
RESUME
FLAG SET ?
MASTER Tx
FUNCTION
COMMAND
YES
NO
SET
RESUME
FLAG
12 of 16

DS2740BU+

Mfr. #:
Manufacturer:
Maxim Integrated
Description:
Battery Management High-Precision Coulomb Counter
Lifecycle:
New from this manufacturer.
Delivery:
DHL FedEx Ups TNT EMS
Payment:
T/T Paypal Visa MoneyGram Western Union

Products related to this Datasheet