English
Language : 

MLX75031 Datasheet, PDF (38/67 Pages) Melexis Microelectronic Systems – Optical Gesture & Proximity Sensing IC
MLX75031
Optical Gesture & Proximity Sensing IC
with Integrated LED Drivers
Datasheet
In order to detect some transmission errors while writing data towards the slave device, the micro-
controller has to compute an odd and an even parity bit of the Control2 and the 4 MSB's of the Control3
byte and send these parity bits to the slave. The slave will check if the parity bits are valid. The data will only
be written into the registers if the parity bits are correct. If the parity bits are not correct, bit 7 of the
internal Status Flag Byte will be set high, indicating that the command was invalid. This can be seen when
uploading a NOP command (when one is only interested in reading back the internal status flags) or during
upload of the next command.
In case the parity bits were not correct, the data of the registers will not be changed.
The parity bits calculation is based on the data D7..D0 and A3..A0. If the number of ones in the given data set
[D7..D0, A3..A0] is odd, the even parity bit P0 shall be set to 1, making the total number of ones in the set
[D7..D0, A3..A0, P0] even.
Similar: if the number of ones in the given data set [D7..D0, A3..A0] is even, the odd parity bit P1 shall be set
to 1, making the total number of ones in the set [D7..D0, A3..A0, P1] odd.
Note that the parity bits can be generated with XOR instructions: P1 = XNOR(D7..D0, A3..A0) and P0 =
XOR(D7..D0, A3..A0). The odd parity bit P1 should always be the inverse of the even parity bit P0.
The RR command returns the contents of an 8-bit register addressed by bits A3..0. Data is read back over
the MISO pin. The Data1 Byte contains the Internal Status Flag byte. Data2 Byte contains the copy of the
Control1 Byte. Data3 Byte contains the 8 bits of the target register.
The RR command is defined in the table below:
Control1 Byte
1000 1110
A3A2A1A0
Data1 Byte
Status Flag Byte
D7..0
Control2 Byte
Control3 Byte
A3A2A1A0 0000
0000 0000
Address of target register
Data2 Byte
Data3 Byte
1000 1110
D7D6D5D4 D3D2D1D0
Data contents of register read
Table 21 : Read Register command
Note : WR and RR commands are commands that require 3 bytes instead of 2 bytes.
More information concerning the user registers can be found in Section 0.
8.11.8. SD – Start Diagnostics
The SD command will start a measurement cycle in which internal signals will be measured and converted.
With this command it is possible to test some circuits in the chip and check if they are functioning as
expected.
The SD command behaves in much the same way as the SM commands: instead of uploading a SM
command, a SD command can be uploaded. This starts the measurement cycle and conversion of some
internal signals. The pin DR goes high when the cycle is completed, indicating that a read-out can be started.
With the RO command it is possible to read out the data and check if all the data values are within certain
ranges.
REVISION 001 – JANUARY, 2013
39010xxxxx
Page 38 of 38