CL190/CL191 Lens Controller - User Manual
8
I2C communication
The CL191 contains a master/slave protocol with a maximum frequency of
400khz. The address is 0x20 for writing and 0x21 for reading.
8.1
I2C command structure
The I2C protocol allows you to send command strings to the CL191 and to
retrieve the results. The maximum length of any command to, or reply
from the CL191 is 20 bytes. See
Section 9 , Configuration commands
for
the range of commands you can send with I2C.
To write to the device, the master generates a start condition (S) and then
transmits the slave address with the read/write (R/W) bit set to zero. This
should be followed by each individual byte of the command string and a
terminating CR (0x0D). The slave acknowledges (A) each byte sent. On
completion, the master sends a stop condition (P).
The following example shows the
VR
command being sent to the CL191:
To retrieve the result from the command string, the CL191 requires a
100ms period between the sending of a command and retrieval of the
result.
To read from the slave device, the master generates a start condition (S)
and then transmits the slave address with the R/W bit set to one. The
CL191 then sends a byte containing the number of bytes in the result
string. The master acknowledges (A) each byte until the final byte when
the master sends a not acknowledged condition (NA) and stops
transmission.
The example overleaf shows the reading of the
VR
response:
—
15
—
Содержание CL190
Страница 1: ...CL190 CL191 Lens Controller Issue 002 User manual www gardasoft com...
Страница 4: ...CL190 CL191 Lens Controller User Manual 4...
Страница 16: ...CL190 CL191 Lens Controller User Manual 16...
Страница 35: ...CL190 CL191 Lens Controller User Manual This page is left blank for your notes 35...