HMC6352 Compass with I2C interface
Posted: Mon Jul 26, 2010 6:40 pm
HMC6352 Compass with I2C interface
Lost your direction? Why not try out the Honeywell HMC6352 Compass Module?
You can buy the HMC6352 ready mounted on a Sparkfun breakout board, all you have to do is solder on header pins or wires and connect the usual I2C pullup resistors (Pin outs are the same as the blinkM in my previous post)
The module returns the heading in tenths of a degree, 0 to 3599 in two bytes.
See data sheet for full details:
http://www.magneticsensors.com/datasheets/HMC6352.pdf
The programme is as simple as possible and is intended as a beginners starting point:
Main sets up the LCD on PORT A, the I2C interface and sets the address variables of the HMC6352 .
Then a loop is started to read the heading , combine the two bytes and then display the formatted result on the LCD display.
Lost your direction? Why not try out the Honeywell HMC6352 Compass Module?
You can buy the HMC6352 ready mounted on a Sparkfun breakout board, all you have to do is solder on header pins or wires and connect the usual I2C pullup resistors (Pin outs are the same as the blinkM in my previous post)
The module returns the heading in tenths of a degree, 0 to 3599 in two bytes.
See data sheet for full details:
http://www.magneticsensors.com/datasheets/HMC6352.pdf
The programme is as simple as possible and is intended as a beginners starting point:
Main sets up the LCD on PORT A, the I2C interface and sets the address variables of the HMC6352 .
Then a loop is started to read the heading , combine the two bytes and then display the formatted result on the LCD display.