Datasheet

HMC5883L
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. CRB default is 0x20.
CRB7
CRB6
CRB5
CRB4
CRB3
CRB2
CRB1
CRB0
GN2 (0)
GN1 (0)
GN0 (1)
(0)
(0)
(0)
(0)
(0)
Table 7: 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
These bits must be cleared for correct operation.
Table 8: Configuration Register B Bit Designations
The table below shows nominal gain settings. Use the “Gain” column to convert counts to Gauss. The Digital Resolution”
column is the theoretical value in term of milli-Gauss per count (LSb) which is the inverse of the values in the Gain
column. The effective resolution of the usable signal also depends on the noise floor of the system, i.e.
Effective Resolution = Max (Digital Resolution, Noise Floor)
Choose a lower gain value (higher GN#) when total field strength causes overflow in one of the data output registers
(saturation). Note that the very first measurement after a gain change maintains the same gain as the previous setting.
The new gain setting is effective from the second measurement and on.
GN2
GN1
GN0
Recommended
Sensor Field
Range
Gain
(LSb/
Gauss)
Digital
Resolution
(mG/LSb)
Output Range
0
0
0
± 0.88 Ga
1370
0.73
0xF8000x07FF
(-20482047 )
0
0
1
± 1.3 Ga
1090 (default)
0.92
0xF8000x07FF
(-20482047 )
0
1
0
± 1.9 Ga
820
1.22
0xF8000x07FF
(-20482047 )
0
1
1
± 2.5 Ga
660
1.52
0xF8000x07FF
(-20482047 )
1
0
0
± 4.0 Ga
440
2.27
0xF8000x07FF
(-20482047 )
1
0
1
± 4.7 Ga
390
2.56
0xF8000x07FF
(-20482047 )
1
1
0
± 5.6 Ga
330
3.03
0xF8000x07FF
(-20482047 )
1
1
1
± 8.1 Ga
230
4.35
0xF8000x07FF
(-20482047 )
Table 9: Gain Settings