Ds4432 dual-channel, i, C, 7-bit sink/source current dac, Applications information – Rainbow Electronics DS4432 User Manual
Page 8: C communication, Example calculation for an adjustable power supply

DS4432
Dual-Channel, I
2
C, 7-Bit Sink/Source
Current DAC
8
_______________________________________________________________________________________
Byte Read: A byte read is an 8-bit information trans-
fer from the slave to the master plus a 1-bit ACK or
NACK from the master to the slave. The 8 bits of
information that are transferred (most significant bit
first) from the slave to the master are read by the
master using the bit-read definition, and the master
transmits an ACK using the bit-write definition to
receive additional data bytes. The master must
NACK the last byte read to terminate communication
so the slave returns control of SDA to the master.
Slave Address Byte: Each slave on the I
2
C bus
responds to a slave address byte sent immediately fol-
lowing a START condition. The slave address byte
contains the slave address in the most significant 7
bits, and the R/W bit in the least significant bit. The
DS4432’s slave address is 90h.
When the R/W bit is 0 (such as in 90h), the master is
indicating it will write data to the slave. If R/W = 1
(91h in this case), the master is indicating it wants to
read from the slave. If an incorrect slave address is
written, the DS4432 assumes the master is commu-
nicating with another I
2
C device and ignores the
communication until the next START condition is
sent.
Memory Address: During an I
2
C write operation,
the master must transmit a memory address to iden-
tify the memory location where the slave is to store
the data. The memory address is always the second
byte transmitted during a write operation following
the slave address byte.
I
2
C Communication
Writing to a Slave: The master must generate a START
condition, write the slave address byte (R/W = 0), write
the memory address, write the byte of data, and gener-
ate a STOP condition. Remember that the master must
read the slave’s acknowledgement during all byte-write
operations.
Reading from a Slave: To read from the slave, the
master generates a START condition, writes the slave
address byte with R/W = 1, reads the data byte with a
NACK to indicate the end of the transfer, and generates
a STOP condition.
Applications Information
Example Calculation
for an Adjustable Power Supply
In this example, the typical operating circuit is used to
create Figure 3, a 2.0V voltage supply with ±20% mar-
gin. The adjustable power supply has a DC-DC convert-
er output voltage, V
OUT
, of 2.0V and a DC-DC converter
feedback voltage, V
FB
, of 0.8V. To determine the rela-
tionship of R
0A
and R
0B
, start with the equation:
Substituting V
FB
= 0.8V and V
OUT
= 2.0V, the relation-
ship between R
0A
and R
0B
is determined to be:
R
0A
= 1.5 x R
0B
V
R
R
R
V
FB
B
A
B
OUT
=
+
×
0
0
0
SLAVE
ADDRESS
START
START
1
0
0
1
0
0
0
R/W
SLAVE
ACK
SLAVE
ACK
SLAVE
ACK
MSB
LSB
MSB
LSB
MSB
LSB
b7
b6
b5
b4
b3
b2
b1
b0
READ/
WRITE
REGISTER/MEMORY ADDRESS
b7
b6
b5
b4
b3
b2
b1
b0
DATA
STOP
SINGLE BYTE WRITE
-WRITE RESISTOR
F9h TO 00h
SINGLE BYTE READ
-READ RESISTOR F8h
START
REPEATED
START
91h
MASTER
NACK
STOP
1 0 0 1 0 0 0 0
1 1 1 1 1 0 0 0
F8h
1 0 0 1 0 0 0 1
1 0 0 1 0 0 0 0
1 1 1 1 1 0 0 1
90h
F9h
STOP
DATA
EXAMPLE I
2
C TRANSACTIONS
TYPICAL I
2
C WRITE TRANSACTION
0 0 0 0 0 0 0 0
90h
A)
B)
SLAVE
ACK
SLAVE
ACK
SLAVE
ACK
SLAVE
ACK
SLAVE
ACK
SLAVE
ACK
Figure 2. I
2
C Communication Examples