User Manual

HMC5883
www.honeywell.com 11
REGISTERS
This device is controlled and configured via a number of on-chip registers, which are described in this section. In the
following descriptions, set implies a logic 1, and reset or clear implies a logic 0, unless stated otherwise.
Register List
The table below lists the registers and their access. All address locations are 8 bits.
Address Location
Name
Access
00
Configuration Register A
Read/Write
01
Configuration Register B
Read/Write
02
Mode Register
Read/Write
03
Data Output X MSB Register
Read
04
Data Output X LSB Register
Read
05
Data Output Z MSB Register
Read
06
Data Output Z LSB Register
Read
07
Data Output Y MSB Register
Read
08
Data Output Y LSB Register
Read
09
Status Register
Read
10
Identification Register A
Read
11
Identification Register B
Read
12
Identification Register C
Read
Table 5: Register List
Register Access
This section describes the process of reading from and writing to this device. The devices uses an address pointer to
indicate which register location is to be read from or written to. These pointer locations are sent from the master to this
slave device and succeed the 7-bit address plus 1 bit read/write identifier.
To minimize the communication between the master and this device, the address pointer updated automatically without
master intervention. This automatic address pointer update has two additional features. First when address 12 or higher
is accessed the pointer updates to address 00 and secondly when address 09 is reached, the pointer rolls back to
address 03. Logically, the address pointer operation functions as shown below.
If (address pointer = 09) then address pointer = 03
Else if (address pointer >= 12) then address pointer = 0
Else (address pointer) = (address pointer) + 1
The address pointer value itself cannot be read via the I
2
C bus.
Any attempt to read an invalid address location returns 0’s, and any write to an invalid address location or an undefined bit
within a valid address location is ignored by this device.
To move the address pointer to a random register location, first issue a “write” to that register location with no data byte
following the commend. For example, to move the address pointer to register 10, send 0x3C 0x0A.