DS1803
4 of 11
SLAVE ADDRESS
The control byte is the first byte received following the START condition from the master device. The
control byte consists of a four bit control code; for the DS1803, this is 0101 binary. The next three bits of
the control byte are the device select bits (A2, A1, A0). They are used by the master device to select
which of the devices on the bus are to be accessed. The last bit of the control byte (R/ W*) defines the
operation to be performed. When set to a one a read operation is selected, and when set to a zero a write
operation is selected. Figure 3 shows the control byte for the DS1803.
Following the START condition, the DS1803 monitors the SDA bus for the control byte being
transmitted. Upon receiving a matching control byte, the DS1803 outputs an acknowledge signal on the
SDA line.
COMMAND AND PROTOCOL
The command and protocol structure of the DS1803 allows the user to read or write the potentiometer(s).
The command structures for the part are presented in Figures 4 and 5. Data is transmitted most significant
bit (MSB) first. During communication, the receiving unit always generates the acknowledge.
Reading the DS1803
As shown in Figure 4, the DS1803 provides one read command operation. This operation allows the user
to read both potentiometers. Specifically, the R/ W bit of the control byte is set equal to a 1 for a read
operation. Communication to read the DS1803 begins with a START condition which is issued by the
master device. The control byte from the master device will follow the START condition. Once the
control byte has been received by the DS1803, the part will respond with an ACKNOWLEDGE. The
R/ W bit of the control byte as stated should be set equal to ‘1’ for reading the DS1803.
When the master has received the ACKNOWLEDGE from the DS1803, the master can then begin to
receive potentiometer wiper data. The value of the potentiometer-0 wiper position will be the first
returned from the DS1803. Once the eight bits of the potentiometer-0 wiper position has been transmitted,
the master will need to issue an ACKNOWLEDGE, unless it is the only byte to be read, in which case the
master issues a NOT ACKNOWLEDGE. If desired the master may stop the communication transfer at
this point by issuing the STOP condition. However, if the value of the potentiometer-1 wiper position
value is needed, communication transfer can continue by clocking the remaining eight bits of the
potentiometer-1 value, followed by an NOT ACKNOWLEDGE. Final communication transfer is
terminated by issuing the STOP command.
Writing the DS1803
A data flow diagram for writing the DS1803 is shown in Figure 5. The DS1803 has three write
commands. These include write pot-0, write pot-1, and write pot-0/1. The write pot-0 command allows
the user to write the value of potentiometer-0 and as an option the value of potentiometer-1. The write-1
command allows the user to write the value of potentiometer-1 only. The last write command, write-0/1,
allows the user to write both potentiometers to the same value with one command and one data value
being issued.
All the write operations begin with a START condition. Following the START condition, the master
device will issue the control byte. The read/write bit of the control byte will be set to ‘0’ for writing the
DS1803. Once the control byte has been issued and the master receives the acknowledgment from the
DS1803, the command byte is transmitted to the DS1803. As mentioned above, there exist three write