Serial control bus
VT5366
6.3
6.3.1
Types of messages
This section gives guidelines on the basic operations to read data from and write data to the
serial interface.
The serial interface supports variable length messages. A message may contain no data
bytes, one data byte or many data bytes. This data can be written to or read from common
or different locations within the sensor. The range of instructions available are detailed
below.
– A write message with no data byte is used to set the index for a subsequent read
message.
– Multiple location writes may be used for faster information transfers.
Examples of these operations are given below. A full description of the internal registers is
given in the previous section. For all examples, the slave address used is 3210 for writing
and 3310 for reading. The write address includes the read/write bit (the LSB) set to zero
while this bit is set in the read address.
Single location, single data write
When a random value is written to the sensor, the message looks as shown in Figure 10.
Figure 10. Single location, single write
Device
Start address
Ack
Index
Data
Stop
S
20h
A0
32h
A
85h
AP
6.3.2
In this example, the fineH exposure register (index = 3210) is set to 8510. The r/w bit is set to
zero for writing and the Inc. bit (MSB of the index byte) is set to zero to disable automatic
increment of the index after writing the value. The address index is preserved and may be
used by a subsequent read. The write message is terminated with a stop condition from the
master.
Multiple location write
It is possible to write data bytes to consecutive adjacent internal registers without having to
send explicit indexes prior to sending each data byte. An auto-increment write is
assumed if no stop condition occurs.
Figure 11. Multiple location write
Incremental write
S 20h A
16
A
11
A C1
AP
data written
@ index = 16
data written
@ index = 17
20/30