Data Sheet

MLX90393
Micropower Triaxis® Magnetometer Datasheet
COMMAND[
7:0]
SCL
MOSI
1 2
3 4 5 6 7 8 1 2 3 4 5 6
7 8
MISO
/CS
STATUS_BYTE[7:0]
X (4-wire SPI) or Z (3-wire SPI)
Z (3 & 4-wire SPI)
ADD
NADD
Figure 5: SPI communication example
8.4 I
2
C Communcation
I
2
C Address
The I
2
C address is made up of some hard-coded bits and a memory written value as follows:
I2C_ADDR[6:0] = {EE_I2C_ADDR[4:0],A
1
,A
0
} with A
i
the user-selectable active-high value of the input pads of
the MLX90393, referred to the V
DD
supply system and EE_I2C_ADDR[4:0] default programmed to 03h, but
user accessible for overwrite.
I
2
C Principle
The MLX90393 supports I
2
C communication in both Standard Mode and Fast Mode. Bytes are transmitted
MSB first, and in order to reconstruct words, the bytes need to be concatenated MSByte first. The general
principle of communication is always the same:
Initiating the communication is always done by the Master (Start condition S)
Addressing the Slave (MLX90393) followed by a cleared bit to indicate the Master intends to write
something to the specific addressed Slave
Acknowledging by the Slave if the transmitted address corresponds to the Slave’s I
2
C address. If the
latter isn’t the case, any further activity on the bus except a Sr (Start Repeat) and P (Stop) condition
will be ignored by the MLX90393
Sending a Command Byte by the Master, as depicted in Figure 6. The Slave will always acknowledge
this, even if it is an unrecognized command. A command such as WR and RR consist of more than 1
byte, which can then be transmitted sequentially over the I
2
C bus. Referring to Figure 6 the
COMMAND byte should then be a sequence of COMMAND byte1, byte2, etc…
Issuing a Start Repeat (Sr) condition by the Master in order to restart the addressing phase
Addressing the Slave (MLX90393) followed by a set bit to indicate the Master intends to read
something from the specific addressed Slave
Acknowledging by the Slave if the transmitted address corresponds to the Slave’s I
2
C address. If the
latter isn’t the case, any further activity on the bus except a Sr (Start Repeat) and P (Stop) condition
will be ignored by the MLX90393
3901090393 Data Sheet
Rev002 Page 15 Feb-2015