Figure 20. typical 1-wire bus interface circuitry, Transaction sequence, Net address commands – Rainbow Electronics DS2756 User Manual

Page 21: Tx rx, Rx = receive

Advertising
background image

DS2756: High-Accuracy Battery Fuel Gauge with Programmable Suspend Mode

21 of 26

later. If the bus is left low for more than 120

ms, slave devices on the bus begin to interpret the low period as a reset

pulse, effectively terminating the transaction.

Figure 20. Typical 1-Wire Bus Interface Circuitry














The pullup must be disabled to allow the DS2756 to enter Suspend mode. The internal pulldown on the DS2756
DQ input ensures that DQ will be pulled to a logic low when the pullup is simply disconnected. With a
microcontroller, the pullup resistor can be connected between a general purpose port pin and the DS2756 DQ
terminal as shown in Figure 1. The GPIO pin, labeled Pullup Control, can be driven high for Active mode. The pin
labeled Data I/O is used bidirectionally for serial communication. When Standby mode is desired, the Pullup
Control pin can be driven low or floated in the high-Z state. If the current reading falls within the range of the
suspend thresholds, the DS2756 will enter Suspend if configured to do so (PMOD = 1 and PIE ≠ 00).

TRANSACTION SEQUENCE

The protocol for accessing the DS2756 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 DS2756 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 I/O 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 command is followed by the 8-bit opcode for
that command in square brackets. Figure 21 presents a transaction flowchart of the net address commands.

Read Net Address [33h or 39h]. This command allows the bus master to read the DS2756’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 DS2756 on the 1-Wire
bus. Only the addressed DS2756 responds to any subsequent function command. All other slave devices ignore

1

mA

Typ.

100

W

MOSFET

TX

RX

Rx

Tx

RX =
Receive

Tx = TRANSMIT

V

PULLUP

(2.0V to 5.5V)

4.7k

W

BUS MASTER

DS275x 1-WIRE PORT

Advertising