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.
Dependencies: eye_r_eye-htpa32x32-v_1_8-ticker mbed
Fork of eye_r_eye-htpa32x32-v_1_8-ticker by
heimann32x32.h@0:851be67e4df5, 2017-12-13 (annotated)
- Committer:
- withboobs
- Date:
- Wed Dec 13 19:16:26 2017 +0000
- Revision:
- 0:851be67e4df5
- Child:
- 2:270ef0ab1a2e
nothing to say;
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
withboobs | 0:851be67e4df5 | 1 | #ifndef _I2C_HEIMANN32X32_ |
withboobs | 0:851be67e4df5 | 2 | #define _I2C_HEIMANN32X32_ |
withboobs | 0:851be67e4df5 | 3 | |
withboobs | 0:851be67e4df5 | 4 | #define AdrPixCMin 0x00 |
withboobs | 0:851be67e4df5 | 5 | #define AdrPixCMax 0x04 |
withboobs | 0:851be67e4df5 | 6 | #define AdrGradScale 0x08 |
withboobs | 0:851be67e4df5 | 7 | #define AdrTableNumber 0x0B //changed to 0x0B with Rev 0.14 and adpated TN readout |
withboobs | 0:851be67e4df5 | 8 | #define AdrEpsilon 0x0D |
withboobs | 0:851be67e4df5 | 9 | |
withboobs | 0:851be67e4df5 | 10 | #define AdrMBITPixC 0x1A |
withboobs | 0:851be67e4df5 | 11 | #define AdrBIASPixC 0x1B |
withboobs | 0:851be67e4df5 | 12 | #define AdrCLKPixC 0x1C |
withboobs | 0:851be67e4df5 | 13 | #define AdrBPAPixC 0x1D |
withboobs | 0:851be67e4df5 | 14 | #define AdrPUPixC 0x1E |
withboobs | 0:851be67e4df5 | 15 | |
withboobs | 0:851be67e4df5 | 16 | #define AdrVddMeasTh1 0x26 |
withboobs | 0:851be67e4df5 | 17 | #define AdrVddTh1 0x46 |
withboobs | 0:851be67e4df5 | 18 | |
withboobs | 0:851be67e4df5 | 19 | #define AdrPTATGrad 0x34 |
withboobs | 0:851be67e4df5 | 20 | |
withboobs | 0:851be67e4df5 | 21 | #define AdrVddScaling 0x4E |
withboobs | 0:851be67e4df5 | 22 | #define AdrVddScalingOff 0x4F |
withboobs | 0:851be67e4df5 | 23 | |
withboobs | 0:851be67e4df5 | 24 | #define AdrMBITUser 0x60 |
withboobs | 0:851be67e4df5 | 25 | #define AdrBIASUser 0x61 |
withboobs | 0:851be67e4df5 | 26 | #define AdrCLKUser 0x62 |
withboobs | 0:851be67e4df5 | 27 | #define AdrBPAUser 0x63 |
withboobs | 0:851be67e4df5 | 28 | #define AdrPUUser 0x64 |
withboobs | 0:851be67e4df5 | 29 | |
withboobs | 0:851be67e4df5 | 30 | #define AdrDevID 0x74 |
withboobs | 0:851be67e4df5 | 31 | |
withboobs | 0:851be67e4df5 | 32 | #define AdrGlobalOffset 0x54 |
withboobs | 0:851be67e4df5 | 33 | #define AdrGlobalGain 0x55 |
withboobs | 0:851be67e4df5 | 34 | |
withboobs | 0:851be67e4df5 | 35 | #define AdrVddCompValues2 0x340 |
withboobs | 0:851be67e4df5 | 36 | #define AdrVddCompValues 0x540 |
withboobs | 0:851be67e4df5 | 37 | #define AdrTh1 0x740 |
withboobs | 0:851be67e4df5 | 38 | #define AdrTh2 0xF40 |
withboobs | 0:851be67e4df5 | 39 | #define AdrPixC 0x1740 |
withboobs | 0:851be67e4df5 | 40 | |
withboobs | 0:851be67e4df5 | 41 | #define BIAScurrentDefault 0x05 |
withboobs | 0:851be67e4df5 | 42 | #define CLKTRIMDefault 0x15 //0x20 to let it run with 10 Hz |
withboobs | 0:851be67e4df5 | 43 | #define BPATRIMDefault 0x0C |
withboobs | 0:851be67e4df5 | 44 | //#define MBITTRIMDefault 0x0C |
withboobs | 0:851be67e4df5 | 45 | #define PUTRIMDefault 0x88 |
withboobs | 0:851be67e4df5 | 46 | |
withboobs | 0:851be67e4df5 | 47 | |
withboobs | 0:851be67e4df5 | 48 | //pixelcount etc. for 32x32d |
withboobs | 0:851be67e4df5 | 49 | #define Pixel 1024 //=32x32 |
withboobs | 0:851be67e4df5 | 50 | #define PixelEighth 128 |
withboobs | 0:851be67e4df5 | 51 | #define LINE 32 |
withboobs | 0:851be67e4df5 | 52 | #define COLUMN 32 |
withboobs | 0:851be67e4df5 | 53 | #define DATALength 1292//1098 //length of first packet |
withboobs | 0:851be67e4df5 | 54 | #define DATALength2 1288//1096 //lenght of second/last packet |
withboobs | 0:851be67e4df5 | 55 | #define DataLengthHalf 646 |
withboobs | 0:851be67e4df5 | 56 | #define PTATamount 8 |
withboobs | 0:851be67e4df5 | 57 | #define ELOFFSET 1024 //start address of el. Offset |
withboobs | 0:851be67e4df5 | 58 | #define ELAMOUNT 256 |
withboobs | 0:851be67e4df5 | 59 | #define ELAMOUNTHALF 128 |
withboobs | 0:851be67e4df5 | 60 | #define StackSize 16 //must be choosen by the user! |
withboobs | 0:851be67e4df5 | 61 | #define PTATSTARTADSRESS 1282 |
withboobs | 0:851be67e4df5 | 62 | #define VDDADDRESS 1280 |
withboobs | 0:851be67e4df5 | 63 | |
withboobs | 0:851be67e4df5 | 64 | #define GetElEveryFrameX 10 //amount of normal frames to capture after which the el. Offset is fetched |
withboobs | 0:851be67e4df5 | 65 | #define STACKSIZEPTAT 30 //should be an even number |
withboobs | 0:851be67e4df5 | 66 | #define STACKSIZEVDD 50 //should be an even number |
withboobs | 0:851be67e4df5 | 67 | #define VddStackAmount 30 |
withboobs | 0:851be67e4df5 | 68 | |
withboobs | 0:851be67e4df5 | 69 | |
withboobs | 0:851be67e4df5 | 70 | #define ReadToFromTable |
withboobs | 0:851be67e4df5 | 71 | #ifdef ReadToFromTable |
withboobs | 0:851be67e4df5 | 72 | #define HTPA32x32dL2_1HiSiF5_0 |
withboobs | 0:851be67e4df5 | 73 | //#define HTPA32x32dL2_1HiSiF5_0 |
withboobs | 0:851be67e4df5 | 74 | //#define HTPA32x32dL2_1HiSiF5_0_withSiFilter |
withboobs | 0:851be67e4df5 | 75 | //#define HTPA32x32dL3_6HiSi |
withboobs | 0:851be67e4df5 | 76 | //#define HTPA32x32dL3_6HiSi_Rev1 |
withboobs | 0:851be67e4df5 | 77 | //#define HTPA32x32dL7_0HiSi |
withboobs | 0:851be67e4df5 | 78 | //#define HTPA32x32dL5_0HiGeF7_7 |
withboobs | 0:851be67e4df5 | 79 | //#define HTPA32x32dL1_6HiGe |
withboobs | 0:851be67e4df5 | 80 | //#define HTPA32x32dR1L1_6HiGe_Gain3k3 |
withboobs | 0:851be67e4df5 | 81 | //#define HTPA32x32dR1L2_1SiF5_0_N2 |
withboobs | 0:851be67e4df5 | 82 | //#define HTPA32x32dL2_1HiSiF5_0_Gain3k3 //is used for SensorRev. 1 |
withboobs | 0:851be67e4df5 | 83 | //#define HTPA32x32dR1L2_1HiSiF5_0_Precise |
withboobs | 0:851be67e4df5 | 84 | //#define HTPA32x32dR1L2_85Hi_Gain3k3 |
withboobs | 0:851be67e4df5 | 85 | //#define HTPA32x32dR1L3_6HiSi_Rev1_Gain3k3 |
withboobs | 0:851be67e4df5 | 86 | //#define HTPA32x32dR1L5_0HiGeF7_7_Gain3k3 |
withboobs | 0:851be67e4df5 | 87 | //#define HTPA32x32dR1L7_0HiSi_Gain3k3 |
withboobs | 0:851be67e4df5 | 88 | |
withboobs | 0:851be67e4df5 | 89 | #ifdef HTPA32x32dL5_0HiGe |
withboobs | 0:851be67e4df5 | 90 | #define TABLENUMBER 79 |
withboobs | 0:851be67e4df5 | 91 | #define PCSCALEVAL 100000000 //327000000000 //PixelConst scale value for table... lower 'L' for (long) |
withboobs | 0:851be67e4df5 | 92 | #define NROFTAELEMENTS 7 |
withboobs | 0:851be67e4df5 | 93 | #define NROFADELEMENTS 471 //130 possible due to Program memory, higher values possible if NROFTAELEMENTS is decreased |
withboobs | 0:851be67e4df5 | 94 | #define TAEQUIDISTANCE 100 //dK |
withboobs | 0:851be67e4df5 | 95 | #define ADEQUIDISTANCE 64 //dig |
withboobs | 0:851be67e4df5 | 96 | #define ADEXPBITS 6 //2^ADEXPBITS=ADEQUIDISTANCE |
withboobs | 0:851be67e4df5 | 97 | #define TABLEOFFSET 512 |
withboobs | 0:851be67e4df5 | 98 | #define EQUIADTABLE //if defined, ADELEMENTS have to be 2^N quantizied! else more CPU Power is needed |
withboobs | 0:851be67e4df5 | 99 | #ifdef EQUIADTABLE |
withboobs | 0:851be67e4df5 | 100 | #undef FLOATTABLE |
withboobs | 0:851be67e4df5 | 101 | #endif |
withboobs | 0:851be67e4df5 | 102 | #endif |
withboobs | 0:851be67e4df5 | 103 | |
withboobs | 0:851be67e4df5 | 104 | #ifdef HTPA32x32dL5_0HiGeF7_7 |
withboobs | 0:851be67e4df5 | 105 | #define TABLENUMBER 92 |
withboobs | 0:851be67e4df5 | 106 | #define PCSCALEVAL 100000000 //327000000000 //PixelConst scale value for table... lower 'L' for (long) |
withboobs | 0:851be67e4df5 | 107 | #define NROFTAELEMENTS 7 |
withboobs | 0:851be67e4df5 | 108 | #define NROFADELEMENTS 471 //130 possible due to Program memory, higher values possible if NROFTAELEMENTS is decreased |
withboobs | 0:851be67e4df5 | 109 | #define TAEQUIDISTANCE 100 //dK |
withboobs | 0:851be67e4df5 | 110 | #define ADEQUIDISTANCE 64 //dig |
withboobs | 0:851be67e4df5 | 111 | #define ADEXPBITS 6 //2^ADEXPBITS=ADEQUIDISTANCE |
withboobs | 0:851be67e4df5 | 112 | #define TABLEOFFSET 256 |
withboobs | 0:851be67e4df5 | 113 | #define EQUIADTABLE //if defined, ADELEMENTS have to be 2^N quantizied! else more CPU Power is needed |
withboobs | 0:851be67e4df5 | 114 | #ifdef EQUIADTABLE |
withboobs | 0:851be67e4df5 | 115 | #undef FLOATTABLE |
withboobs | 0:851be67e4df5 | 116 | #endif |
withboobs | 0:851be67e4df5 | 117 | #endif |
withboobs | 0:851be67e4df5 | 118 | |
withboobs | 0:851be67e4df5 | 119 | #ifdef HTPA32x32dR1L5_0HiGeF7_7_Gain3k3 |
withboobs | 0:851be67e4df5 | 120 | #define TABLENUMBER 113 |
withboobs | 0:851be67e4df5 | 121 | #define PCSCALEVAL 100000000 //327000000000 //PixelConst scale value for table... lower 'L' for (long) |
withboobs | 0:851be67e4df5 | 122 | #define NROFTAELEMENTS 7 |
withboobs | 0:851be67e4df5 | 123 | #define NROFADELEMENTS 1595 //130 possible due to Program memory, higher values possible if NROFTAELEMENTS is decreased |
withboobs | 0:851be67e4df5 | 124 | #define TAEQUIDISTANCE 100 //dK |
withboobs | 0:851be67e4df5 | 125 | #define ADEQUIDISTANCE 64 //dig |
withboobs | 0:851be67e4df5 | 126 | #define ADEXPBITS 6 //2^ADEXPBITS=ADEQUIDISTANCE |
withboobs | 0:851be67e4df5 | 127 | #define TABLEOFFSET 1024 |
withboobs | 0:851be67e4df5 | 128 | #define EQUIADTABLE //if defined, ADELEMENTS have to be 2^N quantizied! else more CPU Power is needed |
withboobs | 0:851be67e4df5 | 129 | #ifdef EQUIADTABLE |
withboobs | 0:851be67e4df5 | 130 | #undef FLOATTABLE |
withboobs | 0:851be67e4df5 | 131 | #endif |
withboobs | 0:851be67e4df5 | 132 | #define MBITTRIMDefault 0x2C |
withboobs | 0:851be67e4df5 | 133 | #define SensRv 1 |
withboobs | 0:851be67e4df5 | 134 | #endif |
withboobs | 0:851be67e4df5 | 135 | |
withboobs | 0:851be67e4df5 | 136 | #ifdef HTPA32x32dL1_6HiGe |
withboobs | 0:851be67e4df5 | 137 | #define TABLENUMBER 101 |
withboobs | 0:851be67e4df5 | 138 | #define PCSCALEVAL 100000000 //PixelConst scale value for table... lower 'L' for (long) |
withboobs | 0:851be67e4df5 | 139 | #define NROFTAELEMENTS 7 |
withboobs | 0:851be67e4df5 | 140 | #define NROFADELEMENTS 471 //possible due to Program memory, higher values possible if NROFTAELEMENTS is decreased |
withboobs | 0:851be67e4df5 | 141 | #define TAEQUIDISTANCE 100 //dK |
withboobs | 0:851be67e4df5 | 142 | #define ADEQUIDISTANCE 64 //dig |
withboobs | 0:851be67e4df5 | 143 | #define ADEXPBITS 6 //2^ADEXPBITS=ADEQUIDISTANCE |
withboobs | 0:851be67e4df5 | 144 | #define TABLEOFFSET 256 |
withboobs | 0:851be67e4df5 | 145 | #define EQUIADTABLE //if defined, ADELEMENTS have to be 2^N quantizied! else more CPU Power is needed |
withboobs | 0:851be67e4df5 | 146 | #ifdef EQUIADTABLE |
withboobs | 0:851be67e4df5 | 147 | #undef FLOATTABLE |
withboobs | 0:851be67e4df5 | 148 | #endif |
withboobs | 0:851be67e4df5 | 149 | #endif |
withboobs | 0:851be67e4df5 | 150 | |
withboobs | 0:851be67e4df5 | 151 | #ifdef HTPA32x32dR1L1_6HiGe_Gain3k3 |
withboobs | 0:851be67e4df5 | 152 | #define TABLENUMBER 119 |
withboobs | 0:851be67e4df5 | 153 | #define PCSCALEVAL 100000000 //327000000000 //PixelConst scale value for table... lower 'L' for (long) |
withboobs | 0:851be67e4df5 | 154 | #define NROFTAELEMENTS 7 |
withboobs | 0:851be67e4df5 | 155 | #define NROFADELEMENTS 1595 //130 possible due to Program memory, higher values possible if NROFTAELEMENTS is decreased |
withboobs | 0:851be67e4df5 | 156 | #define TAEQUIDISTANCE 100 //dK |
withboobs | 0:851be67e4df5 | 157 | #define ADEQUIDISTANCE 64 //dig |
withboobs | 0:851be67e4df5 | 158 | #define ADEXPBITS 6 //2^ADEXPBITS=ADEQUIDISTANCE |
withboobs | 0:851be67e4df5 | 159 | #define TABLEOFFSET 1024 |
withboobs | 0:851be67e4df5 | 160 | #define EQUIADTABLE //if defined, ADELEMENTS have to be 2^N quantizied! else more CPU Power is needed |
withboobs | 0:851be67e4df5 | 161 | #ifdef EQUIADTABLE |
withboobs | 0:851be67e4df5 | 162 | #undef FLOATTABLE |
withboobs | 0:851be67e4df5 | 163 | #endif |
withboobs | 0:851be67e4df5 | 164 | #define MBITTRIMDefault 0x2C |
withboobs | 0:851be67e4df5 | 165 | #define SensRv 1 |
withboobs | 0:851be67e4df5 | 166 | #endif |
withboobs | 0:851be67e4df5 | 167 | |
withboobs | 0:851be67e4df5 | 168 | #ifdef HTPA32x32dL2_1HiSi |
withboobs | 0:851be67e4df5 | 169 | #define TABLENUMBER 80 |
withboobs | 0:851be67e4df5 | 170 | #define PCSCALEVAL 100000000 //PixelConst scale value for table... lower 'L' for (long) |
withboobs | 0:851be67e4df5 | 171 | #define NROFTAELEMENTS 7 |
withboobs | 0:851be67e4df5 | 172 | #define NROFADELEMENTS 471 //130 possible due to Program memory, higher values possible if NROFTAELEMENTS is decreased |
withboobs | 0:851be67e4df5 | 173 | #define TAEQUIDISTANCE 100 //dK |
withboobs | 0:851be67e4df5 | 174 | #define ADEQUIDISTANCE 64 //dig |
withboobs | 0:851be67e4df5 | 175 | #define ADEXPBITS 6 //2^ADEXPBITS=ADEQUIDISTANCE |
withboobs | 0:851be67e4df5 | 176 | #define TABLEOFFSET 256 |
withboobs | 0:851be67e4df5 | 177 | #define EQUIADTABLE //if defined, ADELEMENTS have to be 2^N quantizied! else more CPU Power is needed |
withboobs | 0:851be67e4df5 | 178 | #ifdef EQUIADTABLE |
withboobs | 0:851be67e4df5 | 179 | #undef FLOATTABLE |
withboobs | 0:851be67e4df5 | 180 | #endif |
withboobs | 0:851be67e4df5 | 181 | #endif |
withboobs | 0:851be67e4df5 | 182 | |
withboobs | 0:851be67e4df5 | 183 | #ifdef HTPA32x32dL2_1HiSiF5_0 |
withboobs | 0:851be67e4df5 | 184 | #define TABLENUMBER 96 |
withboobs | 0:851be67e4df5 | 185 | #define PCSCALEVAL 100000000 //PixelConst scale value for table... lower 'L' for (long) |
withboobs | 0:851be67e4df5 | 186 | #define NROFTAELEMENTS 7 |
withboobs | 0:851be67e4df5 | 187 | #define NROFADELEMENTS 471 //130 possible due to Program memory, higher values possible if NROFTAELEMENTS is decreased |
withboobs | 0:851be67e4df5 | 188 | #define TAEQUIDISTANCE 100 //dK |
withboobs | 0:851be67e4df5 | 189 | #define ADEQUIDISTANCE 64 //dig |
withboobs | 0:851be67e4df5 | 190 | #define ADEXPBITS 6 //2^ADEXPBITS=ADEQUIDISTANCE |
withboobs | 0:851be67e4df5 | 191 | #define TABLEOFFSET 256 |
withboobs | 0:851be67e4df5 | 192 | #define EQUIADTABLE //if defined, ADELEMENTS have to be 2^N quantizied! else more CPU Power is needed |
withboobs | 0:851be67e4df5 | 193 | #ifdef EQUIADTABLE |
withboobs | 0:851be67e4df5 | 194 | #undef FLOATTABLE |
withboobs | 0:851be67e4df5 | 195 | #endif |
withboobs | 0:851be67e4df5 | 196 | #endif |
withboobs | 0:851be67e4df5 | 197 | |
withboobs | 0:851be67e4df5 | 198 | #ifdef HTPA32x32dR1L2_1SiF5_0_N2 |
withboobs | 0:851be67e4df5 | 199 | #define TABLENUMBER 130 |
withboobs | 0:851be67e4df5 | 200 | #define PCSCALEVAL 100000000 //327000000000 //PixelConst scale value for table... lower 'L' for (long) |
withboobs | 0:851be67e4df5 | 201 | #define NROFTAELEMENTS 7 |
withboobs | 0:851be67e4df5 | 202 | #define NROFADELEMENTS 1595 //130 possible due to Program memory, higher values possible if NROFTAELEMENTS is decreased |
withboobs | 0:851be67e4df5 | 203 | #define TAEQUIDISTANCE 100 //dK |
withboobs | 0:851be67e4df5 | 204 | #define ADEQUIDISTANCE 64 //dig |
withboobs | 0:851be67e4df5 | 205 | #define ADEXPBITS 6 //2^ADEXPBITS=ADEQUIDISTANCE |
withboobs | 0:851be67e4df5 | 206 | #define TABLEOFFSET 192 |
withboobs | 0:851be67e4df5 | 207 | #define EQUIADTABLE //if defined, ADELEMENTS have to be 2^N quantizied! else more CPU Power is needed |
withboobs | 0:851be67e4df5 | 208 | #ifdef EQUIADTABLE |
withboobs | 0:851be67e4df5 | 209 | #undef FLOATTABLE |
withboobs | 0:851be67e4df5 | 210 | #endif |
withboobs | 0:851be67e4df5 | 211 | #define MBITTRIMDefault 0x2C |
withboobs | 0:851be67e4df5 | 212 | #define SensRv 1 |
withboobs | 0:851be67e4df5 | 213 | #endif |
withboobs | 0:851be67e4df5 | 214 | |
withboobs | 0:851be67e4df5 | 215 | #ifdef HTPA32x32dL2_1HiSiF5_0_Gain3k3 |
withboobs | 0:851be67e4df5 | 216 | #define TABLENUMBER 114 |
withboobs | 0:851be67e4df5 | 217 | #define PCSCALEVAL 100000000 //327000000000 //PixelConst scale value for table... lower 'L' for (long) |
withboobs | 0:851be67e4df5 | 218 | #define NROFTAELEMENTS 7 |
withboobs | 0:851be67e4df5 | 219 | #define NROFADELEMENTS 1595 //130 possible due to Program memory, higher values possible if NROFTAELEMENTS is decreased |
withboobs | 0:851be67e4df5 | 220 | #define TAEQUIDISTANCE 100 //dK |
withboobs | 0:851be67e4df5 | 221 | #define ADEQUIDISTANCE 64 //dig |
withboobs | 0:851be67e4df5 | 222 | #define ADEXPBITS 6 //2^ADEXPBITS=ADEQUIDISTANCE |
withboobs | 0:851be67e4df5 | 223 | #define TABLEOFFSET 1024 |
withboobs | 0:851be67e4df5 | 224 | #define EQUIADTABLE //if defined, ADELEMENTS have to be 2^N quantizied! else more CPU Power is needed |
withboobs | 0:851be67e4df5 | 225 | #ifdef EQUIADTABLE |
withboobs | 0:851be67e4df5 | 226 | #undef FLOATTABLE |
withboobs | 0:851be67e4df5 | 227 | #endif |
withboobs | 0:851be67e4df5 | 228 | #define MBITTRIMDefault 0x2C //use REF_CAL=2 here. Table does not match, so GlobalGain ist set to 50 % to compensate this. |
withboobs | 0:851be67e4df5 | 229 | #define SensRv 1 //Sensor Revision is set to 1 (Redesign) |
withboobs | 0:851be67e4df5 | 230 | #endif |
withboobs | 0:851be67e4df5 | 231 | |
withboobs | 0:851be67e4df5 | 232 | #ifdef HTPA32x32dR1L2_1HiSiF5_0_Precise |
withboobs | 0:851be67e4df5 | 233 | #define TABLENUMBER 116 |
withboobs | 0:851be67e4df5 | 234 | #define PCSCALEVAL 100000000 //327000000000 //PixelConst scale value for table... lower 'L' for (long) |
withboobs | 0:851be67e4df5 | 235 | #define NROFTAELEMENTS 22 |
withboobs | 0:851be67e4df5 | 236 | #define NROFADELEMENTS 1000 //130 possible due to Program memory, higher values possible if NROFTAELEMENTS is decreased |
withboobs | 0:851be67e4df5 | 237 | #define TAEQUIDISTANCE 50 //dK |
withboobs | 0:851be67e4df5 | 238 | #define ADEQUIDISTANCE 32 //dig |
withboobs | 0:851be67e4df5 | 239 | #define ADEXPBITS 5 //2^ADEXPBITS=ADEQUIDISTANCE |
withboobs | 0:851be67e4df5 | 240 | #define TABLEOFFSET 1024 |
withboobs | 0:851be67e4df5 | 241 | #define EQUIADTABLE //if defined, ADELEMENTS have to be 2^N quantizied! else more CPU Power is needed |
withboobs | 0:851be67e4df5 | 242 | #ifdef EQUIADTABLE |
withboobs | 0:851be67e4df5 | 243 | #undef FLOATTABLE |
withboobs | 0:851be67e4df5 | 244 | #endif |
withboobs | 0:851be67e4df5 | 245 | #define MBITTRIMDefault 0x2C |
withboobs | 0:851be67e4df5 | 246 | #define SensRv 1 |
withboobs | 0:851be67e4df5 | 247 | #endif |
withboobs | 0:851be67e4df5 | 248 | |
withboobs | 0:851be67e4df5 | 249 | #ifdef HTPA32x32dL2_1HiSiF5_0_withSiFilter |
withboobs | 0:851be67e4df5 | 250 | #define TABLENUMBER 97 |
withboobs | 0:851be67e4df5 | 251 | #define PCSCALEVAL 100000000 //PixelConst scale value for table... lower 'L' for (long) |
withboobs | 0:851be67e4df5 | 252 | #define NROFTAELEMENTS 7 |
withboobs | 0:851be67e4df5 | 253 | #define NROFADELEMENTS 471 //130 possible due to Program memory, higher values possible if NROFTAELEMENTS is decreased |
withboobs | 0:851be67e4df5 | 254 | #define TAEQUIDISTANCE 100 //dK |
withboobs | 0:851be67e4df5 | 255 | #define ADEQUIDISTANCE 64 //dig |
withboobs | 0:851be67e4df5 | 256 | #define ADEXPBITS 6 //2^ADEXPBITS=ADEQUIDISTANCE |
withboobs | 0:851be67e4df5 | 257 | #define TABLEOFFSET 256 |
withboobs | 0:851be67e4df5 | 258 | #define EQUIADTABLE //if defined, ADELEMENTS have to be 2^N quantizied! else more CPU Power is needed |
withboobs | 0:851be67e4df5 | 259 | #ifdef EQUIADTABLE |
withboobs | 0:851be67e4df5 | 260 | #undef FLOATTABLE |
withboobs | 0:851be67e4df5 | 261 | #endif |
withboobs | 0:851be67e4df5 | 262 | #endif |
withboobs | 0:851be67e4df5 | 263 | |
withboobs | 0:851be67e4df5 | 264 | #ifdef HTPA32x32dR1L2_85Hi_Gain3k3 |
withboobs | 0:851be67e4df5 | 265 | #define TABLENUMBER 127 |
withboobs | 0:851be67e4df5 | 266 | #define PCSCALEVAL 100000000 //327000000000 //PixelConst scale value for table... lower 'L' for (long) |
withboobs | 0:851be67e4df5 | 267 | #define NROFTAELEMENTS 7 |
withboobs | 0:851be67e4df5 | 268 | #define NROFADELEMENTS 1595 //130 possible due to Program memory, higher values possible if NROFTAELEMENTS is decreased |
withboobs | 0:851be67e4df5 | 269 | #define TAEQUIDISTANCE 100 //dK |
withboobs | 0:851be67e4df5 | 270 | #define ADEQUIDISTANCE 64 //dig |
withboobs | 0:851be67e4df5 | 271 | #define ADEXPBITS 6 //2^ADEXPBITS=ADEQUIDISTANCE |
withboobs | 0:851be67e4df5 | 272 | #define TABLEOFFSET 1024 |
withboobs | 0:851be67e4df5 | 273 | #define EQUIADTABLE //if defined, ADELEMENTS have to be 2^N quantizied! else more CPU Power is needed |
withboobs | 0:851be67e4df5 | 274 | #ifdef EQUIADTABLE |
withboobs | 0:851be67e4df5 | 275 | #undef FLOATTABLE |
withboobs | 0:851be67e4df5 | 276 | #endif |
withboobs | 0:851be67e4df5 | 277 | #define MBITTRIMDefault 0x2C |
withboobs | 0:851be67e4df5 | 278 | #define SensRv 1 |
withboobs | 0:851be67e4df5 | 279 | #endif |
withboobs | 0:851be67e4df5 | 280 | |
withboobs | 0:851be67e4df5 | 281 | #ifdef HTPA32x32dL3_6HiSi |
withboobs | 0:851be67e4df5 | 282 | #define TABLENUMBER 81 |
withboobs | 0:851be67e4df5 | 283 | #define PCSCALEVAL 100000000 //PixelConst scale value for table... lower 'L' for (long) |
withboobs | 0:851be67e4df5 | 284 | #define NROFTAELEMENTS 7 |
withboobs | 0:851be67e4df5 | 285 | #define NROFADELEMENTS 471 //130 possible due to Program memory, higher values possible if NROFTAELEMENTS is decreased |
withboobs | 0:851be67e4df5 | 286 | #define TAEQUIDISTANCE 100 //dK |
withboobs | 0:851be67e4df5 | 287 | #define ADEQUIDISTANCE 64 //dig |
withboobs | 0:851be67e4df5 | 288 | #define ADEXPBITS 6 //2^ADEXPBITS=ADEQUIDISTANCE |
withboobs | 0:851be67e4df5 | 289 | #define TABLEOFFSET 256 |
withboobs | 0:851be67e4df5 | 290 | #define EQUIADTABLE //if defined, ADELEMENTS have to be 2^N quantizied! else more CPU Power is needed |
withboobs | 0:851be67e4df5 | 291 | #ifdef EQUIADTABLE |
withboobs | 0:851be67e4df5 | 292 | #undef FLOATTABLE |
withboobs | 0:851be67e4df5 | 293 | #endif |
withboobs | 0:851be67e4df5 | 294 | #endif |
withboobs | 0:851be67e4df5 | 295 | |
withboobs | 0:851be67e4df5 | 296 | #ifdef HTPA32x32dL3_6HiSi_Rev1 |
withboobs | 0:851be67e4df5 | 297 | #define TABLENUMBER 106 |
withboobs | 0:851be67e4df5 | 298 | #define PCSCALEVAL 100000000 //PixelConst scale value for table... lower 'L' for (long) |
withboobs | 0:851be67e4df5 | 299 | #define NROFTAELEMENTS 7 |
withboobs | 0:851be67e4df5 | 300 | #define NROFADELEMENTS 471 //130 possible due to Program memory, higher values possible if NROFTAELEMENTS is decreased |
withboobs | 0:851be67e4df5 | 301 | #define TAEQUIDISTANCE 100 //dK |
withboobs | 0:851be67e4df5 | 302 | #define ADEQUIDISTANCE 64 //dig |
withboobs | 0:851be67e4df5 | 303 | #define ADEXPBITS 6 //2^ADEXPBITS=ADEQUIDISTANCE |
withboobs | 0:851be67e4df5 | 304 | #define TABLEOFFSET 256 |
withboobs | 0:851be67e4df5 | 305 | #define EQUIADTABLE //if defined, ADELEMENTS have to be 2^N quantizied! else more CPU Power is needed |
withboobs | 0:851be67e4df5 | 306 | #ifdef EQUIADTABLE |
withboobs | 0:851be67e4df5 | 307 | #undef FLOATTABLE |
withboobs | 0:851be67e4df5 | 308 | #endif |
withboobs | 0:851be67e4df5 | 309 | #endif |
withboobs | 0:851be67e4df5 | 310 | |
withboobs | 0:851be67e4df5 | 311 | #ifdef HTPA32x32dR1L3_6HiSi_Rev1_Gain3k3 |
withboobs | 0:851be67e4df5 | 312 | #define TABLENUMBER 117 |
withboobs | 0:851be67e4df5 | 313 | #define PCSCALEVAL 100000000 //PixelConst scale value for table... lower 'L' for (long) |
withboobs | 0:851be67e4df5 | 314 | #define NROFTAELEMENTS 7 |
withboobs | 0:851be67e4df5 | 315 | #define NROFADELEMENTS 1595 //130 possible due to Program memory, higher values possible if NROFTAELEMENTS is decreased |
withboobs | 0:851be67e4df5 | 316 | #define TAEQUIDISTANCE 100 //dK |
withboobs | 0:851be67e4df5 | 317 | #define ADEQUIDISTANCE 64 //dig |
withboobs | 0:851be67e4df5 | 318 | #define ADEXPBITS 6 //2^ADEXPBITS=ADEQUIDISTANCE |
withboobs | 0:851be67e4df5 | 319 | #define TABLEOFFSET 1024 |
withboobs | 0:851be67e4df5 | 320 | #define EQUIADTABLE //if defined, ADELEMENTS have to be 2^N quantizied! else more CPU Power is needed |
withboobs | 0:851be67e4df5 | 321 | #ifdef EQUIADTABLE |
withboobs | 0:851be67e4df5 | 322 | #undef FLOATTABLE |
withboobs | 0:851be67e4df5 | 323 | #endif |
withboobs | 0:851be67e4df5 | 324 | #define MBITTRIMDefault 0x2C |
withboobs | 0:851be67e4df5 | 325 | #define SensRv 1 |
withboobs | 0:851be67e4df5 | 326 | #endif |
withboobs | 0:851be67e4df5 | 327 | |
withboobs | 0:851be67e4df5 | 328 | #ifdef HTPA32x32dL7_0HiSi |
withboobs | 0:851be67e4df5 | 329 | #define TABLENUMBER 107 |
withboobs | 0:851be67e4df5 | 330 | #define PCSCALEVAL 100000000 //PixelConst scale value for table... lower 'L' for (long) |
withboobs | 0:851be67e4df5 | 331 | #define NROFTAELEMENTS 7 |
withboobs | 0:851be67e4df5 | 332 | #define NROFADELEMENTS 471 //130 possible due to Program memory, higher values possible if NROFTAELEMENTS is decreased |
withboobs | 0:851be67e4df5 | 333 | #define TAEQUIDISTANCE 100 //dK |
withboobs | 0:851be67e4df5 | 334 | #define ADEQUIDISTANCE 64 //dig |
withboobs | 0:851be67e4df5 | 335 | #define ADEXPBITS 6 //2^ADEXPBITS=ADEQUIDISTANCE |
withboobs | 0:851be67e4df5 | 336 | #define TABLEOFFSET 256 |
withboobs | 0:851be67e4df5 | 337 | #define EQUIADTABLE //if defined, ADELEMENTS have to be 2^N quantizied! else more CPU Power is needed |
withboobs | 0:851be67e4df5 | 338 | #ifdef EQUIADTABLE |
withboobs | 0:851be67e4df5 | 339 | #undef FLOATTABLE |
withboobs | 0:851be67e4df5 | 340 | #endif |
withboobs | 0:851be67e4df5 | 341 | #endif |
withboobs | 0:851be67e4df5 | 342 | |
withboobs | 0:851be67e4df5 | 343 | #ifdef HTPA32x32dR1L7_0HiSi_Gain3k3 |
withboobs | 0:851be67e4df5 | 344 | #define TABLENUMBER 118 |
withboobs | 0:851be67e4df5 | 345 | #define PCSCALEVAL 100000000 //PixelConst scale value for table... lower 'L' for (long) |
withboobs | 0:851be67e4df5 | 346 | #define NROFTAELEMENTS 7 |
withboobs | 0:851be67e4df5 | 347 | #define NROFADELEMENTS 1595 //130 possible due to Program memory, higher values possible if NROFTAELEMENTS is decreased |
withboobs | 0:851be67e4df5 | 348 | #define TAEQUIDISTANCE 100 //dK |
withboobs | 0:851be67e4df5 | 349 | #define ADEQUIDISTANCE 64 //dig |
withboobs | 0:851be67e4df5 | 350 | #define ADEXPBITS 6 //2^ADEXPBITS=ADEQUIDISTANCE |
withboobs | 0:851be67e4df5 | 351 | #define TABLEOFFSET 640 |
withboobs | 0:851be67e4df5 | 352 | #define EQUIADTABLE //if defined, ADELEMENTS have to be 2^N quantizied! else more CPU Power is needed |
withboobs | 0:851be67e4df5 | 353 | #ifdef EQUIADTABLE |
withboobs | 0:851be67e4df5 | 354 | #undef FLOATTABLE |
withboobs | 0:851be67e4df5 | 355 | #endif |
withboobs | 0:851be67e4df5 | 356 | #define MBITTRIMDefault 0x2C |
withboobs | 0:851be67e4df5 | 357 | #define SensRv 1 |
withboobs | 0:851be67e4df5 | 358 | #endif |
withboobs | 0:851be67e4df5 | 359 | |
withboobs | 0:851be67e4df5 | 360 | #ifdef HTPA32x32dL2_1HiSiDLC |
withboobs | 0:851be67e4df5 | 361 | #define TABLENUMBER 83 |
withboobs | 0:851be67e4df5 | 362 | #define PCSCALEVAL 100000000 //PixelConst scale value for table |
withboobs | 0:851be67e4df5 | 363 | #define NROFTAELEMENTS 7 |
withboobs | 0:851be67e4df5 | 364 | #define NROFADELEMENTS 471 |
withboobs | 0:851be67e4df5 | 365 | #define TAEQUIDISTANCE 100 //dK |
withboobs | 0:851be67e4df5 | 366 | #define ADEQUIDISTANCE 64 //dig |
withboobs | 0:851be67e4df5 | 367 | #define ADEXPBITS 6 //2^ADEXPBITS=ADEQUIDISTANCE |
withboobs | 0:851be67e4df5 | 368 | #define TABLEOFFSET 512 |
withboobs | 0:851be67e4df5 | 369 | #define EQUIADTABLE //if defined, ADELEMENTS have to be 2^N quantizied! else more CPU Power is needed |
withboobs | 0:851be67e4df5 | 370 | #ifdef EQUIADTABLE |
withboobs | 0:851be67e4df5 | 371 | #undef FLOATTABLE |
withboobs | 0:851be67e4df5 | 372 | #endif |
withboobs | 0:851be67e4df5 | 373 | #endif |
withboobs | 0:851be67e4df5 | 374 | |
withboobs | 0:851be67e4df5 | 375 | #ifdef HTPA32x32dL2_1Si_withSiFilter |
withboobs | 0:851be67e4df5 | 376 | #define TABLENUMBER 88 |
withboobs | 0:851be67e4df5 | 377 | #define PCSCALEVAL 100000000 //PixelConst scale value for table |
withboobs | 0:851be67e4df5 | 378 | #define NROFTAELEMENTS 7 |
withboobs | 0:851be67e4df5 | 379 | #define NROFADELEMENTS 471 |
withboobs | 0:851be67e4df5 | 380 | #define TAEQUIDISTANCE 100 //dK |
withboobs | 0:851be67e4df5 | 381 | #define ADEQUIDISTANCE 8 //dig |
withboobs | 0:851be67e4df5 | 382 | #define ADEXPBITS 3 //2^ADEXPBITS=ADEQUIDISTANCE |
withboobs | 0:851be67e4df5 | 383 | #define TABLEOFFSET 64 |
withboobs | 0:851be67e4df5 | 384 | #define EQUIADTABLE //if defined, ADELEMENTS have to be 2^N quantizied! else more CPU Power is needed |
withboobs | 0:851be67e4df5 | 385 | #ifdef EQUIADTABLE |
withboobs | 0:851be67e4df5 | 386 | #undef FLOATTABLE |
withboobs | 0:851be67e4df5 | 387 | #endif |
withboobs | 0:851be67e4df5 | 388 | #endif |
withboobs | 0:851be67e4df5 | 389 | |
withboobs | 0:851be67e4df5 | 390 | #ifdef HTPA32x32dL5_0HiGeMult |
withboobs | 0:851be67e4df5 | 391 | #define TABLENUMBER0 79 |
withboobs | 0:851be67e4df5 | 392 | #define PCSCALEVAL 100000000 //327000000000 //PixelConst scale value for table... lower 'L' for (long) |
withboobs | 0:851be67e4df5 | 393 | #define NROFTAELEMENTS 7 |
withboobs | 0:851be67e4df5 | 394 | #define NROFADELEMENTS 251 //130 possible due to Program memory, higher values possible if NROFTAELEMENTS is decreased |
withboobs | 0:851be67e4df5 | 395 | #define TAEQUIDISTANCE 100 //dK |
withboobs | 0:851be67e4df5 | 396 | #define ADEQUIDISTANCE 128 //dig |
withboobs | 0:851be67e4df5 | 397 | #define ADEXPBITS 7 //2^ADEXPBITS=ADEQUIDISTANCE |
withboobs | 0:851be67e4df5 | 398 | #define TABLEOFFSET 256 |
withboobs | 0:851be67e4df5 | 399 | #define EQUIADTABLE //if defined, ADELEMENTS have to be 2^N quantizied! else more CPU Power is needed |
withboobs | 0:851be67e4df5 | 400 | #ifdef EQUIADTABLE |
withboobs | 0:851be67e4df5 | 401 | #undef FLOATTABLE |
withboobs | 0:851be67e4df5 | 402 | #endif |
withboobs | 0:851be67e4df5 | 403 | #endif |
withboobs | 0:851be67e4df5 | 404 | #endif |
withboobs | 0:851be67e4df5 | 405 | |
withboobs | 0:851be67e4df5 | 406 | // |
withboobs | 0:851be67e4df5 | 407 | // I2C stuff |
withboobs | 0:851be67e4df5 | 408 | // |
withboobs | 0:851be67e4df5 | 409 | #define HTP_ADDRESS (0x34) |
withboobs | 0:851be67e4df5 | 410 | #define HTP_EEPROM_ADDRESS (0xa0) |
withboobs | 0:851be67e4df5 | 411 | |
withboobs | 0:851be67e4df5 | 412 | // |
withboobs | 0:851be67e4df5 | 413 | // REGISTERS: EEPROM |
withboobs | 0:851be67e4df5 | 414 | // |
withboobs | 0:851be67e4df5 | 415 | #define HTP_EEPROM_CALIB_HI 0x00 |
withboobs | 0:851be67e4df5 | 416 | #define HTP_EEPROM_CALIB_LO 0x1A |
withboobs | 0:851be67e4df5 | 417 | |
withboobs | 0:851be67e4df5 | 418 | #define HTP_EEPROM_PTAT_HI 0x00 |
withboobs | 0:851be67e4df5 | 419 | #define HTP_EEPROM_PTAT_GRAD_LO 0x34 |
withboobs | 0:851be67e4df5 | 420 | #define HTP_EEPROM_PTAT_OFFS_LO 0x38 |
withboobs | 0:851be67e4df5 | 421 | |
withboobs | 0:851be67e4df5 | 422 | #define HTP_EEPROM_TN_EPS_HI 0x00 |
withboobs | 0:851be67e4df5 | 423 | #define HTP_EEPROM_TN_LO 0x0C |
withboobs | 0:851be67e4df5 | 424 | #define HTP_EEPROM_EPS_LO 0x0D |
withboobs | 0:851be67e4df5 | 425 | |
withboobs | 0:851be67e4df5 | 426 | #define HTP_EEPROM_GRADSCALE_HI 0x00 |
withboobs | 0:851be67e4df5 | 427 | #define HTP_EEPROM_GRADSCALE_LO 0x08 |
withboobs | 0:851be67e4df5 | 428 | |
withboobs | 0:851be67e4df5 | 429 | #define HTP_EEPROM_PIXC_HI 0x00 |
withboobs | 0:851be67e4df5 | 430 | #define HTP_EEPROM_PIXCMIN_LO 0x00 |
withboobs | 0:851be67e4df5 | 431 | #define HTP_EEPROM_PIXCMAX_LO 0x04 |
withboobs | 0:851be67e4df5 | 432 | |
withboobs | 0:851be67e4df5 | 433 | #define HTP_EEPROM_PIX_HI 0x17 |
withboobs | 0:851be67e4df5 | 434 | #define HTP_EEPROM_PIX_LO 0x40 |
withboobs | 0:851be67e4df5 | 435 | |
withboobs | 0:851be67e4df5 | 436 | #define HTP_EEPROM_THGRAD_HI 0x07 |
withboobs | 0:851be67e4df5 | 437 | #define HTP_EEPROM_THGRAD_LO 0x40 |
withboobs | 0:851be67e4df5 | 438 | |
withboobs | 0:851be67e4df5 | 439 | #define HTP_EEPROM_THOFFS_HI 0x0f |
withboobs | 0:851be67e4df5 | 440 | #define HTP_EEPROM_THOFFS_LO 0x40 |
withboobs | 0:851be67e4df5 | 441 | |
withboobs | 0:851be67e4df5 | 442 | // |
withboobs | 0:851be67e4df5 | 443 | // REGISTERS: HTP |
withboobs | 0:851be67e4df5 | 444 | // |
withboobs | 0:851be67e4df5 | 445 | #define HTP_CONFIG 0x01 |
withboobs | 0:851be67e4df5 | 446 | #define HTP_STATUS 0x02 |
withboobs | 0:851be67e4df5 | 447 | #define HTP_TRIM1_ADC 0x03 |
withboobs | 0:851be67e4df5 | 448 | #define HTP_TRIM2_BIAS1 0x04 |
withboobs | 0:851be67e4df5 | 449 | #define HTP_TRIM3_BIAS2 0x05 |
withboobs | 0:851be67e4df5 | 450 | #define HTP_TRIM4_FREQ 0x06 |
withboobs | 0:851be67e4df5 | 451 | #define HTP_TRIM5_BPA1 0x07 |
withboobs | 0:851be67e4df5 | 452 | #define HTP_TRIM6_BPA2 0x08 |
withboobs | 0:851be67e4df5 | 453 | #define HTP_TRIM7_PU 0x09 |
withboobs | 0:851be67e4df5 | 454 | #define HTP_DATA1 0x0a |
withboobs | 0:851be67e4df5 | 455 | #define HTP_DATA2 0x0b |
withboobs | 0:851be67e4df5 | 456 | |
withboobs | 0:851be67e4df5 | 457 | |
withboobs | 0:851be67e4df5 | 458 | // |
withboobs | 0:851be67e4df5 | 459 | // CONFIG REGISTER CONFIGURATION BITS |
withboobs | 0:851be67e4df5 | 460 | // |
withboobs | 0:851be67e4df5 | 461 | #define CONFIG_WAKEUP 0B00000001 |
withboobs | 0:851be67e4df5 | 462 | #define CONFIG_BLIND 0B00000010 |
withboobs | 0:851be67e4df5 | 463 | #define CONFIG_START 0B00001000 |
withboobs | 0:851be67e4df5 | 464 | #define CONFIG_BLOCK_LSB 0B00010000 |
withboobs | 0:851be67e4df5 | 465 | #define CONFIG_BLOCK_MSB 0B00100000 |
withboobs | 0:851be67e4df5 | 466 | |
withboobs | 0:851be67e4df5 | 467 | |
withboobs | 0:851be67e4df5 | 468 | // |
withboobs | 0:851be67e4df5 | 469 | // STATUS REGISTER CONFIGURATION BITS |
withboobs | 0:851be67e4df5 | 470 | // |
withboobs | 0:851be67e4df5 | 471 | #define STATUS_EOC 0B00000001 |
withboobs | 0:851be67e4df5 | 472 | #define STATUS_BLOCK_LSB 0B00000100 |
withboobs | 0:851be67e4df5 | 473 | #define STATUS_BLOCK_MSB 0B00001000 |
withboobs | 0:851be67e4df5 | 474 | |
withboobs | 0:851be67e4df5 | 475 | // |
withboobs | 0:851be67e4df5 | 476 | // TRIM1/ADC REGISTER CONFIGURATION BITS |
withboobs | 0:851be67e4df5 | 477 | // |
withboobs | 0:851be67e4df5 | 478 | #define TRIM1_ADC_MASK 0B00001111 |
withboobs | 0:851be67e4df5 | 479 | |
withboobs | 0:851be67e4df5 | 480 | // |
withboobs | 0:851be67e4df5 | 481 | // TRIM2/BIAS1 REGISTER CONFIGURATION BITS |
withboobs | 0:851be67e4df5 | 482 | // TRIM3/BIAS2 REGISTER CONFIGURATION BITS |
withboobs | 0:851be67e4df5 | 483 | // |
withboobs | 0:851be67e4df5 | 484 | #define TRIM_BIAS_MASK 0B00011111 |
withboobs | 0:851be67e4df5 | 485 | |
withboobs | 0:851be67e4df5 | 486 | // |
withboobs | 0:851be67e4df5 | 487 | // TRIM4/FREQ REGISTER CONFIGURATION BITS |
withboobs | 0:851be67e4df5 | 488 | // |
withboobs | 0:851be67e4df5 | 489 | #define TRIM_FREQ_MASK 0B00111111 |
withboobs | 0:851be67e4df5 | 490 | |
withboobs | 0:851be67e4df5 | 491 | // |
withboobs | 0:851be67e4df5 | 492 | // TRIM5/BPA1 REGISTER CONFIGURATION BITS |
withboobs | 0:851be67e4df5 | 493 | // TRIM6/BPA2 REGISTER CONFIGURATION BITS |
withboobs | 0:851be67e4df5 | 494 | // |
withboobs | 0:851be67e4df5 | 495 | #define TRIM_BPA_MASK 0B00011111 |
withboobs | 0:851be67e4df5 | 496 | |
withboobs | 0:851be67e4df5 | 497 | // |
withboobs | 0:851be67e4df5 | 498 | // TRIM7/PU REGISTER CONFIGURATION BITS |
withboobs | 0:851be67e4df5 | 499 | // |
withboobs | 0:851be67e4df5 | 500 | #define PU_SDA_1K 0B00010000 |
withboobs | 0:851be67e4df5 | 501 | #define PU_SDA_10K 0B00100000 |
withboobs | 0:851be67e4df5 | 502 | #define PU_SDA_50K 0B01000000 |
withboobs | 0:851be67e4df5 | 503 | #define PU_SDA_100K 0b10000000 |
withboobs | 0:851be67e4df5 | 504 | #define PU_SCL_1K 0B00000001 |
withboobs | 0:851be67e4df5 | 505 | #define PU_SCL_10K 0B00000010 |
withboobs | 0:851be67e4df5 | 506 | #define PU_SCL_50K 0B00000100 |
withboobs | 0:851be67e4df5 | 507 | #define PU_SCL_100K 0B00001000 |
withboobs | 0:851be67e4df5 | 508 | |
withboobs | 0:851be67e4df5 | 509 | #define HTPA_PROC_RAW 0x00 |
withboobs | 0:851be67e4df5 | 510 | #define HTPA_PROC_ELOFFS 0x01 |
withboobs | 0:851be67e4df5 | 511 | #define HTPA_PROC_THOFFS 0x02 |
withboobs | 0:851be67e4df5 | 512 | #define HTPA_PROC_CONVERT 0x04 |
withboobs | 0:851be67e4df5 | 513 | // |
withboobs | 0:851be67e4df5 | 514 | // CLASS |
withboobs | 0:851be67e4df5 | 515 | // |
withboobs | 0:851be67e4df5 | 516 | class HTPA32x32 |
withboobs | 0:851be67e4df5 | 517 | { |
withboobs | 0:851be67e4df5 | 518 | public: |
withboobs | 0:851be67e4df5 | 519 | HTPA32x32(I2C * _i2c, I2C * _i2ce, uint8_t a1 = HTP_ADDRESS, uint8_t a2 = HTP_EEPROM_ADDRESS); |
withboobs | 0:851be67e4df5 | 520 | volatile uint8_t |
withboobs | 0:851be67e4df5 | 521 | mbit, bias, clk, bpa, pu, epsilon, gradScale, tn, proc, available; |
withboobs | 0:851be67e4df5 | 522 | volatile int |
withboobs | 0:851be67e4df5 | 523 | i2c_addr_htpa, i2c_addr_eeprom; |
withboobs | 0:851be67e4df5 | 524 | volatile float |
withboobs | 0:851be67e4df5 | 525 | PixC[1024], PixCmin, PixCmax, PTATgrad, PTAToffs; |
withboobs | 0:851be67e4df5 | 526 | volatile uint16_t |
withboobs | 0:851be67e4df5 | 527 | Ta_dK, Ta_dK_prev, Ta_dK_prev_prev; |
withboobs | 0:851be67e4df5 | 528 | volatile int16_t |
withboobs | 0:851be67e4df5 | 529 | Data[1024], ThGrad[1024], ThOffs[1024], ElOffs[256]; |
withboobs | 0:851be67e4df5 | 530 | volatile uint16_t |
withboobs | 0:851be67e4df5 | 531 | TempTable_TA[NROFADELEMENTS]; |
withboobs | 0:851be67e4df5 | 532 | uint8_t |
withboobs | 0:851be67e4df5 | 533 | ADC ( void ), ADC(uint8_t); |
withboobs | 0:851be67e4df5 | 534 | uint8_t |
withboobs | 0:851be67e4df5 | 535 | PU ( void ), PU(uint8_t); |
withboobs | 0:851be67e4df5 | 536 | uint8_t |
withboobs | 0:851be67e4df5 | 537 | BIAS ( void ), BIAS (uint8_t); |
withboobs | 0:851be67e4df5 | 538 | uint8_t |
withboobs | 0:851be67e4df5 | 539 | CLOCK ( void ), CLOCK (uint8_t); |
withboobs | 0:851be67e4df5 | 540 | uint8_t |
withboobs | 0:851be67e4df5 | 541 | BPA ( void ), BPA (uint8_t); |
withboobs | 0:851be67e4df5 | 542 | uint8_t |
withboobs | 0:851be67e4df5 | 543 | end (void); |
withboobs | 0:851be67e4df5 | 544 | void |
withboobs | 0:851be67e4df5 | 545 | init( void ); |
withboobs | 0:851be67e4df5 | 546 | void |
withboobs | 0:851be67e4df5 | 547 | readb(); |
withboobs | 0:851be67e4df5 | 548 | void |
withboobs | 0:851be67e4df5 | 549 | start(); |
withboobs | 0:851be67e4df5 | 550 | void |
withboobs | 0:851be67e4df5 | 551 | apply_offsets( void ); |
withboobs | 0:851be67e4df5 | 552 | uint16_t |
withboobs | 0:851be67e4df5 | 553 | find_dk_from_v ( int16_t v ); |
withboobs | 0:851be67e4df5 | 554 | |
withboobs | 0:851be67e4df5 | 555 | private: |
withboobs | 0:851be67e4df5 | 556 | I2C * i2c, *i2ce; |
withboobs | 0:851be67e4df5 | 557 | uint8_t |
withboobs | 0:851be67e4df5 | 558 | b; |
withboobs | 0:851be67e4df5 | 559 | void |
withboobs | 0:851be67e4df5 | 560 | read_eeprom(uint8_t HiReg, uint8_t LoReg, char *data_ptr, int DCnt); |
withboobs | 0:851be67e4df5 | 561 | void |
withboobs | 0:851be67e4df5 | 562 | download_PIJ( void ); |
withboobs | 0:851be67e4df5 | 563 | void |
withboobs | 0:851be67e4df5 | 564 | find_temptable_from_ta ( void ); |
withboobs | 0:851be67e4df5 | 565 | }; |
withboobs | 0:851be67e4df5 | 566 | |
withboobs | 0:851be67e4df5 | 567 | |
withboobs | 0:851be67e4df5 | 568 | |
withboobs | 0:851be67e4df5 | 569 | #endif |