Other Parts Discussed in Thread: CC430F6137
I have many questions from HMC5883L datasheet. This might be a question for Honeywell, but I am hoping E2E will give me a faster answer.
Below is a link to the HMC5883L datasheet.
http://dlnmh9ip6v2uc.cloudfront.net/datasheets/Sensors/Magneto/HMC5883L-FDS.pdf
Anyway, from the datasheet of HMC, I determined that the slave address is 0x1E (I don't know why they refer to it as a 7 bit address)
so when I want to configure the HMC registers, I set up the cc430 to master mode, multiple bytes TX (from the example code).
- With slave address as 0x1E, and data as 0x3C 0x00 0x70 (to configure register A, at least on the logic analyzer, I2C lines work as they should, I don't know if this is actually setting the register A in the slave.)
- again, With slave address as 0x1E, and data as 0x3C 0x01 0xA0 ( to configure register B, at least on the logic analyzer, I2C lines work as they should, I don't know if this is actually setting the register B in the slave.)
- again, With slave address as 0x1E, and data as 0x3C 0x02 0x00 ( to configure mode register, at least on the logic analyzer, I2C lines work as they should, I don't know if this is actually setting the mode register in the slave.)
Now here is where my confusion is:
The datasheet for HMC says send 0x3D 0x06 for a read operation.
So I tried the following,
1st attempt
- Setup cc430 as master TX. send <start> 0x1E( slave address:Write operation) data: 0x3D 0x06 <stop>
- Then, setup cc430 as master RX mode. send <start> 0x1E( slave read operation) 0x00 0x00 0x00 0x00 0x00 0x00 <stop> And all I get back are 6 0's.
- Setup cc430 as master TX. send <start> 0x1E( slave address:Write operation) data: 0x3D 0x06, don't send stop.
- Then, setup cc430 as master RX mode. send <start repeat> I get no response from the HMC. both my SCL and SDA are low.