Hmc6352 Bearing Sensor

CIPHERSYSTEMS

New Member
Hi all

Anyone developing with the honeywell 6352 bearing compass?

I have interfaced to the chip with a I2c bus, but I am not getting the second Byte

eg

You issue the Device with a 'A"

and it is suppose to retrun 2 bytes.

I get one, not the other.

Cipth
 

Rickharris

Senior Member
Post code and circuit is possible - Are you reading the data into a single variable? if so it will only contain 1 byte you need to use a word variable to contain 2 bytes.
 

CIPHERSYSTEMS

New Member
compass i2c problem

I am at this stage,


i2cslave $42, i2cslow, i2cbyte
main:
i2cwrite ($41)
pause 10
i2cread (b1,b0)
pause 100
goto main



I am getting a reading for the first bearing byte eg 00000101 then 11111111 for the next byte. the next byte should be some sort of binary number.

have any ideas?

Thanks for the reply.

Dave
 

BeanieBots

Moderator
I had a quick scan through the datasheet. I2C is not my strong point anyway.
It would appear that there is a lot of possible "configuration" which is required prior to use. In particular, the operating mode.

Quote:"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."

Perhaps you should expressly put it into the required data mode. I saw nothing about what the "default" mode would be.
 

billacj

Member
Shouldn't you change the code to read into a word variable instead of b0 b1?

I'm interested in the chip too and have it on order.
 

inglewoodpete

Senior Member
i2c is a bytewise proocol. You receive bytes into b0, b1 and then use the combined value as a word.

Note that there are syntax errors in the code. i2cread should be readi2c etc.
 
Top