Hello,
Any good reference to the protocol of the i2c bitbanged Sensor Controller Studio?
The sensor is 8 bit, the i2cTx(foo) appears to be 16 bit. Which is first, the low or high or is only 8 bit sent w/ i2cTx to the device?
For example...
The sensor has an 8 bit configuration register, and I dont know if the i2cTx is sending all 16 bits and if so, the MSByte may be overriding the LSByte.
// boot and reset the chipset
i2cStart();
i2cTx(I2C_OP_WRITE | LM298_I2C_ADDR);
i2cTx(LM298_CFG_SD); // AUTO draws 585 uAmps
i2cTx(LM298_CFG_REGISTER);
i2cStop();
Would something like this be more appropriate?
i2cStart();
i2cTx(I2C_OP_WRITE | LM298_I2C_ADDR); // this is a seven bit address on 16 bit bus
i2cTx(LM298_CFG_SD <<8); // this is simply to work around the i2c bitbang 16 bit sensor controller studio protocol
i2cTx(LM298_CFG_SD <<8); // this is the final 8 bit configuration sent to the sensor which will over ride the 1st data packet
i2cTx(LM298_CFG_REGISTER); // 8 bit register 0x00, so both MSByte and LSByte are 0x00 and it doesnt really matter which is sent first in the data packet chain.
i2cStop();
Thank you and have a great day!
Patrick