8 examples using the i2c interface, 1 set the cycle count registers, Examples using the i – PNI RM3100 Sensor Suite User Manual

Page 42: C interface, Set the cycle count registers, 8 examples using the i

Advertising
background image

PNI Sensor Corporation

Doc 1017252 r03

RM3100 & RM2100 Sensor Suite User Manual

Page 41 of 45

Once the measurement sequence is completed on all desired axes, the DRDY pin

is set HIGH and the MISO pin goes low, indicating data is read. The MagI2C is

placed in Idle Mode.

When the host is ready to read the measured values, set SSN to LOW. If SSN

already is LOW, then toggle SSN from LOW to HIGH to LOW.

Assuming the X axis was one of the axes to be measured, send the MX2 Read

address, 0xA4, to begin reading the Measurement Results registers. The

measurement readings will now clock out, with the 3 bytes of X-axis data

presented first, then Y-axis data, then Z-axis data. The first nine (9) bytes

represent a complete 3-axis measurement.

Return SSN to HIGH to free up the host to communicate with other devices and

to ensure the next Command Byte sent to the MagI2C is interpreted properly.

5.8 Examples using the I

2

C Interface

5.8.1 Set the Cycle Count Registers

A sample command sequence is provided below which sets the cycle count value to 100

D

(64

H

) for all 3 axes. This is for illustrative purposes and the value could be different

and/or the number of axes to be addressed could be different. Note only the initial Cycle

Count register address needs to be sent, as the MagI2C automatically increments to the

next register.

START

MagI2C ADDRESS

RW ACK CCX1 REG. ADDRESS (N) ACK

DATA TO CCX1 REG (N)

ACK DATA TO CCX0 REG (N+1) ACK

S

0

1

0 0

0 X X

0

0

0 0

0

0 0 0

1

0

0

0 0

0

0 0 0

0

0

0

0 1

1

0 0 1

0

0

0

From Host to MagI2C

From MagI2C to Host

DATA TO CCY1 REG (N+2) ACK DATA TO CCY0 REG (N+3) ACK DATA TO CCZ1 REG (N+4) ACK DATA TO CCZ0 REG (N+5) ACK STOP

0 0

0

0 0 0 0

0

0

0

1 1 0 0 1 0

0

0

0

0 0 0 0 0

0 0

0

0 1

1

0 0 1

0 0

0

P

Advertising