hi, i'm trying to access hmc 5883l compass sensor from the at89s52 controller via i2c protocol. I'm unable to correctly collect the data. need urgent help.
So what have you tried?
Where are you stuck?
What efforts have you made to find the problem(s) and resolve it/them?
www.catb.org/.../smart-questions.html
"need urgent help"
hi, I'm new to this forum, I'm extremely sorry that my question was a bit rough. coming to the problem. i'm referring the correct device address (0x3c) as prescribed by the data sheet. i've set the device in continuous measurement mode 0x3c 0x02 0x00 then i'm reading the 6 registers for the data. in the format specified below 0x3c 0x03 0x3d read operation
0x3c 0x04 0x3d read operation
0x3c 0x05 0x3d read operation
till
0x3c 0x08 0x3d read operation.
after this i'm trying to display them by first concatenating the lsb and msb data.
How have you verified that your "concatenation" code is correct & working?
How have you verified that your display code & hardware are correct & working?
the display code is fine. the concatenation part is a algorithm which i just tried. not sure if it is correct. also is my approach towards reading the device correct??