Content originally posted in LPCWare by german on Wed Apr 07 08:57:10 MST 2010
Dear Member,
I'm trying to read a LM75 temperature I2C sensor. (I2C max frecuency --> 100KHZ) interconnected to a LPC1111/101.
I used the internal oscilator (12 MHz) therefore a 12 MHz I2C_PCLK is set.
I used the register values from UM page130 (Table 145. I2SCLL + I2SCLH values for selected I2C clock values) to set a I2C bit frecuency of 100 KHz.
I2SCLL =120; //it's 120 decimal o hex value?
I2SCLH =120; //it's 120 decimal o hex value?
Are these configuration values correct?
Could i use directly the example i2ctest.c to read the temperature with this changes?
I2CWriteLength = 1;
I2CReadLength = 2;
I2CMasterBuffer[0] = LM75_ADDR | RD_BIT;
I2CEngine();
Finally, where's the readed temperature values?
Thanks in advance.