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.h
- Revision:
- 9:315236fb3c6a
- Parent:
- 8:b2d4c71268aa
- Child:
- 10:03645de9c017
--- a/ds1775.h Sun Apr 07 07:43:11 2019 +0000 +++ b/ds1775.h Sun Apr 07 08:59:48 2019 +0000 @@ -45,36 +45,35 @@ #define DS1775_REG_TOS_HIGH_TRIP 0X03 #define DS1775_REG_MAX 0X03 -#define DS1775_CFG_ONE_SHOT_START (1) /* Start one-shot measurement */ -#define DS1775_CFG_CONV_RATE_0_25 (0x00 << 1) /* 0.25 conversions/sec */ -#define DS1775_CFG_CONV_RATE_1 (0x01 << 1) /* 1.0 conversions/sec */ -#define DS1775_CFG_CONV_RATE_4 (0x02 << 1) /* 4.0 conversions/sec */ -#define DS1775_CFG_CONV_RATE_8 (0x03 << 1) /* 8.0 conversions/sec */ #define DS1775_WAIT_CONV_TIME_9BIT (0.1875) #define DS1775_WAIT_CONV_TIME_10BIT (0.375) #define DS1775_WAIT_CONV_TIME_11BIT (0.750) -#define DS1775_WAIT_CONV_TIME_12BIR (1.5) +#define DS1775_WAIT_CONV_TIME_12BIT (1.5) + +#define DS1775_CFG_CONTINUOUS (0X00 << 0) +#define DS1775_CFG_SHUTDOWN (0X01 << 0) + +#define DS1775_CFG_COMPARATOR_MODE (0X00 << 1) +#define DS1775_CFG_INTERRUPT_MODE (0X01 << 1) + +#define DS1775_CFG_OS_POLARITY_ACT_LOW (0x00 << 2) +#define DS1775_CFG_OS_POLARITY_ACT_HIGH (0x01 << 2) + +#define DS1775_CFG_FAULT_FILTER_1 (0x00 << 3) +#define DS1775_CFG_FAULT_FILTER_2 (0x01 << 3) +#define DS1775_CFG_FAULT_FILTER_4 (0x02 << 3) +#define DS1775_CFG_FAULT_FILTER_6 (0x03 << 3) #define DS1775_CFG_RESOLUTION_9BIT (0x00 << 5) #define DS1775_CFG_RESOLUTION_10BIT (0x01 << 5) #define DS1775_CFG_RESOLUTION_11BIT (0x02 << 5) #define DS1775_CFG_RESOLUTION_12BIT (0x03 << 5) -#define DS1775_CFG_NORMAL_FORMAT (0X00 << 7) -#define DS1775_CFG_EXTENDED_FORMAT (0X01 << 7) - -#define DS1775_CFG_CONTINUOUS (0X00 << 8) -#define DS1775_CFG_SHUTDOWN (0X01 << 8) - -#define DS1775_CFG_COMPARATOR_MODE (0X00 << 9) -#define DS1775_CFG_INTERRUPT_MODE (0X01 << 9) -#define DS1775_CFG_FAULT_FILTER_1 (0x00 << 11) -#define DS1775_CFG_FAULT_FILTER_2 (0x01 << 11) -#define DS1775_CFG_FAULT_FILTER_4 (0x02 << 11) -#define DS1775_CFG_FAULT_FILTER_6 (0x03 << 11) + + #define DS1775_CFG_OVER_TEMP_MASK (0x80)