
AD5934
WRITING/READING TO THE AD5934
The interface specification defines several different protocols
for different types of read and write operations. This section
describes the protocols used in the AD5934. The figures in this
section use the following abbreviations:
S
Start
P
Stop
R
Read
W Write
A
Acknowledge
A
No acknowledge write byte/command byte
Rev. 0 | Page 24 of 32
User Command Codes
The command codes in Table 18 are used for reading/writing to
the interface. They are further explained in this section, but are
grouped here for easy reference.
Table 18.
Command
Code
Name
Code Description
1010 0000
Block
Write
multiple bytes to the RAM. See the
Block Write section.
1010 0001
Block
Read
multiple bytes from RAM/memory.
See the Block Read section.
1011 0000
Address
Pointer
the address pointer to any location in
the memory. The data contains the
address of the register where the
pointer should be pointing.
Write Byte/Command Byte
In this operation the master device sends a byte of data to the
slave device. The write byte can either be a data byte write to a
RAM location or can be a command operation. To write data to
a register the command sequence is as follows:
Code
This command is used when writing
This command is used when reading
This command enables the user to set
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 ACK on SDA.
4.
The master sends a register address.
5.
The slave asserts ACK on SDA.
6.
The master sends a data byte.
7.
The slave asserts ACK on SDA.
8.
The master asserts a stop condition on SDA to end the
transaction.
S
SLAVE
ADDRESS
REGISTER
ADDRESS
REGISTER
DATA
A
W
A
A
P
0
Figure 30. Writing Register Data to Register Address
In the AD5934, the write byte protocol is also used to set a
pointer to a register location. This is used for a subsequent
single-byte read from the same address or block read or write
starting at that address.
To set a register pointer, the following sequence is applied:
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 ACK on SDA.
4.
The master sends a pointer command code (see Table 18, a
pointer command = 1011 0000).
5.
The slave asserts ACK on SDA.
6.
The master sends a data byte (a register location where
pointer is to point).
7.
The slave asserts ACK on SDA.
8.
The master asserts a stop condition on SDA to end the
transaction.
S
A
W
A
A
P
POIN1011 0000
ASLAVE
RETO POINT TO
0
Figure 31. Setting Pointer to Register Address
BLOCK WRITE
In this operation, the master device writes a block of data to a
slave device. The start address for a block write must previously
have been set. In the case of the AD5934 this is done by setting
a pointer to set the register address.
1.
2.
The master device asserts a start condition on SDA.
The master sends the 7-bit slave address followed by the
write bit (low).
The addressed slave device asserts ACK on SDA.
The master sends an 8-bit command code (1010 0000) that
tells the slave device to expect a block write.
The slave asserts ACK on SDA.
The master sends a data byte that tells the slave device the
number of data bytes to be sent to it.
The slave asserts ACK on SDA.
The master sends the data bytes.
The slave asserts ACK on SDA after each data byte.
10.
The master asserts a stop condition on SDA to end the
transaction.
3.
4.
5.
6.
7.
8.
9.
A
A
A
A
S
W
A
P
ASLAVE
WRITE
BNUMBER
BYTE 0
BYTE 1
BYTE 2
0
A
Figure 32. Writing a Block Write