English
Language : 

HMC6352 Datasheet, PDF (7/13 Pages) Honeywell Solid State Electronics Center – Digital Compass Solution
HMC6352
Output Data Modes
The read response bytes after an “A” command, will cause the HMC6352 will return two bytes with binary formatted data.
Either heading or magnetometer data can be retrieved depending on the output data selection byte value. Negative
signed magnetometer data will be returned in two’s complement form. This output data control byte is located in RAM
register location 4E(hex) and defaults to value zero (heading) at power up.
The following is the byte format:
Bits 7 through 3 = 0
Bits 0, 1, 2 (Output Mode Value)
Bit 2
0
0
0
0
1
Bit 1
0
0
1
1
0
Bit 0
0
1
0
1
0
Description
Heading Mode
Raw Magnetometer X Mode
Raw Magnetometer Y Mode
Magnetometer X Mode
Magnetometer Y Mode
The total bit format for the Output Mode Byte is shown below:
Bit 7 (MSB)
0
Bit 6
0
Bit 5
0
Bit 4
0
Bit 3
0
Bit 2
Mode
Bit 1
Mode
Bit 0 (LSB)
Mode
Heading Mode: The heading output data will be the value in tenths of degrees from zero to 3599 and provided in binary
format over the two bytes.
Raw Magnetometer Modes: These X and Y raw magnetometer data readings are the internal sensor values measured
at the output of amplifiers A and B respectively and are 10-bit 2’s complement binary ADC counts of the analog voltages
at pins CA1 and CB1. The leading 6-bits on the MSB are zero filled or complemented for negative values. The zero count
value will be about half of the supply voltage. If measurement averaging is implemented, the most significant bits may
contain values of the summed readings.
Magnetometer Modes: These X and Y magnetometer data readings are the raw magnetometer readings plus offset and
scaling factors applied. The data format is the same as the raw magnetometer data. These compensated data values
come from the calibration routine factors plus additional offset factors provided by the set/reset routine.
User Calibration
The HMC6352 provides a user calibration routine with the “C” command permitting entry into the calibration mode and the
“E” command to exit the calibration mode. Once in calibration mode, the user is requested to rotate the compass on a flat
surface at least one full circular rotation while the HMC6352 collects several readings per second at various headings with
the emphasis on rotation smoothness to gather uniformly spaced readings. Optimally two rotations over 20 seconds
duration would provide an accurate calibration. The calibration time window is recommended to be from 6 seconds up to
3 minutes depending on the end user’s platform.
The calibration routine collects these readings to correct for hard-iron distortions of the earth’s magnetic field. These hard-
iron effects are due to magnetized materials nearby the HMC6352 part that in a fixed position with respect to the end user
platform. An example would be the magnetized chassis or engine block of a vehicle in which the compass is mounted
onto. Upon exiting the calibration mode, the resulting magnetometer offsets and scaling factors are updated
I2C Slave Address
The I2C slave address byte consists of the 7 most significant bits with the least siginificant bit zero filled. A described
earlier, the default (factory) value is 42(hex) and the legal I2C bounded values are between 10(hex) and F6(hex). This
slave address is written into EEPROM address 00(hex) and changed on the power up.
Magnetometer Offsets
The Magnetometer Offset bytes are the values stored after the completion of the last factory or user calibration routine.
Additional value changes are possible, but will be overwritten when the next calibration routine is completed. Note that
www.honeywell.com
7