Data Sheet

MLX90393
Micropower Triaxis® Magnetometer Datasheet
8. Digital Specification
The supported protocols are I
2
C and SPI. The SENB/CS pin is used to define the protocol to be used:
/CS = 0 for SPI, addressing the MLX90393 slave in SPI mode (3- and 4-wire), but releasing this line in
between commands (no permanent addressing allowed)
/CS = 1 for I2C, addressing the MLX90393 slave when the correct address is transmitted over the
bus (permanently kept high)
To make sure the activity on the SPI bus can not be accidentally interpreted as I2C protocol, programming
bits are available in the memory of the MLX90393 to force the communication mode. It concerns the
COMM_MODE[1:0] bits with the following effect:
COMM_MODE[1]
COMM_MODE[0]
Description
0 X
The mode in which the first valid command is transmitted to the
MLX90393 defines the operating mode (SPI or I
2
C) for all its future
commands, until a reset (hard or soft) is done.
1
0
SPI mode only
1
1
I
2
C mode only
Table 5: Communication mode definition
8.1 Command List
The MLX90393 only listens to a specific set of commands. Apart from the Reset command, all commands
generate a status byte that can be read out. The table below indicates the 10 different commands that are
(conditionally) accepted by the MLX90393. The MLX90393 will always acknowledge a command in I2C, even
if the command is not a valid command. Interpreting the associated status byte is the method for
verification of command acceptance.
Command
Command Name Symbol # CMD1 byte CMD2 byte CMD3 byte CMD4 byte
Start Burst Mode
SB
1
0001 zyxt
(1)
N/A
N/A
N/A
Start Wake-up on Change Mode
SW
2
0010 zyxt
(1)
N/A
N/A
N/A
Start Single Measurement Mode
SM
3
0011 zyxt
(1)
N/A
N/A
N/A
Read Measurement
RM
4
0100 zyxt
(1)
N/A
N/A
N/A
Read Register
RR
5
0101 0abc
(2)
{A5…A0,0,0}
N/A
N/A
Write Register
WR
6
0110 0abc
(2)
D15…D8
D7…D0
{A5…A0,0,0}
Exit Mode
EX
8
1000 0000
N/A
N/A
N/A
Memory Recall
HR
D
1101 0000
N/A
N/A
N/A
Memory Store
HS
E
1110 0000
N/A
N/A
N/A
Reset RT F 1111 0000 N/A N/A N/A
Table 6: Command List
The argument for the volatile memory access commands (RR/WR) «abc» should be set to 0x0h, in order to
get normal read-out and write of the memory.
3901090393 Data Sheet
Rev002 Page 12 Feb-2015