English
Language : 

MLX75031 Datasheet, PDF (27/67 Pages) Melexis Microelectronic Systems – Optical Gesture & Proximity Sensing IC
MLX75031
Optical Gesture & Proximity Sensing IC
with Integrated LED Drivers
Datasheet
Figure 8 : SPI Timing Diagram for 2 byte instructions
The basic structure of a command consists of 2 bytes: the Control1 Byte and the Control2 Byte that are
uploaded to the device and the Data1 Byte and the Data2 Byte that are downloaded to the micro-controller.
Exceptions are the commands needed to read and write the user registers (WR/RR). These commands need
3 bytes. The timing diagram is given in Figure 9.
All data transfer happens with MSB first, LSB last. Referring to Figure 8 and Figure 9 within a byte, bit 7 is
always defined as the MSB, bit 0 is the LSB. This applies to all data transfers from master to slave and vice
versa.
Figure 9 : SPI Timing Diagram for 3 byte instructions
The MSB of the Control1 Byte (bit 7) is a command token: setting this bit to 1 means that the Control1 Byte
will be interpreted as a new command. If the MSB is 0, the next bits are ignored and no command will be
accepted. The idle command has a Control1 Byte of 0x00.
The command type (chip reset, watchdog trigger, power mode change, start measurements, start read-out,
read/write register) is selected with the next bits 6..0 of the Control1 Byte.
The Control2 Byte consists of 0x00, to allow clocking out the Data2 Byte. The Data2 Byte contains always
the Ctrl1 Byte that was uploaded. Thus the micro-controller can check that the Data2 Byte is an exact
replica of the Ctrl1 Byte, to verify that the right command is uploaded to the device.
REVISION 001 – JANUARY, 2013
39010xxxxx
Page 27 of 27