HMC6352
4
www.honeywell.com
All bus transactions begin with the master device issuing the start sequence followed by the slave address byte. The
address byte contains the slave address; the upper 7 bits (bits7-1), and the Least Significant bit (LSb). The LSb of the
address byte designates if the operation is a read (LSb=1) or a write (LSb=0). At the 9
th
clock pulse, the recieving slave
device will issue the ACK (or NACK). Following these bus events, the master will send data bytes for a write operation, or
the slave will transmit back data for a read operation. All bus transactions are terminated with the master issuing a stop
sequence.
The following timing diagram shows an example of a master commanding a HMC6352 (slave) into sleep mode by sending
the “S” command. The bottom two traces show which device is pulling the SDA line low.
I
2
C bus control can be implemented with either hardware logic or in software. Typical hardware designs will release the
SDA and SCL lines as appropriate to allow the slave device to manipulate these lines. In a software implementation, care
must be taken to perform these tasks in code.
Command Protocol
The command protocol defines the content of the data (payload) bytes of I
2
C protocol sent by the master, and the slave
device (HMC6352).
After the master device sends the 7-bit slave address, the 1-bit Read/Write, and gets the 1-bit slave device acknowledge
bit returned; the next one to three sent data bytes are defined as the input command and argument bytes. To conserve
data traffic, all response data (Reads) will be context sensitive to the last command (Write) sent. All write commands shall
have the address byte least significant bit cleared (factory default 42(hex)). These commands then follow with the ASCII
command byte and command specific binary formatted argument bytes in the general form of:
(Command ASCII Byte) (Argument Binary MS Byte) (Argument Binary LS Byte)
The slave (HMC6352) shall provide the acknowledge bits between each data byte per the I
2
C protocol. Response byte
reads are done by sending the address byte (factory default 43(hex)) with the least significant bit set, and then clocking
back one or two response bytes, last command dependant. For example, an “A” command prompts the HMC6352 to
make a sensor measurement and to route all reads for a two byte compass heading or magnetometer data response.
Then all successive reads shall clock out two response bytes after sending the slave address byte. Table 1 shows the
HMC6352 command and response data flow.
0 1 0 0 0 0 1 0START
ACK
ACK STOP0 1 0 1 0 0 1 1
SDA
SCL
M_SDA
S_SDA
0 1 0 0 0 0 1 0START
ACK
ACK STOP0 1 0 1 0 0 1 10 1 0 0 0 0 1 0START
ACK
ACK STOP0 1 0 1 0 0 1 1
SDA
SCL
M_SDA
S_SDA
42(hex)
Write to This I
2
C Address
“S”
Command
HMC6352
www.honeywell.com 5
Table 1 HMC6352 Interface Commands/Responses
Command
Byte
ASCII (hex)
Argument 1 Byte
(Binary)
Argument 2
Byte
(Binary)
Response 1
Byte
(Binary)
Response 2
Byte
(Binary)
Description
w (77)
EEPROM Address
Data
Write to EEPROM
r (72)
EEPROM Address
Data
Read from EEPROM
G (47)
RAM Address
Data
Write to RAM Register
g (67)
RAM Address
Data
Read from RAM Register
S (53)
Enter Sleep Mode (Sleep)
W (57)
Exit Sleep Mode (Wakeup)
O (4F)
Update Bridge Offsets (S/R Now)
C (43)
Enter User Calibration Mode
E (45
)
Exit User Calibration Mode
L (4C)
Save Op Mode to EEPROM
A (41) MSB Data LSB Data
Get Data. Compensate and
Calculate New Heading
Operational Controls
HMC6352 has two parameters; Operational Mode and Output Mode, which control its operation. The Operational Mode
control byte is located at RAM register byte 74(hex) and is shadowed in EEPROM location 08(hex). This byte can be used
to control the continuous measurement rate, set/reset function, and to command the HMC6352 into the three allowed
operating modes; Standby, Query, and Continuous.
The Output Mode control byte is located at RAM register byte 4E(hex) and is not shadowed in the EEPROM, and upon
power up the device is in the Heading output mode. This byte can be changed to get magnetometer data if necessary but
is typically left in a default heading data mode.
Non-Volatile Memory
The HMC6352 contains non-volatile memory capability in the form of EEPROM that retains key operational parameters
and settings for electronic compassing. Table 2 shows the balance of the EEPROM locations that the user can read and
write to. Details on the features of these location bytes will be discussed in the following paragraphs.
Table 2 HMC6352 EEPROM Contents
EE Address (hex)
Byte Description
Factory
Default
00
I
2
C Slave Address
42(hex)
01
Magnetometer X Offset MSB
factory test value
02
Magnetometer X Offset LSB
factory test value
03
Magnetometer Y Offset MSB
factory test value
04
Magnetometer Y Offset LSB
factory test value
05
Time Delay (0
25
5 ms)
01(hex)
06
Number of Summed measurements(1
16)
04(hex)
07
Software Version Number
> 01(hex)
08
Operation Mode Byte
50(hex)
Operational Modes
The HMC6352 has three operational modes plus the ability to enter/exit the non-operational (sleep) mode by command.
Sleep mode sends the internal microprocessor into clock shutdown to save power, and can be brought back by the “W”
command (wake). The “S” command returns the processor to sleep mode. The three operational modes are defined by
two bits in the internal HMC6352 Operation Mode register. If the master device sends the “L” command, the current
operational mode control byte in the RAM register is loaded into the internal EEPROM register and becomes the default
operational mode on the next power-up. The application environment of the HMC6352 will dictate the most suitable
operational mode.
HMC6352
6
www.honeywell.com
Standby Mode: (Operational Mode=0) This is the factory default mode. The HMC6352 waits for master device
commands or change in operational mode. Receiving an “A” command (get data) will make the HMC6352 perform a
measurement of sensors (magnetometers), compute the compensated magnetometer and heading data, and wait for the
next read or command. No new measurements are done until another “A” command is sent. This mode is useful to get
data on demand or at random intervals as long as the application can withstand the time delay in getting the data.
Query Mode: (Operational Mode=1) In this mode the internal processor waits for “A” commands (get data), makes the
measurements and computations, and waits for the next read command to output the data. After each read command, the
HMC6352 automatically performs another get data routine and updates the data registers. This mode is designed to get
data on demand without repeating “A” commands, and with the master device controlling the timing and data throughput.
The tradeoff in this mode is the previous query latency for the advantage of an immediate read of data.
The above two modes are the most power conserving readout modes.
Continuous Mode: (Operational Mode=2) The HMC6352 performs continuous sensor measurements and data
computations at selectable rates of 1Hz, 5Hz, 10Hz, or 20Hz, and updates the output data bytes. Subsequent “A”
commands are un-necessary unless re-synchronization to the command is desired. Data reads automatically get the most
recent updates. This mode is useful for data demanding applications.
The continuous mode measurement rate is selected by two bits in the operational mode selection byte, along with the
mode selection and the periodic Set/Reset bit. The periodic Set/Reset function performs a re-alignment of the sensors
magnetic domains in case of sensor perming (magnetic upset event), operating temperature shifts, and normal thermal
agitation of the domains. Exposure of the HMC6352 to magnetic fields above 20 gauss (disturbing field threshold) leads to
possible measurement inaccuracy or “stuck” sensor readings until the set/reset function is performed. With the periodic
Set/Reset bit set, the set/reset function occurs every few minutes.
Operational Mode Control Byte Syntax
As described above, the HMC6352 operation mode, measurement rate, and periodic set/reset are selected and stored
both in a processor RAM register and in EEPROM. Upon power-up the EEPROM will transfer the saved operational mode
control byte into register address 74(hex). The following is the byte format:
Bit 7 =0
Bits 6 and 5 (Continuous Mode Measurement Rate)
Bit 6
Bit 5
Description
0
0
1 Hz Measurement Rate
0
1
5 Hz Measurem
ent Rate
1
0
10 Hz Measurement Rate
1
1
20 Hz Measurement Rate
Bit 4 (Periodic Set/Reset), 0 = Off, 1 = On
Bit 3 = 0
Bit 2 = 0
Bits 1 and 0 (Operational Mode Value)
Bit 1
Bit 0
Description
0
0
Standby Mode
0
1
Query Mode
1
0
Continuous Mode
1
1
Not Allowed
The total bit format for the Operational Mode Byte is shown below:
Bit 7 (MSB)
Bit 6
Bit 5
Bit 4
Bit 3
Bit 2
Bit 1
Bit 0 (LSB)
0
M. Rate_H
M. Rate_L
Per. S/R
0
0
Op Mode_H
Op Mode_L

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