Datasheet

ADM1166
Rev. 0 | Page 29 of 32
WRITE OPERATIONS
The SMBus specification defines several protocols for different
types of read and write operations. The following abbreviations
are used in Figure 39 to Figure 47:
S = Start
P = Stop
R = Read
W = Write
A = Acknowledge
A
= No acknowledge
The ADM1166 uses the following SMBus write protocols.
Send Byte
In a send byte operation, the master device sends a single
command byte to a slave device, as follows:
1.
The master device asserts a start condition on SDA.
2.
The master sends the 7-bit slave address followed by the
write bit (low).
3.
The addressed slave device asserts an acknowledge (ACK)
on SDA.
4.
The master sends a command code.
5.
The slave asserts an ACK on SDA.
6.
The master asserts a stop condition on SDA, and the
transaction ends.
In the ADM1166, the send byte protocol is used for two
purposes:
To write a register address to the RAM for a subsequent
single byte read from the same address, or for a block read
or block write starting at that address, as shown in Figure 39.
2413 5
SLAVE
ADDRESS
RAM
ADDRESS
(0x00 TO 0xDF)
SWA A
6
P
09332-039
Figure 39. Setting a RAM Address for Subsequent Read
To erase a page of EEPROM memory. EEPROM memory
can be written to only if it is unprogrammed. Before writing
to one or more EEPROM memory locations that are already
programmed, the page(s) containing those locations must
first be erased. EEPROM memory is erased by writing a
command byte.
The master sends a command code telling the slave device
to erase the page. The ADM1166 command code for a page
erasure is 0xFE (1111 1110). Note that for a page erasure to
take place, the page address must be given in the previous
write word transaction (see the Write Byte/Word section). In
addition, Bit 2 in the UPDCFG register (Address 0x90)
must be set to 1.
2413 5
SLAVE
ADDRESS
COMMAND
BYTE
(0xFE)
SWA A
6
P
09332-040
Figure 40. EEPROM Page Erasure
As soon as the ADM1166 receives the command byte,
page erasure begins. The master device can send a stop
command as soon as it sends the command byte. Page
erasure takes approximately 20 ms. If the ADM1166 is
accessed before erasure is complete, it responds with a
no acknowledge (NACK).
Write Byte/Word
In a write byte/word operation, the master device sends a command
byte and one or two data bytes to the slave device, as follows:
1.
The master device asserts a start condition on SDA.
2.
The master sends the 7-bit slave address followed by the
write bit (low).
3.
The addressed slave device asserts an ACK on SDA.
4.
The master sends a command code.
5.
The slave asserts an ACK on SDA.
6.
The master sends a data byte.
7.
The slave asserts an ACK on SDA.
8.
The master sends a data byte or asserts a stop condition.
9.
The slave asserts an ACK on SDA.
10.
The master asserts a stop condition on SDA to end the
transaction.
In the ADM1166, the write byte/word protocol is used for three
purposes:
To write a single byte of data to the RAM. In this case, the
command byte is RAM Address 0x00 to RAM Address 0xDF,
and the only data byte is the actual data, as shown in Figure 41.
SLAVE
ADDRESS
RAM
ADDRESS
(0x00 TO 0xDF)
S W A DATAAPA
2413 576 8
09332-041
Figure 41. Single Byte Write to the RAM
To set up a 2-byte EEPROM address for a subsequent read,
write, block read, block write, or page erase. In this case, the
command byte is the high byte of EEPROM Address 0xF8
to EEPROM Address 0xFB. The only data byte is the low
byte of the EEPROM address, as shown in Figure 42.
SLAVE
ADDRESS
EEPROM
ADDRESS
HIGH BYTE
(0xF8 TO 0xFB)
SWA
EEPROM
ADDRESS
LOW BYTE
(0x00 TO 0xFF)
APA
2413 5 76 8
09332-042
Figure 42. Setting an EEPROM Address