HMC6352 Compass interface

I have the Sparkfun HMC6352 breakout board and the MSP430f160 board.

The I2C generates commands and I get acknowledge bits. But, the data bus is high (open) when I clock data.

I have tried different command sequences with the same result.

I assume that the command sequence is still wrong. Anybody have experience with this device?

I am having the same exact problem I think… I use to get an ACK from from the compass when the slave address was sent. I have this logicport view to see the signal happening. For some reason now I am not getting the ACK back but I do get the start bit and the slave address being sent. But it just wont send any other data on the line with what ever I try. You figure anything out yet???

Thanks for the response.

No success yet. I have the compass at the end of a long cable. I don’t see any reflections on the line but that could be a contributor. I will shorten it.

I have tried all of the operating modes with and without the A command. There has to be something obvious that is missing.

I will keep trying and post the results. Keep me informed on your progress.

Tom

For some reason it didn’t post my last comment. Don’t feel like saying that all again but I think the slave address for the compass is actually 21(hex) for MSP users. I would love to talk about the compass and the MSP… I am using it for a project for school and really need to get it fully functioning. My email is travis.majors@colorado.edu. I have been able to talk to the compass and read ROM and EE. Just haven’t figured out how to get compass readings yet for some reason. :-/

Finally got the compass to send back degree data. Put a little digital filtering on it and divided it by 10 to give the range of 0-359. Everything seems to be working smoothly. The key was using 21(hex) as a slave address and setting your transmit or receive bit correctly.

Thanks -

I worked with my system for a couple of hours yesterday. Everything works except the read command. I get a no acknowledge to a 043h. The two data bytes have acknowledge bits but the data is FF.

So, are you saying that I use 021h for the read command?

Thanks,

Tom

Ya use 21h for the read command and change I2CTCTL &= ~I2CTRX; (makes I2CTRX=0). This will put the MSP in receive mode.

I bit bang the I2C with assembly code. So rcv mode is not a problem.

Changing the address to 0x21 worked for me. Data sheet says 0x42, but 0x21 works.