beautypg.com

Rainbow Electronics DS2788 User Manual

Page 25

background image

Match Net Address [55h]. This command allows the
bus master to specifically address one DS2788 on the

1-Wire bus. Only the addressed DS2788 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.

Skip Net Address [CCh]. This command saves time
when there is only one DS2788 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 func-

tion 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 comple-

ment 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 com-

plete 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

p r o c e s s . S e e C h a p t e r 5 o f t h e B o o k o f i B u t t o n

Standards for a comprehensive discussion of a net

a d d r e s s s e a r c h , i n c l u d i n g a n a c t u a l e x a m p l e

(

www.maxim-ic.com/ibuttonbook

).

Resume [A5h]. This command increases data through-
put in multidrop environments where the DS2788 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

DS2788 is accessed. After successfully executing a

Match Net Address command or Search Net Address

command, an internal flag is set in the DS2788. When

the flag is set, the DS2788 can be repeatedly accessed

through the Resume command function. Accessing

another device on the bus clears the flag, thus prevent-

ing two or more devices from simultaneously respond-

ing to the Resume command function.

Function Commands

After successfully completing one of the net address

commands, the bus master can access the features of

t h e D S 2 7 8 8 w i t h a n y o f t h e f u n c t i o n c o m m a n d s

described in the following paragraphs. The name of

each function is followed by the 8-bit op code for that

command in square brackets. Table 5 summarizes the

function commands.

Read Data [69h, XX]. This command reads data from
the DS2788 starting at memory address XX. The LSb of

the data in address XX is available to be read immedi-

ately 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 mas-

ter continues to read beyond address FFh, data is read

starting at memory address 00 and the address is auto-

matically incremented until a reset pulse occurs.

Addresses labeled “Reserved” in the memory map

contain undefined data values. The read data com-

mand can be terminated by the bus master with a reset

pulse at any bit boundary. Reads from EEPROM block

addresses return the data in the shadow RAM. A Recall

Data command is required to transfer data from the

EEPROM to the shadow. See the Memory section for

more details.

Write Data [6Ch, XX]. This command writes data to the
DS2788 starting at memory address XX. The LSb of the

data to be stored at address XX can be written immedi-

ately 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 con-

tinues to write beyond address FFh, the data starting at

address 00 is overwritten. Writes to read-only address-

es, reserved addresses, and locked EEPROM blocks

are ignored. Incomplete bytes are not written. Writes to

unlocked EEPROM block addresses modify the shad-

ow RAM. A Copy Data command is required to transfer

data from the shadow to the EEPROM. See the Memory

section for more details.

D
S

2

7

8

8

Stand-Alone Fuel-Gauge IC with

LED Display Drivers

______________________________________________________________________________________

25