#ifndef _HTPA60x40_DEF_H #define _HTPA60x40_DEF_H // DEVICE ADDRESS #define SENSOR_ADDRESS_60x40 0x1A #define EEPROM_ADDRESS_60x40 0x50 // I2C CLOCK #define CLOCK_SENSOR_60x40 1000000 #define CLOCK_EEPROM_60x40 400000 // SETTING #define PTAT_BUFFER_SIZE_60x40 10 #define VDD_BUFFER_SIZE_60x40 10 #define ELOFFSETS_BUFFER_SIZE_60x40 10 #define ELOFFSETS_FILTER_START_DELAY_60x40 100 #define START_WITH_BLOCK_60x40 4 #define READ_ELOFFSET_EVERYX_60x40 10 // WIFI SETTING #define UDP_PACKET_LENGTH_60x40 4808 // 60*40*2 + header #define LAST_UDP_PACKET_LENGTH_60x40 4804 #define ACCESSPOINTNAME_60x40 "HTPA60x40dR1L0.9" #define ACCESSPOINTKEY_60x40 "heimannsensor" // PARAMETER LOOKUPTABLE #define TABLENUMBER_60x40 154 // table number of this sensor type (may need adjustment) #define PCSCALEVAL_60x40 100000000 // scale value for PixC (see formula in datasheet) #define NROFTAELEMENTS_60x40 12 // number of columns (ambient temperature steps) #define NROFADELEMENTS_60x40 1588 // number of rows (digit steps) #define TAEQUIDISTANCE_60x40 100 // distance between two columns #define ADEQUIDISTANCE_60x40 64 // distance between two rows #define ADEXPBITS_60x40 6 #define TABLEOFFSET_60x40 4096 // table offset in digits // SENSOR INFO - HTPA60x40 specific parameters #define NUMBER_OF_PIXEL_60x40 2400 // number of all pixels (60*40) #define NUMBER_OF_BLOCKS_60x40 10 // number of blocks for each half (increased for 60x40) #define PIXEL_PER_BLOCK_60x40 120 // number of pixels of each block (2400/20 blocks total) #define PIXEL_PER_COLUMN_60x40 60 // number of pixels of each column #define PIXEL_PER_ROW_60x40 40 // number of pixels of each row #define ROW_PER_BLOCK_60x40 4 // number of rows of each block #define ALLOWED_DEADPIX_60x40 12 // max. 0.5% of the pixel number (2400*0.005) #define ATC_ACTIVE_60x40 0 // 1 - sensor has... / 0 - sensor hasn't a cyclops #define ATC_POS_60x40 0 // position of the cyclops in block reading order #define PTAT_POS_60x40 0 // position of PTAT in block reading order #define VDD_POS_60x40 0 // position of VDD in block reading order #define PTAT_VDD_SWITCH_60x40 1 // 1 - PTAT and VDD alternate after each pic / 0 - not #define BLOCK_LENGTH_60x40 242 // number of char in each block (120*2 + 2) #define DATA_POS_60x40 2 // position of first data byte in each block // SENSOR REGISTER (same as 32x32) #define TOP_HALF_60x40 0x0A // data of top half #define BOTTOM_HALF_60x40 0x0B // data of bot half #define CONFIGURATION_REGISTER_60x40 0x01 // configuration register (WRITE only) // | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | // | RFU | Block | Start | VDD_MEAS | BLIND | WAKEUP | #define STATUS_REGISTER_60x40 0x02 // address of status register (read only) // | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | // | RFU | Block | RFU | VDD_MEAS | BLIND | EOC | #define TRIM_REGISTER1_60x40 0x03 // address for trim register 1 (WRITE only) // | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | // | RFU | REF_CAL | MBIT | #define TRIM_REGISTER2_60x40 0x04 // address for trim register 2 (WRITE only) // | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | // | RFU | BIAS TRIM TOP | #define TRIM_REGISTER3_60x40 0x05 // address for trim register 3 (WRITE only) // | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | // | RFU | BIAS TRIM BOT | #define TRIM_REGISTER4_60x40 0x06 // address for trim register 4 (WRITE only) // | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | // | RFU | CLK TRIM | #define TRIM_REGISTER5_60x40 0x07 // address for trim register 5 (WRITE only) // | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | // | RFU | BPA TRIM TOP | #define TRIM_REGISTER6_60x40 0x08 // address for trim register 6 (WRITE only) // | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | // | RFU | BPA TRIM BOT | #define TRIM_REGISTER7_60x40 0x09 // address for trim register 7 (WRITE only) // | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | // | PU SDA TRIM | PU SDA TRIM | // EEPROM REGISTER (same structure as 32x32) #define E_PIXCMIN_1_60x40 0x0000 // Min of PixC, stored as float in four 8-bit fields #define E_PIXCMIN_2_60x40 0x0001 #define E_PIXCMIN_3_60x40 0x0002 #define E_PIXCMIN_4_60x40 0x0003 #define E_PIXCMAX_1_60x40 0x0004// Max of PixC, stored as float in four 8-bit fields #define E_PIXCMAX_2_60x40 0x0005 #define E_PIXCMAX_3_60x40 0x0006 #define E_PIXCMAX_4_60x40 0x0007 #define E_GRADSCALE_60x40 0x0008 // stored as unsigned char, important for PTAT comp. #define E_TABLENUMBER1_60x40 0x000B // table number of this sensor, stored as unsigned short #define E_TABLENUMBER2_60x40 0x000C #define E_EPSILON_60x40 0x000D // emissivity in percentage, stored as unsigned char #define E_MBIT_CALIB_60x40 0x000F // calibration MBIT, stored as unsigned char #define E_BIAS_CALIB_60x40 0x0010 // calibration BIAS, stored as unsigned char #define E_CLK_CALIB_60x40 0x0011 // calibration CLK, stored as unsigned char #define E_BPA_CALIB_60x40 0x0012 // calibration BPA, stored as unsigned char #define E_PU_CALIB_60x40 0x0013 // calibration PU, stored as unsigned char #define E_MBIT_USER_60x40 0x0014 // user MBIT, stored as unsigned char #define E_BIAS_USER_60x40 0x0015 // user BIAS, stored as unsigned char #define E_CLK_USER_60x40 0x0016 // user CLK, stored as unsigned char #define E_BPA_USER_60x40 0x0017 // user BPA, stored as unsigned char #define E_PU_USER_60x40 0x0018 // user PU, stored as unsigned char #define E_VDDTH1_1_60x40 0x0026 // VDD th1, stored as unsigned short #define E_VDDTH1_2_60x40 0x0027 #define E_VDDTH2_1_60x40 0x0028 // VDD th2, stored as unsigned short #define E_VDDTH2_2_60x40 0x0029 #define E_PTATTH1_1_60x40 0x002A // PTAT th1, stored as unsigned short #define E_PTATTH1_2_60x40 0x002B #define E_PTATTH2_1_60x40 0x002C // PTAT th2, stored as unsigned short #define E_PTATTH2_2_60x40 0x002D #define E_VDDSCGRAD_60x40 0x002E // VDD scaling gradient, stored as unsigned char #define E_VDDSCOFF_60x40 0x002F // VDD scaling offset, stored as unsigned char #define E_PTATGR_1_60x40 0x0030 // PTAT gradient, stored as unsigned short #define E_PTATGR_2_60x40 0x0031 #define E_PTATOFF_1_60x40 0x0032 // PTAT offset, stored as unsigned short #define E_PTATOFF_2_60x40 0x0033 #define E_PIXCIJ_60x40 0x0034 // start of PixC array // Lookup table for temperature calculation extern const short htpa60x40_lookuptable[NROFTAELEMENTS_60x40][NROFADELEMENTS_60x40]; #endif // _HTPA60x40_DEF_H