HMC6352
www.honeywell.com 7
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
Bit 1
Bit 0
Description
0
0
0
Heading Mode
0
0
1
Raw Magnetometer X Mode
0
1
0
Raw Magnetometer Y Mode
0
1
1
Magnetometer X Mode
1
0
0
Magnetometer Y Mode
The total bit format for the Output Mode Byte is shown below:
Bit 7 (MSB)
Bit 6
Bit 5
Bit 4
Bit 3
Bit 2
Bit 1
Bit 0 (LSB)
0
0
0
0
0
Mode
Mode
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
I
2
C Slave Address
The I
2
C 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 I
2
C 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
HMC6352
8
www.honeywell.com
these offset values are added to the sensor offset values computed by the set/reset routine to convert the raw
magnetometer data to the compensated magnetometer data. These values are written into EEPROM addresses 01(hex)
to 04 (hex) and loaded to RAM on the power up. These offsets are in ADC counts applied to the 10-bit ADC raw
magnetometer data. Most offset MSB values will likely be zero filled or complemented.
Time Delay
The EEPROM time delay byte is the binary value of the number of milliseconds from the time a measurement request was
commanded and the time the actual measurements are made. The default value is 01(hex) for no delay. Extra
measurement delays maybe desired to allow for amplifier stabilization from immediate HMC6352 power-up or for external
filter capacitor selection that limits the bandwidth and time response of the amplifier stages. This value is written into
EEPROM address 05(hex) and loaded to RAM on the power up.
Measurement Summing
This EEPROM summed measurement byte permits designers/users to back average or data smooth the output data
(heading, magnetometer values) to reduce the amount of jitter in the data presentation. The default value is 04(hex) which
is four measurements summed. A value of 00(hex) would be no summing. Up to 16 sets of magnetometer data may be
selected for averaging. This slave address is written into EEPROM address 06(hex) and loaded to RAM on the power up.
Software Version
This EEPROM software version number byte contains the binary value of the programmed software. Values of 01(hex)
and beyond are considered production software.
Timing Requirements
Table 3 contains the time delays required by HMC6352 upon receipt of the command to either perform the commanded
task or to have the response available on the I
2
C bus.
Table 3 Interface Command Delays
Command Byte
ASCII (hex)
Description Time Delay (µsec)
w (77)
Write to EEPROM
70
r (72)
Read from EEPROM
70
G (47)
Write to RAM Register
70
g (67)
Read from RAM Register
70
S (53)
Enter Sleep Mode (Sleep)
10
W (57)
Exit Sleep Mode (Wakeup)
100
O (4F)
Update Bridge Offsets (S/R Now)
6000
C (43)
En
ter User Calibration Mode
10
E (45)
Exit User Calibration Mode
14000
L (4C)
Save Op Mode to EEPROM
125
A (41)
Get Data. Compensate and Calculate New Heading
6000
Command and Operation Mode Interactions
All commands are accepted in the standby mode. Honeywell strongly recommends using this mode during the initial setup
stage. Setting up of the HMC6352 operation mode and its slave address are typical set up examples. Although execution
of all commands in the Query and Continuous Modes is acceptable, the completion outcome is not guaranteed.
Q: How to Read Data from HMC6352?
A: In Standby Mode - Use “A” command.
In Query Mode - Send 43(hex) slave address to read data and clock out the two register data bytes for heading.
An initial “A” command is needed to update the heading after each read.
HMC6352
www.honeywell.com 9
In Continuous Mode - Send 43(hex) slave address to read data and clock out the register data bytes for heading.
The “A” command is not allowed or required.
Waveform Examples
Example 1: This example shows how to read a single byte from the HMC6352. The Slave (HMC6352) continues to hold
the SDA line low after the acknowledge (ACK) bit because the first bit of the data byte is a zero. Remember that the data
read is last command sensitive.
Example 2: This example shows how to read two bytes from the HMC6352 (slave). The slave continues to hold the SDA
line low after the acknowledge bit because the first bit of the data bytes is zero.
Example 3: This example shows how to command HMC6352 to read a RAM register by sending the “g” command and
the register address 7F(hex). Note that this example does not show the process of reading the answer. See example 1
for reading a byte.
Example 4: This example shows how to write to a RAM register in the HMC6352 by sending the “G” command, the
register address 7F(hex), and the data byte 55(hex) to the HMC6352 slave.
SDA
SCL
M_SDA
S_SDA
SDA
SCL
M_SDA
S_SDA
SDA
SCL
M_SDA
S_SDA
43(hex)
Read From This I2C Address
55(hex)
Data
SDA
SCL
M_SDA
S_SDA
SDA
SCL
M_SDA
S_SDA
SDA
SCL
M_SDA
S_SDA
43(hex)
Read From This I2C Address
55(hex)
Data
00(hex)
Data
SDA
SCL
M_SDA
S_SDA
SDA
SCL
M_SDA
S_SDA
SDA
SCL
M_SDA
S_SDA
42(hex)
Write to This I2C Address
“g”
Command
7F(hex)
Register 7F
SDA
SCL
M_SDA
S_SDA
SDA
SCL
M_SDA
S_SDA
SDA
SCL
M_SDA
S_SDA
42(hex)
Write to This I2C Address
“G”
Command
7F(hex)
Register 7F
55(hex)
Data

HMC6352-EVAL

Mfr. #:
Manufacturer:
Description:
EVALUATION BOARD FOR HMC6352
Lifecycle:
New from this manufacturer.
Delivery:
DHL FedEx Ups TNT EMS
Payment:
T/T Paypal Visa MoneyGram Western Union

Products related to this Datasheet