HMC5883
www.honeywell.com 13
Configuration Register B
The configuration register B for setting the device gain. CRB0 through CRB7 indicate bit locations, with CRB denoting the
bits that are in the configuration register. CRB7 denotes the first bit of the data stream. The number in parenthesis
indicates the default value of that bit.
CRB7
CRB6
CRB5
CRB4
CRB3
CRB2
CRB1
CRB0
GN2 (0)
GN1 (0)
GN0 (1)
(0)
(0)
(0)
(0)
(0)
Table 10: Configuration B Register
Location
Name
Description
CRB7 to CRB5
GN2 to GN0
Gain Configuration Bits. These bits configure the gain for
the device. The gain configuration is common for all
channels.
CRB4 to CRB0
0
This bit must be cleared for correct operation.
Table 11: Configuration Register B Bit Designations
The table below shows nominal gain settings.
GN2
GN1
GN0
Sensor Input Field
Range:
Gain
(counts/
Gauss)
Output Range
0
0
0
± 0.9 Ga
1280
0xF8000x07FF
(-20482047 )
0
0
1
± 1.2 Ga
1024 (default)
0xF8000x07FF
(-20482047 )
0
1
0
± 1.9 Ga
768
0xF8000x07FF
(-20482047 )
0
1
1
± 2.5 Ga
614
0xF8000x07FF
(-20482047 )
1
0
0
± 4.0 Ga
415
0xF8000x07FF
(-20482047 )
1
0
1
± 4.6 Ga
361
0xF8000x07FF
(-20482047 )
1
1
0
± 5.5 Ga
307
0xF8000x07FF
(-20482047 )
1
1
1
± 7.9 Ga
219
0xF8000x07FF
(-20482047 )
Table 12: Gain Settings
HMC5883
14 www.honeywell.com
Mode Register
The mode register is an 8-bit register from which data can be read or to which data can be written. This register is used to
select the operating mode of the device. MR0 through MR7 indicate bit locations, with MR denoting the bits that are in the
mode register. MR7 denotes the first bit of the data stream. The number in parenthesis indicates the default value of that
bit.
MR7
MR6
MR5
MR4
MR3
MR2
MR1
MR0
(0)
(0)
(0)
(0)
(0)
(0)
MD1 (0)
MD0 (1)
Table 14: Mode Register
Location
Name
Description
MR7 to
MR2
0
These bits must be cleared for correct operation.
MR1 to
MR0
MD1 to
MD0
Mode Select Bits. These bits select the operation mode of
this device.
Table 15: Mode Register Bit Designations
MD1
MD0
Mode
0
0
Continuous-Measurement Mode. In continuous-measurement mode,
the device continuously performs measurements and places the
result in the data register. RDY goes high when new data is placed
in all three registers. After a power-on or a write to the mode or
configuration register, the first measurement set is available from all
three data output registers after a period of 2/f
DO
and subsequent
measurements are available at a frequency of f
DO
, where f
DO
is the
frequency of data output.
0
1
Single-Measurement Mode (default). When single-measurement
mode is selected, device performs a single measurement, sets RDY
high and returned to sleep mode. Mode register returns to sleep
mode bit values. The measurement remains in the data output
register and RDY remains high until the data output register is read
or another measurement is performed.
1
0
Idle Mode. Device is placed in idle mode.
1
1
Sleep Mode. Device is placed in sleep mode.
Table 16: Operating Modes
HMC5883
www.honeywell.com 15
Data Output X Registers A and B
The data output X registers are two 8-bit registers, data output register A and data output register B. These registers
store the measurement result from channel X. Data output X register A contains the MSB from the measurement result,
and data output X register B contains the LSB from the measurement result. The value stored in these two registers is a
16-bit value in 2’s complement form, whose range is 0xF800 to 0x07FF. DXRA0 through DXRA7 and DXRB0 through
DXRB7 indicate bit locations, with DXRA and DXRB denoting the bits that are in the data output X registers. DXRA7 and
DXRB7 denote the first bit of the data stream. The number in parenthesis indicates the default value of that bit.
In the event the ADC reading overflows or underflows for the given channel, or if there is a math overflow during the bias
measurement, this data register will contain the value -4096 in 2’s complement form. This register value will clear when
after the next valid measurement is made.
DXRA7
DXRA6
DXRA5
DXRA4
DXRA3
DXRA2
DXRA1
DXRA0
(0)
(0)
(0)
(0)
(0)
(0)
(0)
(0)
DXRB7
DXRB6
DXRB5
DXRB4
DXRB3
DXRB2
DXRB1
DXRB0
(0)
(0)
(0)
(0)
(0)
(0)
(0)
(0)
Table 17: Data Output X Registers A and B
Data Output Y Registers A and B
The data output Y registers are two 8-bit registers, data output register A and data output register B. These registers
store the measurement result from channel Y. Data output Y register A contains the MSB from the measurement result,
and data output Y register B contains the LSB from the measurement result. The value stored in these two registers is a
16-bit value in 2’s complement form, whose range is 0xF800 to 0x07FF. DYRA0 through DYRA7 and DYRB0 through
DYRB7 indicate bit locations, with DYRA and DYRB denoting the bits that are in the data output Y registers. DYRA7 and
DYRB7 denote the first bit of the data stream. The number in parenthesis indicates the default value of that bit.
In the event the ADC reading overflows or underflows for the given channel, or if there is a math overflow during the bias
measurement, this data register will contain the value -4096 in 2’s complement form. This register value will clear when
after the next valid measurement is made.
DYRA7
DYRA6
DYRA5
DYRA4
DYRA3
DYRA2
DYRA1
DYRA0
(0)
(0)
(0)
(0)
(0)
(0)
(0)
(0)
DYRB7
DYRB6
DYRB5
DYRB4
DYRB3
DYRB2
DYRB1
DYRB0
(0)
(0)
(0)
(0)
(0)
(0)
(0)
(0)
Table 18: Data Output Y Registers A and B
Data Output Z Registers A and B
The data output Z registers are two 8-bit registers, data output register A and data output register B. These registers
store the measurement result from channel Z. Data output Z register A contains the MSB from the measurement result,
and data output Z register B contains the LSB from the measurement result. The value stored in these two registers is a
16-bit value in 2’s complement form, whose range is 0xF800 to 0x07FF. DZRA0 through DZRA7 and DZRB0 through
DZRB7 indicate bit locations, with DZRA and DZRB denoting the bits that are in the data output Z registers. DZRA7 and
DZRB7 denote the first bit of the data stream. The number in parenthesis indicates the default value of that bit.
In the event the ADC reading overflows or underflows for the given channel, or if there is a math overflow during the bias
measurement, this data register will contain the value -4096 in 2’s complement form. This register value will clear when
after the next valid measurement is made.

103040000

Mfr. #:
Manufacturer:
Seeed Studio
Description:
Magnetic Sensor Development Tools Xadow - Compass
Lifecycle:
New from this manufacturer.
Delivery:
DHL FedEx Ups TNT EMS
Payment:
T/T Paypal Visa MoneyGram Western Union

Products related to this Datasheet