Drivber for Ti's TMP007 Infrared Thermopile Sensor with Integrated Math Engine
include/TMP007_Defs.h@1:93710a3abf0a, 2016-06-05 (annotated)
- Committer:
- messi1
- Date:
- Sun Jun 05 19:53:43 2016 +0000
- Revision:
- 1:93710a3abf0a
Add TMP007_Defs.h file
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
messi1 | 1:93710a3abf0a | 1 | #ifndef TMP007_DEFS_H |
messi1 | 1:93710a3abf0a | 2 | #define TMP007_DEFS_H |
messi1 | 1:93710a3abf0a | 3 | |
messi1 | 1:93710a3abf0a | 4 | // Constants for calculating object temperature |
messi1 | 1:93710a3abf0a | 5 | #define TMP007_B0 -0.0000294 |
messi1 | 1:93710a3abf0a | 6 | #define TMP007_B1 -0.00000057 |
messi1 | 1:93710a3abf0a | 7 | #define TMP007_B2 0.00000000463 |
messi1 | 1:93710a3abf0a | 8 | #define TMP007_C2 13.4 |
messi1 | 1:93710a3abf0a | 9 | #define TMP007_TREF 298.15 |
messi1 | 1:93710a3abf0a | 10 | #define TMP007_A2 -0.00001678 |
messi1 | 1:93710a3abf0a | 11 | #define TMP007_A1 0.00175 |
messi1 | 1:93710a3abf0a | 12 | #define TMP007_S0 6.4 // * 10^-14 |
messi1 | 1:93710a3abf0a | 13 | |
messi1 | 1:93710a3abf0a | 14 | // Configuration Settings |
messi1 | 1:93710a3abf0a | 15 | #define TMP007_CFG_RESET 0x8000 |
messi1 | 1:93710a3abf0a | 16 | #define TMP007_CFG_MODEON 0x1000 |
messi1 | 1:93710a3abf0a | 17 | #define TMP007_CFG_1SAMPLE 0x0000 |
messi1 | 1:93710a3abf0a | 18 | #define TMP007_CFG_2SAMPLE 0x0200 |
messi1 | 1:93710a3abf0a | 19 | #define TMP007_CFG_4SAMPLE 0x0400 |
messi1 | 1:93710a3abf0a | 20 | #define TMP007_CFG_8SAMPLE 0x0600 |
messi1 | 1:93710a3abf0a | 21 | #define TMP007_CFG_16SAMPLE 0x0800 |
messi1 | 1:93710a3abf0a | 22 | #define TMP007_CFG_1SAMPLE_LPWR 0x0a00 |
messi1 | 1:93710a3abf0a | 23 | #define TMP007_CFG_2SAMPLE_LPWR 0x0c00 |
messi1 | 1:93710a3abf0a | 24 | #define TMP007_CFG_4SAMPLE_LPWR 0x0e00 |
messi1 | 1:93710a3abf0a | 25 | #define TMP007_CFG_ALRTEN 0x0100 |
messi1 | 1:93710a3abf0a | 26 | #define TMP007_CFG_ALLRTF 0x0080 |
messi1 | 1:93710a3abf0a | 27 | #define TMP007_CFG_TC 0x0040 |
messi1 | 1:93710a3abf0a | 28 | #define TMP007_CFG_INT_COMP 0x0020 |
messi1 | 1:93710a3abf0a | 29 | |
messi1 | 1:93710a3abf0a | 30 | // Status Mask |
messi1 | 1:93710a3abf0a | 31 | #define TMP007_ALRTEN 0x8000 |
messi1 | 1:93710a3abf0a | 32 | #define TMP007_CRTEN 0x4000 |
messi1 | 1:93710a3abf0a | 33 | #define TMP007_OHEN 0x2000 |
messi1 | 1:93710a3abf0a | 34 | #define TMP007_OLEN 0x1000 |
messi1 | 1:93710a3abf0a | 35 | #define TMP007_LHEN 0x0800 |
messi1 | 1:93710a3abf0a | 36 | #define TMP007_LLEN 0x0400 |
messi1 | 1:93710a3abf0a | 37 | #define TMP007_DVEN 0x0200 |
messi1 | 1:93710a3abf0a | 38 | #define TMP007_MEM_C_EN 0x0100 |
messi1 | 1:93710a3abf0a | 39 | |
messi1 | 1:93710a3abf0a | 40 | // Registers to read thermopile voltage and sensor temperature |
messi1 | 1:93710a3abf0a | 41 | #define TMP007_SENSOR_VOLT 0x00 //RO |
messi1 | 1:93710a3abf0a | 42 | #define TMP007_LOCAL_TEMP 0x01 //RO |
messi1 | 1:93710a3abf0a | 43 | #define TMP007_CONFIG 0x02 //RW |
messi1 | 1:93710a3abf0a | 44 | #define TMP007_OBJECT_TEMP 0x03 //RO |
messi1 | 1:93710a3abf0a | 45 | #define TMP007_STATUS 0x04 //RO |
messi1 | 1:93710a3abf0a | 46 | #define TMP007_STATUS_MASK 0x05 //RW |
messi1 | 1:93710a3abf0a | 47 | |
messi1 | 1:93710a3abf0a | 48 | #define TMP007_OBJECT_TEMP_HI_LIM 0x06 //RW |
messi1 | 1:93710a3abf0a | 49 | #define TMP007_OBJECT_TEMP_LO_LIM 0x07 //RW |
messi1 | 1:93710a3abf0a | 50 | #define TMP007_LOCAL_TEMP_HI_LIM 0x08 //RW |
messi1 | 1:93710a3abf0a | 51 | #define TMP007_LOCAL_TEMP_LO_LIM 0x09 //RW |
messi1 | 1:93710a3abf0a | 52 | |
messi1 | 1:93710a3abf0a | 53 | #define TMP007_COEFFICIENT_S0 0x0a //RW |
messi1 | 1:93710a3abf0a | 54 | #define TMP007_COEFFICIENT_A1 0x0b //RW |
messi1 | 1:93710a3abf0a | 55 | #define TMP007_COEFFICIENT_A2 0x0c //RW |
messi1 | 1:93710a3abf0a | 56 | #define TMP007_COEFFICIENT_B0 0x0d //RW |
messi1 | 1:93710a3abf0a | 57 | #define TMP007_COEFFICIENT_B1 0x0e //RW |
messi1 | 1:93710a3abf0a | 58 | #define TMP007_COEFFICIENT_B2 0x0f //RW |
messi1 | 1:93710a3abf0a | 59 | #define TMP007_COEFFICIENT_C2 0x10 //RW |
messi1 | 1:93710a3abf0a | 60 | #define TMP007_COEFFICIENT_TC0 0x11 //RW |
messi1 | 1:93710a3abf0a | 61 | #define TMP007_COEFFICIENT_TC1 0x12 //RW |
messi1 | 1:93710a3abf0a | 62 | |
messi1 | 1:93710a3abf0a | 63 | #define TMP007_MANUFACTURE_ID 0x1E //RO |
messi1 | 1:93710a3abf0a | 64 | #define TMP007_DEVICE_ID 0x1F //RO |
messi1 | 1:93710a3abf0a | 65 | #define TMP007_MEM_ACCESS 0x2A //RW |
messi1 | 1:93710a3abf0a | 66 | |
messi1 | 1:93710a3abf0a | 67 | #endif // TMP007_DEFS_H |