beautypg.com

Revid register (0x36), Examples using the spi interface, Set the cycle count registers – PNI RM3100 Evaluation Board User Manual

Page 28: 7 examples using the spi interface, 3 revid register (0x36), 1 set the cycle count registers

background image

PNI Sensor Corporation

Doc 1017252 r02

RM3100 Evaluation Board User Manual

Page 27 of 33

Bit #

7

6

5

4

3

2

1

0

Value

0

NACK2 NACK1 NACK0

1

0

DRC1 DRC0

Where:

DRC0 – Setting this to ‘1’ means DRDY is cleared by any device register write.

Clearing occurs during reception of the register address byte for the write

transaction on either the SPI or I

2

C interface. This is the default setting.

DRC1 – Setting this to ‘1’ means DRDY is cleared by reading the Measurement

Results registers. Clearing occurs when the RM3100 Evaluation Board sends

back the first byte of data. This is the default setting.

NACK0 – This read-only bit is set to ‘1’ when writing to an undefined register.

NACK1 – This read-only bit is set to ‘1’ when writing into POLL when CMM is

in progress or when writing to CMM when POLL is in progress.

NACK2 – This read-only bit is set to ‘1’ when a read for the Measurement

Results registers is requested but data is not ready (DRDY = 0).

5.6.3 REVID Register (0x36)

The REVID register provides revision identification of the MagI2C ASIC. This is a

single byte, read-only register. To read the REVID register, send 0xB6.

5.7 Examples using the SPI Interface

5.7.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 purely for illustrative purposes and the value could be

different and/or the number of axes to be addressed could be different.

Start with SSN set HIGH, then set SSN to LOW.

Send 04

H

(this is the Write Command Byte to address the MSB for the X axis)

Send 0 (value for the MSB for the X axis)

Send 64

H

(value for the LSB for the X axis - pointer automatically increments)

Send 0 (value for the MSB for the Y axis - pointer automatically increments)

Send 64

H

(value for the LSB for the Y axis - pointer automatically increments)

Send 0 (value for the MSB for the Z axis - pointer automatically increments)

Send 64

H

(value for the LSB for the Z axis - pointer automatically increments)

Set SSN to HIGH