test MAX31850

Dependencies:   OneWireFB mbed

Committer:
fblanc
Date:
Mon Jun 02 13:17:18 2014 +0000
Revision:
3:b4277f7c538e
Parent:
0:55f2866e9c0c
ok tk.ini

Who changed what in which revision?

UserRevisionLine numberNew contents of line
fblanc 0:55f2866e9c0c 1 /* DS2450 specific values (see datasheet http://www.maximintegrated.com/datasheet/index.mvp/id/7953) */
fblanc 0:55f2866e9c0c 2 #ifndef __MAX31850_H__
fblanc 0:55f2866e9c0c 3 #define __MAX31850_H__
fblanc 0:55f2866e9c0c 4 #define MAX31850_ID 0x3B
fblanc 0:55f2866e9c0c 5 #define MAX31850_SP_SIZE 9
fblanc 0:55f2866e9c0c 6
fblanc 0:55f2866e9c0c 7 #define MAX31850_CONVERT_T 0x44 // 0x44
fblanc 0:55f2866e9c0c 8 #define MAX31850_READ_POWER_SUPPLY 0xB4
fblanc 0:55f2866e9c0c 9 #define MAX31850_READ 0xBE
fblanc 0:55f2866e9c0c 10
fblanc 0:55f2866e9c0c 11 #define MAX31850_ADC_TEMP_TC_UNIT 0.25
fblanc 0:55f2866e9c0c 12 #define MAX31850_ADC_TEMP_CJ_UNIT 0.0625
fblanc 0:55f2866e9c0c 13 #define MAX31850_K 41.276//41.276µV/C
fblanc 0:55f2866e9c0c 14
fblanc 0:55f2866e9c0c 15 #define MAX31850_ERR_FAULT -10;
fblanc 0:55f2866e9c0c 16 #define MAX31850_ERR_SHORT2VDD -12;
fblanc 0:55f2866e9c0c 17 #define MAX31850_ERR_SHORT2GND -13;
fblanc 0:55f2866e9c0c 18 #define MAX31850_ERR_OPEN_CIRCUIT -14;
fblanc 0:55f2866e9c0c 19 /**
fblanc 0:55f2866e9c0c 20 * @brief lecture registre MAX31850
fblanc 0:55f2866e9c0c 21 * @param [in] uint8_t id[] tableau d'identifiant OW
fblanc 0:55f2866e9c0c 22 * @param [out] uint8_t sp[] tableau de registre
fblanc 0:55f2866e9c0c 23 * @param [in] uint8_t n bus ow
fblanc 0:55f2866e9c0c 24 * @return OW_OK si erreur retourne OW_ERROR_CRC
fblanc 0:55f2866e9c0c 25 * @date 02/12/2013
fblanc 0:55f2866e9c0c 26 *
fblanc 0:55f2866e9c0c 27 */
fblanc 0:55f2866e9c0c 28 int MAX31850_Read_Scratch(uint8_t id[],uint8_t sp[],uint8_t n) ;
fblanc 0:55f2866e9c0c 29
fblanc 0:55f2866e9c0c 30 /**
fblanc 0:55f2866e9c0c 31 * @brief lecture temperature thermocouple Linearized MAX31850
fblanc 0:55f2866e9c0c 32 * @param [in] uint8_t sp[] tableau registre MAX31850
fblanc 0:55f2866e9c0c 33 * @param [out] float temperature thermocouple Linearized degre Celsuis
fblanc 0:55f2866e9c0c 34 * @return OW_OK si erreur retourne ERROR
fblanc 0:55f2866e9c0c 35 * @date 04/12/2013
fblanc 0:55f2866e9c0c 36 *
fblanc 0:55f2866e9c0c 37 */
fblanc 0:55f2866e9c0c 38 int MAX31850_Temp_TRUE(uint8_t *sp,double *temp);
fblanc 0:55f2866e9c0c 39
fblanc 0:55f2866e9c0c 40 /**
fblanc 0:55f2866e9c0c 41 * @brief lecture temperature thermocouple MAX31850
fblanc 0:55f2866e9c0c 42 * @param [in] uint8_t sp[] tableau registre MAX31850
fblanc 0:55f2866e9c0c 43 * @param [out] float temperature thermocouple degre Celsuis
fblanc 0:55f2866e9c0c 44 * @return OW_OK si erreur retourne ERROR
fblanc 0:55f2866e9c0c 45 * @date 04/12/2013
fblanc 0:55f2866e9c0c 46 *
fblanc 0:55f2866e9c0c 47 */
fblanc 0:55f2866e9c0c 48 int MAX31850_Temp_TC(uint8_t *sp,float *temp) ;
fblanc 0:55f2866e9c0c 49
fblanc 0:55f2866e9c0c 50 /**
fblanc 0:55f2866e9c0c 51 * @brief lecture temperature cold junction MAX31850
fblanc 0:55f2866e9c0c 52 * @param [in] uint8_t sp[] tableau registre MAX31850
fblanc 0:55f2866e9c0c 53 * @param [out] float temperature cold junction degre Celsuis
fblanc 0:55f2866e9c0c 54 * @return OW_OK si erreur retourne ERROR
fblanc 0:55f2866e9c0c 55 * @date 04/12/2013
fblanc 0:55f2866e9c0c 56 *
fblanc 0:55f2866e9c0c 57 */
fblanc 0:55f2866e9c0c 58 int MAX31850_Temp_CJ(uint8_t *sp,float *temp) ;
fblanc 0:55f2866e9c0c 59
fblanc 0:55f2866e9c0c 60 /**
fblanc 0:55f2866e9c0c 61 * @brief start convertion MAX31850
fblanc 0:55f2866e9c0c 62 * @param [in] uint8_t id[] tableau d'identifiant OW
fblanc 0:55f2866e9c0c 63 * @param [in] uint8_t n bus ow
fblanc 0:55f2866e9c0c 64 * @return OW_OK
fblanc 0:55f2866e9c0c 65 * @date 02/12/2013
fblanc 0:55f2866e9c0c 66 *
fblanc 0:55f2866e9c0c 67 */
fblanc 0:55f2866e9c0c 68 int MAX31850_Start_meas(uint8_t id[],uint8_t n);
fblanc 0:55f2866e9c0c 69 #endif