MAX31850, DS18B20, DS2450, thermocouple
DS2450.h@0:5d39f2521173, 2015-03-09 (annotated)
- Committer:
- fblanc
- Date:
- Mon Mar 09 11:55:54 2015 +0000
- Revision:
- 0:5d39f2521173
MAX31850
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
fblanc | 0:5d39f2521173 | 1 | /* DS2450 specific values (see datasheet www.maxim-ic.com/datasheet/index.mvp/id/2921) */ |
fblanc | 0:5d39f2521173 | 2 | #ifndef _DS2450_ |
fblanc | 0:5d39f2521173 | 3 | #define _DS2450_ |
fblanc | 0:5d39f2521173 | 4 | #define DS2450_ID 0x20 |
fblanc | 0:5d39f2521173 | 5 | #define DS2450_READ_MEMORY 0xAA |
fblanc | 0:5d39f2521173 | 6 | #define DS2450_WRITE_MEMORY 0x55 |
fblanc | 0:5d39f2521173 | 7 | #define DS2450_CONVERT 0x3C |
fblanc | 0:5d39f2521173 | 8 | |
fblanc | 0:5d39f2521173 | 9 | #define DS2450_SP_SIZE 13 |
fblanc | 0:5d39f2521173 | 10 | #define DS2450_PAGE0 0x00 |
fblanc | 0:5d39f2521173 | 11 | #define DS2450_PAGE1 0x08 |
fblanc | 0:5d39f2521173 | 12 | #define DS2450_PAGE2 0x10 |
fblanc | 0:5d39f2521173 | 13 | #define DS2450_PAGE3 0x18 |
fblanc | 0:5d39f2521173 | 14 | |
fblanc | 0:5d39f2521173 | 15 | #define DS2450_ADCA 0x00 //channel A |
fblanc | 0:5d39f2521173 | 16 | #define DS2450_ADCB 0x02 //channel B |
fblanc | 0:5d39f2521173 | 17 | #define DS2450_ADCC 0x04 //channel C |
fblanc | 0:5d39f2521173 | 18 | #define DS2450_ADCD 0x06 //channel D |
fblanc | 0:5d39f2521173 | 19 | |
fblanc | 0:5d39f2521173 | 20 | #define DS2450_IR_2V5 0x00 //input voltage range 2.55V |
fblanc | 0:5d39f2521173 | 21 | #define DS2450_IR_5V1 0x01 //input voltage range 5.1V |
fblanc | 0:5d39f2521173 | 22 | #define DS2450_AFH 0x20 //flag alarm value higher |
fblanc | 0:5d39f2521173 | 23 | #define DS2450_AFL 0x10 //flag alarm value lower |
fblanc | 0:5d39f2521173 | 24 | #define DS2450_AEH_ENABLE 0x08 //alarm value higher enable |
fblanc | 0:5d39f2521173 | 25 | #define DS2450_AEL_ENABLE 0x04 //alarm value lower enable |
fblanc | 0:5d39f2521173 | 26 | |
fblanc | 0:5d39f2521173 | 27 | #define DS2450_DISABLE_OUT 0x00 //disable ouput |
fblanc | 0:5d39f2521173 | 28 | #define DS2450_ENABLE_OUT 0x80//enable ouput |
fblanc | 0:5d39f2521173 | 29 | |
fblanc | 0:5d39f2521173 | 30 | #define DS2450_16_BIT 0x00 //ADC 16bits enable ouput |
fblanc | 0:5d39f2521173 | 31 | #define DS2450_15_BIT 0x0F //ADC 15bits enable ouput |
fblanc | 0:5d39f2521173 | 32 | #define DS2450_12_BIT 0x0C //ADC 12bits enable ouput |
fblanc | 0:5d39f2521173 | 33 | #define DS2450_8_BIT 0x08 //ADC 8bits enable ouput |
fblanc | 0:5d39f2521173 | 34 | #define DS2450_1_BIT 0x01 //ADC 1bits enable ouput |
fblanc | 0:5d39f2521173 | 35 | uint8_t DS2450_read_page(uint8_t id[], uint8_t adresse, uint8_t *val); |
fblanc | 0:5d39f2521173 | 36 | uint8_t DS2450_read_page(uint8_t n,uint8_t id[], uint8_t adresse, uint8_t *val); |
fblanc | 0:5d39f2521173 | 37 | uint8_t DS2450_convert(uint8_t id[], uint8_t input_select_mask,uint8_t read_out_control); |
fblanc | 0:5d39f2521173 | 38 | uint8_t DS2450_convert(uint8_t n,uint8_t id[], uint8_t input_select_mask,uint8_t read_out_control); |
fblanc | 0:5d39f2521173 | 39 | uint8_t DS2450_read_ADC(uint8_t id[], uint16_t adc[]); |
fblanc | 0:5d39f2521173 | 40 | uint8_t DS2450_read_ADC(uint8_t n,uint8_t id[], uint16_t adc[]); |
fblanc | 0:5d39f2521173 | 41 | uint8_t DS2450_start_and_read_ADC(uint8_t id[], uint16_t adc[]); |
fblanc | 0:5d39f2521173 | 42 | uint8_t DS2450_start_and_read_ADC(uint8_t n,uint8_t id[], uint16_t adc[]); |
fblanc | 0:5d39f2521173 | 43 | uint8_t DS2450_configure_channel_ADC(uint8_t id[],uint8_t channel,uint8_t conflsb,uint8_t confmsb); |
fblanc | 0:5d39f2521173 | 44 | uint8_t DS2450_configure_channel_ADC(uint8_t n,uint8_t id[],uint8_t channel,uint8_t conflsb,uint8_t confmsb); |
fblanc | 0:5d39f2521173 | 45 | uint8_t DS2450_configure_page(uint8_t id[], uint8_t adresse,uint8_t configpage[]); |
fblanc | 0:5d39f2521173 | 46 | uint8_t DS2450_configure_page(uint8_t n,uint8_t id[], uint8_t adresse,uint8_t configpage[]); |
fblanc | 0:5d39f2521173 | 47 | #endif |