Examples using the i, C interface, Set the cycle count registers – PNI RM3100 Evaluation Board User Manual

Page 31: 8 examples using the i, 1 set the cycle count registers

Advertising
background image

PNI Sensor Corporation

Doc 1017252 r02

RM3100 Evaluation Board User Manual

Page 30 of 33

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

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 RM3100 Evaluation Board automatically

increments to the next register.

START

RM3100 Eval Board

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 RM3100 E.B.

From RM3100 E.B. 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