![]() |
EVE 1.0
|
![]() |
Data Structures | |
struct | temp_sensor_t |
Functions called from application programs | |
bool | TempSensorInit (const struct temp_sensor_t *TempSensor) |
Name: TempSensorInit Initializes the I2C-based temperature sensor for continously convertion. I2C address range is 0x18 - 0x1f. Max baudrate is 400 kbit/s. Higest resolution is selected (1/16°C). Temperature convertion time is typical 250ms. Temperature measurement range is from -40°C to +125°C. Typical current consumption is 200µA. More... | |
bool | TempSensorDisable (const struct temp_sensor_t *TempSensor) |
Name: TempSensorDisable Disables and powers down the I2C-based temperature sensor. Typical current consumption is 0.1µA in power down mode. More... | |
bool | TempSensorGet (const struct temp_sensor_t *TempSensor, int8_t *Value) |
Name: TempSensorGet Reads temperature value from temperature sensor. Resolution 1.0°C. More... | |
bool | TempSensorHighResGet (const struct temp_sensor_t *TempSensor, int16_t *Value) |
Name: TempSensorHighResGet Reads temperature value from temperature sensor. Resolution 0.1°C. More... | |
This driver supports the I2C-based temperature sensor type Microchip MCP9808. The temperature sensor accuracy is typical ±0.25°C from -40°C to +125°C (max ±0.5°C from -20°C to +100°C, max ±1°C from -40°C to +125°C). The temperature sensor resolution is selectable from 1/16°C to 0.5°C. The highest sensor resolution is selected. Temperature convertion time is typical 250ms. Temperature measurement range is from -40°C to +125°C.
The temperature sensor has 3 address lines. The I2C address range is 0x18 - 0x1f. Max baudrate is 400 kbit/s. Typical current consumption is 200µA in active mode and 0.1µA in power down mode.
Both initialization and disabling of the sensor, and reading of temperature at 0.1°C or 1.0°C resolution are supported.
The selected I2C port must be initialized before using the driver.
bool TempSensorInit | ( | const struct temp_sensor_t * | TempSensor | ) |
Name: TempSensorInit
Initializes the I2C-based temperature sensor for continously convertion. I2C address range is 0x18 - 0x1f. Max baudrate is 400 kbit/s. Higest resolution is selected (1/16°C). Temperature convertion time is typical 250ms. Temperature measurement range is from -40°C to +125°C. Typical current consumption is 200µA.
TempSensor | Parameters for the temperature sensor to be used |
bool TempSensorDisable | ( | const struct temp_sensor_t * | TempSensor | ) |
Name: TempSensorDisable
Disables and powers down the I2C-based temperature sensor. Typical current consumption is 0.1µA in power down mode.
TempSensor | Parameters for the temperature sensor to be used |
bool TempSensorGet | ( | const struct temp_sensor_t * | TempSensor, |
int8_t * | Value | ||
) |
Name: TempSensorGet
Reads temperature value from temperature sensor. Resolution 1.0°C.
TempSensor | Parameters for the temperature sensor to be used |
Value | Pointer to where to put the temperature value (int8_t) |
bool TempSensorHighResGet | ( | const struct temp_sensor_t * | TempSensor, |
int16_t * | Value | ||
) |
Name: TempSensorHighResGet
Reads temperature value from temperature sensor. Resolution 0.1°C.
TempSensor | Parameters for the temperature sensor to be used |
Value | Pointer to where to put the temperature value (int16_t) |