Jheissjr has a good AVR – digital compass project…
I found that there was no example code anywhere on the internet for interfacing an AVR to the HMC6352 so I thought I would post mine for people in the same position. The code is based off the Atmel App. note AVR315. Simply hook up the SDA and SCL lines from the ATmega to the HMC6352 along with a 5k to 10k pull up on each line.
AVR based digital compass – Link.
ADVERTISEMENT