LM75B I²C temperature sensor with 0.125°C precision. Transition energy measurements include energy spent in the 10k pull-ups on SDA and SCL.
Configuration
- VCC: 3.6 V
- Shunt: 680 Ω
- State duration: 250 ms
- I²C: 4 kHz
Parameters
None
States
state | power |
---|---|
ACTIVE | 332 µW (0.8%) |
POWEROFF | 7 µW (8.9%) |
ACTIVE
Datasheet: The device is active and performing a temperature-to-digital conversion every 100 ms. The conversion takes about 10 ms. Afterwards, the temperature register is updated and the device becomes idle.
POWEROFF
Datasheet: The device is in powerdown mode. Temperature-to-digital conversion is halted; the I²C interface remains active.
Transitions
transition | duration | energy | rel. energy |
---|---|---|---|
getTemp | 12740 µs (0.0%) | 26016748 pJ (8.2%) | 21722720 pJ (9.9%) |
setHyst | 9140 µs (0.0%) | 22082226 pJ (9.8%) | 19001499 pJ (11.4%) |
setOS | 9140 µs (0.0%) | 21774238 pJ (9.9%) | 18693283 pJ (11.7%) |
shutdown | 6980 µs (0.0%) | 11808160 pJ (8.3%) | 11746224 pJ (3.6%) |
start | 6980 µs (0.0%) | 12445302 pJ (5.0%) | 12391462 pJ (3.0%) |
getTemp
float LM75::getTemp()
{
sendBuf[0] = 0x00;
i2c_data.sendCount = 1;
i2c_data.recvCount = 2;
sendRecv(&i2c_data);
return recvBuf[0] + (recvBuf[1] / 256.0);
}
setHyst
void LM75::setHyst(unsigned char hyst)
{
sendBuf[0] = 0x02;
sendBuf[1] = hyst;
sendBuf[2] = 0;
i2c_data.sendCount = 3;
i2c_data.recvCount = 0;
sendRecv(&i2c_data);
}
setOS
void LM75::setOS(unsigned char os)
{
sendBuf[0] = 0x03;
sendBuf[1] = os;
sendBuf[2] = 0;
i2c_data.sendCount = 3;
i2c_data.recvCount = 0;
sendRecv(&i2c_data);
}
shutdown
void LM75::shutdown()
{
sendBuf[0] = 0x01;
sendBuf[1] = 0x01;
i2c_data.sendCount = 2;
i2c_data.recvCount = 0;
sendRecv(&i2c_data);
}
start
void LM75::start()
{
sendBuf[0] = 0x01;
sendBuf[1] = 0x00;
i2c_data.sendCount = 2;
i2c_data.recvCount = 0;
sendRecv(&i2c_data);
}