C code and C++ library, driver software for Maxim Integrated DS1775, DS75 thermometer and thermostat temperature sensor. Code supports continuous or shut-down/standby, hysteresis, alarm limits, comparator or interrupt mode, fault filtering, and active low/high. Compact 5-pin SOT23 packaging
Dependents: DS1775_Digital_Thermostat_Temperature
Diff: ds1775_cpp.h
- Revision:
- 12:3ca79cd71289
- Parent:
- 10:03645de9c017
- Child:
- 14:c74a5b4d6715
--- a/ds1775_cpp.h Sun Apr 07 09:55:29 2019 +0000 +++ b/ds1775_cpp.h Sun Apr 07 11:01:21 2019 +0000 @@ -38,8 +38,8 @@ /** - * @brief Extremely small low-power temperature sensor. - * @version 1.0000.0003 + * @brief Digital thermometer, thermostat, temperature sensor. + * @version 1.0000.0000 * * @details The DS1775 is a small WLP package temperature sensor. * It supports high, low triggers stored in EEPROM for hystersis @@ -61,20 +61,17 @@ * I2C i2cBus(P3_4, P3_5); * int main() * { - * uint16_t raw; * float temperature; * DigitalOut rLED(LED1, LED_OFF); * DigitalOut gLED(LED2, LED_OFF); * DigitalOut bLED(LED3, LED_OFF); * gLED = LED_ON; * DS1775 temp_sensor(i2cBus, DS1775_I2C_SLAVE_ADR_R0); - * i2cBus.frequency(1000000); - * temp_sensor.write_reg(uint16_t(DS1775_CFG_CONV_RATE_8 | - * DS1775_CFG_RESOLUTION_12BIT), DS1775_REG_CONFIGURATION); - * wait(DS1775_WAIT_CONV_RATE_8); - * temperature = temp_sensor.read_reg_as_temperature(DS1775_REG_TEMPERATURE); - * printf("Temperature = %3.4f Celsius, %3.4f Fahrenheit\r\n", - * temperature, temp_sensor.celsius_to_fahrenheit(temperature)); + * i2cBus.frequency(400000); + * temperature = + * temp_sensor.read_reg_as_temperature(DS1775_REG_TEMPERATURE); + * printf("Temperature = %3.4f Celsius, %3.4f Fahrenheit\r\n", + * temperature, temp_sensor.celsius_to_fahrenheit(temperature)); * } * @endcode */