Wire serial port operation – Rainbow Electronics DS1854 User Manual

Page 19

Advertising
background image

DS1854

Dual Temperature-Controlled Resistors with

Two Monitors

____________________________________________________________________

19

the address does not match, this part returns to a low-
power mode.

Write Operations

After receiving a matching address byte with the R/W
bit set low, provided there is no write protect, the
device goes into the write mode of operation (see the
Memory Organization section). The master must trans-
mit an 8-bit EEPROM memory address to the device to
define the address where the data is to be written. After
the byte has been received, the DS1854 transmits a
zero for one clock cycle to acknowledge the address
has been received. The master must then transmit an
8-bit data word to be written into this address. The
DS1854 again transmits a zero for one clock cycle to
acknowledge the receipt of the data. At this point, the
master must terminate the write operation with a stop
condition. The DS1854 then enters an internally timed
write process t

w

to the EEPROM memory. All inputs are

disabled during this byte write cycle.

Page Write

The DS1854 is capable of an 8-byte page write. A page
is any 8-byte block of memory starting with an address
evenly divisible by eight and ending with the starting
address plus seven. For example, addresses 00h
through 07h constitute one page. Other pages would
be addresses 08h through 0Fh, 10h through 17h, 18h
through 1Fh, etc.

A page write is initiated the same way as a byte write,
but the master does not send a STOP condition after
the first byte. Instead, after the slave acknowledges the
data byte has been received, the master can send up
to seven more bytes using the same nine-clock
sequence. The master must terminate the write cycle
with a STOP condition or the data clocked into the
DS1854 will not be latched into permanent memory.

The address counter rolls on a page during a write. The
counter does not count through the entire address
space as during a read. For example, if the starting
address is 06h and 4 bytes are written, the first byte
goes into address 06h. The second goes into address
07h. The third goes into address 00h (not 08h). The
fourth goes into address 01h. If more than 9 bytes or
more are written before a STOP condition is sent, the
first bytes sent are overwritten. Only the last 8 bytes of
data are written to the page.

Acknowledge Polling: Once the internally timed write
has started and the DS1854 inputs are disabled,
acknowledge polling can be initiated. The process
involves transmitting a start condition followed by the
device address. The R/W bit signifies the type of opera-
tion that is desired. The read or write sequence will only

be allowed to proceed if the internal write cycle has
completed and the DS1854 responds with a zero.

Read Operations

After receiving a matching address byte with the R/W bit
set high, the device goes into the read mode of opera-
tion. There are three read operations: current address
read, random read, and sequential address read.

Current Address Read

The DS1854 has an internal address register that main-
tains the address used during the last read or write
operation, incremented by one. This data is maintained
as long as V

CC

is valid. If the most recent address was

the last byte in memory, then the register resets to the
first address.

Once the device address is clocked in and acknowl-
edged by the DS1854 with the R/W bit set to high, the
current address data word is clocked out. The master
does not respond with a zero, but does generate a stop
condition afterwards.

Single Read

A random read requires a dummy byte write sequence to
load in the data byte address. Once the device and data
address bytes are clocked in by the master, and
acknowledged by the DS1854, the master must generate
another start condition. The master now initiates a current
address read by sending the device address with the
R/W bit set high. The DS1854 acknowledges the device
address and serially clocks out the data byte.

Sequential Address Read

Sequential reads are initiated by either a current
address read or a random address read. After the mas-
ter receives the first data byte, the master responds
with an acknowledge. As long as the DS1854 receives
this acknowledge after a byte is read, the master can
clock out additional data words from the DS1854. After
reaching address FFh, it resets to address 00h.

The sequential read operation is terminated when the
master initiates a stop condition. The master does not
respond with a zero.

For a more detailed description of 2-wire theory of
operation, see the following section.

2-Wire Serial Port Operation

The 2-wire serial port interface supports a bidirectional
data transmission protocol with device addressing. A
device that sends data on the bus is defined as a trans-
mitter, and a device receiving data as a receiver. The
device that controls the message is called a master.
The devices that are controlled by the master are

Advertising