Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: mlx90614.h
- Revision:
- 1:eb3bd21fba0b
- Parent:
- 0:599009dbb3e5
diff -r 599009dbb3e5 -r eb3bd21fba0b mlx90614.h --- a/mlx90614.h Tue Mar 21 07:29:14 2017 +0000 +++ b/mlx90614.h Wed Mar 22 04:54:35 2017 +0000 @@ -16,6 +16,35 @@ #define RAM_TA 0x06 #define RAM_TOBJ1 0x07 #define RAM_TOBJ2 0x08 +#define ERROR_ADDR_CRC8 0xFF +#define ERROR_TEMP_CRC8 0xFFFFFFFF + +#define DEFAULT_PWMCTRL 0x0201 +#define DEFAULT_CONFIGREG1 0x1FB3 + +// Tobj = (T + 273.15) * 100 +#define TOBJ_P120 0x9993 //+120 +#define TOBJ_P100 0x91C3 +#define TOBJ_P80 0x89F3 +#define TOBJ_P70 0x860B +#define TOBJ_P60 0x8223 +#define TOBJ_P50 0x7E3B +#define TOBJ_PM0 0x6AB3 +#define TOBJ_M10 0x66CB +#define TOBJ_M20 0x62E3 //-20 + +//Tamb = ((T + 38.2) / 64) * 100 +//Ta = (Ta_max << 8) | Ta_min +#define TAMB_P120 0xF7 //+120 +#define TAMB_P100 0xD8 +#define TAMB_P80 0xB9 +#define TAMB_P70 0xA9 +#define TAMB_P60 0x99 +#define TAMB_P50 0x8A +#define TAMB_PM0 0x3C +#define TAMB_M10 0x2C +#define TAMB_M20 0x1C //-20 + const uint8_t MLX90614_crc8_table[] = { @@ -39,7 +68,10 @@ uint8_t MLX90614_SA_Scan(void); uint8_t MLX90614_SA_Read(uint8_t curAddr = DEFAULT_SADDR); -bool SA_Change(uint8_t curAddr, uint8_t newAddr); +int MLX90614_EEPROM_Erase(int8_t curAddr, uint8_t eepromcmd); +int MLX90614_EEPROM_Write(int8_t curAddr, uint8_t eepromcmd, uint16_t data); +uint16_t MLX90614_EEPROM_Read(uint8_t curAddr, uint8_t eepromcmd); + float getTempC_Ambi(uint8_t SAddr = DEFAULT_SADDR); float getTempC_Obj1(uint8_t SAddr = DEFAULT_SADDR); float getTempC_Obj2(uint8_t SAddr = DEFAULT_SADDR);