Bläddra i källkod

Added thermistor tables

Erik van der Zalm 13 år sedan
förälder
incheckning
bf879ceaa9
3 ändrade filer med 425 tillägg och 153 borttagningar
  1. 14
    7
      Marlin/Configuration.h
  2. 26
    22
      Marlin/temperature.cpp
  3. 385
    124
      Marlin/thermistortables.h

+ 14
- 7
Marlin/Configuration.h Visa fil

@@ -14,14 +14,23 @@
14 14
 #define MOTHERBOARD 7
15 15
 //#define MOTHERBOARD 5
16 16
 
17
+
17 18
 //// Thermistor settings:
18 19
 // 1 is 100k thermistor
19 20
 // 2 is 200k thermistor
20 21
 // 3 is mendel-parts thermistor
21
-#define THERMISTORHEATER 3
22
-// Select one of these only to define how the nozzle temp is read.
23
-//#define HEATER_USES_THERMISTOR
24
-#define HEATER_USES_AD595
22
+// 4 is 10k thermistor
23
+// 5 is ParCan supplied 104GT-2 100K
24
+// 6 is EPCOS 100k
25
+// 7 is 100k Honeywell thermistor 135-104LAG-J01
26
+#define THERMISTORHEATER_1 3
27
+#define THERMISTORHEATER_2 3
28
+#define THERMISTORBED 3
29
+
30
+//#define HEATER_1_USES_THERMISTOR
31
+//#define HEATER_2_USES_THERMISTOR
32
+#define HEATER_1_USES_AD595
33
+//#define HEATER_2_USES_AD595
25 34
 
26 35
 // Select one of these only to define how the bed temp is read.
27 36
 //#define BED_USES_THERMISTOR
@@ -29,8 +38,6 @@
29 38
 
30 39
 #define HEATER_CHECK_INTERVAL 50
31 40
 #define BED_CHECK_INTERVAL 5000
32
-#define BNUMTEMPS NUMTEMPS
33
-#define bedtemptable temptable
34 41
 
35 42
 
36 43
 //// Endstop Settings
@@ -50,7 +57,7 @@ const bool ENDSTOPS_INVERTING = true; // set to true to invert the logic of the
50 57
 #define LCD_WIDTH 16
51 58
 #define LCD_HEIGHT 2
52 59
 
53
-#define ULTIPANEL
60
+//#define ULTIPANEL
54 61
 #ifdef ULTIPANEL
55 62
  //#define NEWPANEL  //enable this if you have a click-encoder panel
56 63
  #define SDSUPPORT

+ 26
- 22
Marlin/temperature.cpp Visa fil

@@ -174,28 +174,28 @@ CRITICAL_SECTION_END;
174 174
 // This is needed because PID in hydra firmware hovers around a given analog value, not a temp value.
175 175
 // This function is derived from inversing the logic from a portion of getTemperature() in FiveD RepRap firmware.
176 176
 float temp2analog(int celsius) {
177
-  #ifdef HEATER_USES_THERMISTOR
177
+  #ifdef HEATER_USES_THERMISTOR_1
178 178
     int raw = 0;
179 179
     byte i;
180 180
     
181
-    for (i=1; i<NUMTEMPS; i++)
181
+    for (i=1; i<NUMTEMPS_HEATER_1; i++)
182 182
     {
183
-      if (temptable[i][1] < celsius)
183
+      if (temptable_1[i][1] < celsius)
184 184
       {
185
-        raw = temptable[i-1][0] + 
186
-          (celsius - temptable[i-1][1]) * 
187
-          (temptable[i][0] - temptable[i-1][0]) /
188
-          (temptable[i][1] - temptable[i-1][1]);
185
+        raw = temptable_1[i-1][0] + 
186
+          (celsius - temptable_1[i-1][1]) * 
187
+          (temptable_1[i][0] - temptable_1[i-1][0]) /
188
+          (temptable_1[i][1] - temptable_1[i-1][1]);
189 189
       
190 190
         break;
191 191
       }
192 192
     }
193 193
 
194 194
     // Overflow: Set to last value in the table
195
-    if (i == NUMTEMPS) raw = temptable[i-1][0];
195
+    if (i == NUMTEMPS_1) raw = temptable_1[i-1][0];
196 196
 
197 197
     return (1023 * OVERSAMPLENR) - raw;
198
-  #elif defined HEATER_USES_AD595
198
+  #elif defined HEATER_1_USES_AD595
199 199
     return celsius * (1024.0 / (5.0 * 100.0) ) * OVERSAMPLENR;
200 200
   #endif
201 201
 }
@@ -235,28 +235,28 @@ float temp2analogBed(int celsius) {
235 235
 // Derived from RepRap FiveD extruder::getTemperature()
236 236
 // For hot end temperature measurement.
237 237
 float analog2temp(int raw) {
238
-  #ifdef HEATER_USES_THERMISTOR
238
+  #ifdef HEATER_1_USES_THERMISTOR
239 239
     int celsius = 0;
240 240
     byte i;  
241 241
     raw = (1023 * OVERSAMPLENR) - raw;
242
-    for (i=1; i<NUMTEMPS; i++)
242
+    for (i=1; i<NUMTEMPS_HEATER_1; i++)
243 243
     {
244
-      if (temptable[i][0] > raw)
244
+      if (temptable_1[i][0] > raw)
245 245
       {
246
-        celsius  = temptable[i-1][1] + 
247
-          (raw - temptable[i-1][0]) * 
248
-          (temptable[i][1] - temptable[i-1][1]) /
249
-          (temptable[i][0] - temptable[i-1][0]);
246
+        celsius  = temptable_1[i-1][1] + 
247
+          (raw - temptable_1[i-1][0]) * 
248
+          (temptable_1[i][1] - temptable_1[i-1][1]) /
249
+          (temptable_1[i][0] - temptable_1[i-1][0]);
250 250
 
251 251
         break;
252 252
       }
253 253
     }
254 254
 
255 255
     // Overflow: Set to last value in the table
256
-    if (i == NUMTEMPS) celsius = temptable[i-1][1];
256
+    if (i == NUMTEMPS_HEATER_1) celsius = temptable_1[i-1][1];
257 257
 
258 258
     return celsius;
259
-  #elif defined HEATER_USES_AD595
259
+  #elif defined HEATER_1_USES_AD595
260 260
     return raw * ((5.0 * 100.0) / 1024.0) / OVERSAMPLENR;
261 261
   #endif
262 262
 }
@@ -270,7 +270,7 @@ float analog2tempBed(int raw) {
270 270
 
271 271
     raw = (1023 * OVERSAMPLENR) - raw;
272 272
 
273
-    for (i=1; i<NUMTEMPS; i++)
273
+    for (i=1; i<BNUMTEMPS; i++)
274 274
     {
275 275
       if (bedtemptable[i][0] > raw)
276 276
       {
@@ -284,7 +284,7 @@ float analog2tempBed(int raw) {
284 284
     }
285 285
 
286 286
     // Overflow: Set to last value in the table
287
-    if (i == NUMTEMPS) celsius = bedtemptable[i-1][1];
287
+    if (i == BNUMTEMPS) celsius = bedtemptable[i-1][1];
288 288
 
289 289
     return celsius;
290 290
     
@@ -403,11 +403,15 @@ ISR(TIMER0_COMPB_vect)
403 403
     
404 404
   if(temp_count >= 16) // 6 ms * 16 = 96ms.
405 405
   {
406
-    #ifdef HEATER_USES_AD595
406
+    #ifdef HEATER_1_USES_AD595
407 407
       current_raw[0] = raw_temp_0_value;
408
-      current_raw[2] = raw_temp_2_value;
409 408
     #else
410 409
       current_raw[0] = 16383 - raw_temp_0_value;
410
+    #endif
411
+    
412
+    #ifdef HEATER_2_USES_AD595
413
+      current_raw[2] = raw_temp_2_value;
414
+    #else
411 415
       current_raw[2] = 16383 - raw_temp_2_value;
412 416
     #endif
413 417
     

+ 385
- 124
Marlin/thermistortables.h Visa fil

@@ -2,148 +2,409 @@
2 2
 #define THERMISTORTABLES_H_
3 3
 
4 4
 #define OVERSAMPLENR 16
5
-#if (THERMISTORHEATER == 1) || (THERMISTORBED == 1) //100k bed thermistor
6 5
 
6
+#if (THERMISTORHEATER_1 == 1) || (THERMISTORHEATER_2 == 1) || (THERMISTORBED == 1) //100k bed thermistor
7 7
 
8 8
 #define NUMTEMPS_1 61
9 9
 const short temptable_1[NUMTEMPS_1][2] = {
10
-{	(23*OVERSAMPLENR)	,	300	},
11
-{	(25*OVERSAMPLENR)	,	295	},
12
-{	(27*OVERSAMPLENR)	,	290	},
13
-{	(28*OVERSAMPLENR)	,	285	},
14
-{	(31*OVERSAMPLENR)	,	280	},
15
-{	(33*OVERSAMPLENR)	,	275	},
16
-{	(35*OVERSAMPLENR)	,	270	},
17
-{	(38*OVERSAMPLENR)	,	265	},
18
-{	(41*OVERSAMPLENR)	,	260	},
19
-{	(44*OVERSAMPLENR)	,	255	},
20
-{	(48*OVERSAMPLENR)	,	250	},
21
-{	(52*OVERSAMPLENR)	,	245	},
22
-{	(56*OVERSAMPLENR)	,	240	},
23
-{	(61*OVERSAMPLENR)	,	235	},
24
-{	(66*OVERSAMPLENR)	,	230	},
25
-{	(71*OVERSAMPLENR)	,	225	},
26
-{	(78*OVERSAMPLENR)	,	220	},
27
-{	(84*OVERSAMPLENR)	,	215	},
28
-{	(92*OVERSAMPLENR)	,	210	},
29
-{	(100*OVERSAMPLENR),	205	},
30
-{	(109*OVERSAMPLENR),	200	},
31
-{	(120*OVERSAMPLENR),	195	},
32
-{	(131*OVERSAMPLENR),	190	},
33
-{	(143*OVERSAMPLENR),	185	},
34
-{	(156*OVERSAMPLENR),	180	},
35
-{	(171*OVERSAMPLENR),	175	},
36
-{	(187*OVERSAMPLENR),	170	},
37
-{	(205*OVERSAMPLENR),	165	},
38
-{	(224*OVERSAMPLENR),	160	},
39
-{	(245*OVERSAMPLENR),	155	},
40
-{	(268*OVERSAMPLENR),	150	},
41
-{	(293*OVERSAMPLENR),	145	},
42
-{	(320*OVERSAMPLENR),	140	},
43
-{	(348*OVERSAMPLENR),	135	},
44
-{	(379*OVERSAMPLENR),	130	},
45
-{	(411*OVERSAMPLENR),	125	},
46
-{	(445*OVERSAMPLENR),	120	},
47
-{	(480*OVERSAMPLENR),	115	},
48
-{	(516*OVERSAMPLENR),	110	},
49
-{	(553*OVERSAMPLENR),	105	},
50
-{	(591*OVERSAMPLENR),	100	},
51
-{	(628*OVERSAMPLENR),	95	},
52
-{	(665*OVERSAMPLENR),	90	},
53
-{	(702*OVERSAMPLENR),	85	},
54
-{	(737*OVERSAMPLENR),	80	},
55
-{	(770*OVERSAMPLENR),	75	},
56
-{	(801*OVERSAMPLENR),	70	},
57
-{	(830*OVERSAMPLENR),	65	},
58
-{	(857*OVERSAMPLENR),	60	},
59
-{	(881*OVERSAMPLENR),	55	},
60
-{	(903*OVERSAMPLENR),	50	},
61
-{	(922*OVERSAMPLENR),	45	},
62
-{	(939*OVERSAMPLENR),	40	},
63
-{	(954*OVERSAMPLENR),	35	},
64
-{	(966*OVERSAMPLENR),	30	},
65
-{	(977*OVERSAMPLENR),	25	},
66
-{	(985*OVERSAMPLENR),	20	},
67
-{	(993*OVERSAMPLENR),	15	},
68
-{	(999*OVERSAMPLENR),	10	},
69
-{	(1004*OVERSAMPLENR),	5	},
70
-{	(1008*OVERSAMPLENR),	0	} //safety
10
+{	23*OVERSAMPLENR	,	300	},
11
+{	25*OVERSAMPLENR	,	295	},
12
+{	27*OVERSAMPLENR	,	290	},
13
+{	28*OVERSAMPLENR	,	285	},
14
+{	31*OVERSAMPLENR	,	280	},
15
+{	33*OVERSAMPLENR	,	275	},
16
+{	35*OVERSAMPLENR	,	270	},
17
+{	38*OVERSAMPLENR	,	265	},
18
+{	41*OVERSAMPLENR	,	260	},
19
+{	44*OVERSAMPLENR	,	255	},
20
+{	48*OVERSAMPLENR	,	250	},
21
+{	52*OVERSAMPLENR	,	245	},
22
+{	56*OVERSAMPLENR	,	240	},
23
+{	61*OVERSAMPLENR	,	235	},
24
+{	66*OVERSAMPLENR	,	230	},
25
+{	71*OVERSAMPLENR	,	225	},
26
+{	78*OVERSAMPLENR	,	220	},
27
+{	84*OVERSAMPLENR	,	215	},
28
+{	92*OVERSAMPLENR	,	210	},
29
+{	100*OVERSAMPLENR	,	205	},
30
+{	109*OVERSAMPLENR	,	200	},
31
+{	120*OVERSAMPLENR	,	195	},
32
+{	131*OVERSAMPLENR	,	190	},
33
+{	143*OVERSAMPLENR	,	185	},
34
+{	156*OVERSAMPLENR	,	180	},
35
+{	171*OVERSAMPLENR	,	175	},
36
+{	187*OVERSAMPLENR	,	170	},
37
+{	205*OVERSAMPLENR	,	165	},
38
+{	224*OVERSAMPLENR	,	160	},
39
+{	245*OVERSAMPLENR	,	155	},
40
+{	268*OVERSAMPLENR	,	150	},
41
+{	293*OVERSAMPLENR	,	145	},
42
+{	320*OVERSAMPLENR	,	140	},
43
+{	348*OVERSAMPLENR	,	135	},
44
+{	379*OVERSAMPLENR	,	130	},
45
+{	411*OVERSAMPLENR	,	125	},
46
+{	445*OVERSAMPLENR	,	120	},
47
+{	480*OVERSAMPLENR	,	115	},
48
+{	516*OVERSAMPLENR	,	110	},
49
+{	553*OVERSAMPLENR	,	105	},
50
+{	591*OVERSAMPLENR	,	100	},
51
+{	628*OVERSAMPLENR	,	95	},
52
+{	665*OVERSAMPLENR	,	90	},
53
+{	702*OVERSAMPLENR	,	85	},
54
+{	737*OVERSAMPLENR	,	80	},
55
+{	770*OVERSAMPLENR	,	75	},
56
+{	801*OVERSAMPLENR	,	70	},
57
+{	830*OVERSAMPLENR	,	65	},
58
+{	857*OVERSAMPLENR	,	60	},
59
+{	881*OVERSAMPLENR	,	55	},
60
+{	903*OVERSAMPLENR	,	50	},
61
+{	922*OVERSAMPLENR	,	45	},
62
+{	939*OVERSAMPLENR	,	40	},
63
+{	954*OVERSAMPLENR	,	35	},
64
+{	966*OVERSAMPLENR	,	30	},
65
+{	977*OVERSAMPLENR	,	25	},
66
+{	985*OVERSAMPLENR	,	20	},
67
+{	993*OVERSAMPLENR	,	15	},
68
+{	999*OVERSAMPLENR	,	10	},
69
+{	1004*OVERSAMPLENR	,	5	},
70
+{	1008*OVERSAMPLENR	,	0	} //safety
71 71
 };
72 72
 #endif
73
-#if (THERMISTORHEATER == 2) || (THERMISTORBED == 2) //200k bed thermistor
73
+#if (THERMISTORHEATER_1 == 2) || (THERMISTORHEATER_2 == 2) || (THERMISTORBED == 2) //200k bed thermistor
74 74
 #define NUMTEMPS_2 21
75 75
 const short temptable_2[NUMTEMPS_2][2] = {
76
-   {(1*OVERSAMPLENR), 848},
77
-   {(54*OVERSAMPLENR), 275},
78
-   {(107*OVERSAMPLENR), 228},
79
-   {(160*OVERSAMPLENR), 202},
80
-   {(213*OVERSAMPLENR), 185},
81
-   {(266*OVERSAMPLENR), 171},
82
-   {(319*OVERSAMPLENR), 160},
83
-   {(372*OVERSAMPLENR), 150},
84
-   {(425*OVERSAMPLENR), 141},
85
-   {(478*OVERSAMPLENR), 133},
86
-   {(531*OVERSAMPLENR), 125},
87
-   {(584*OVERSAMPLENR), 118},
88
-   {(637*OVERSAMPLENR), 110},
89
-   {(690*OVERSAMPLENR), 103},
90
-   {(743*OVERSAMPLENR), 95},
91
-   {(796*OVERSAMPLENR), 86},
92
-   {(849*OVERSAMPLENR), 77},
93
-   {(902*OVERSAMPLENR), 65},
94
-   {(955*OVERSAMPLENR), 49},
95
-   {(1008*OVERSAMPLENR), 17},
96
-   {(1020*OVERSAMPLENR), 0} //safety
76
+   {1*OVERSAMPLENR, 848},
77
+   {54*OVERSAMPLENR, 275},
78
+   {107*OVERSAMPLENR, 228},
79
+   {160*OVERSAMPLENR, 202},
80
+   {213*OVERSAMPLENR, 185},
81
+   {266*OVERSAMPLENR, 171},
82
+   {319*OVERSAMPLENR, 160},
83
+   {372*OVERSAMPLENR, 150},
84
+   {425*OVERSAMPLENR, 141},
85
+   {478*OVERSAMPLENR, 133},
86
+   {531*OVERSAMPLENR, 125},
87
+   {584*OVERSAMPLENR, 118},
88
+   {637*OVERSAMPLENR, 110},
89
+   {690*OVERSAMPLENR, 103},
90
+   {743*OVERSAMPLENR, 95},
91
+   {796*OVERSAMPLENR, 86},
92
+   {849*OVERSAMPLENR, 77},
93
+   {902*OVERSAMPLENR, 65},
94
+   {955*OVERSAMPLENR, 49},
95
+   {1008*OVERSAMPLENR, 17},
96
+   {1020*OVERSAMPLENR, 0} //safety
97 97
 };
98 98
 
99 99
 #endif
100
-#if (THERMISTORHEATER == 3) || (THERMISTORBED == 3) //mendel-parts
100
+#if (THERMISTORHEATER_1 == 3) || (THERMISTORHEATER_2 == 3) || (THERMISTORBED == 3) //mendel-parts
101 101
 #define NUMTEMPS_3 28
102 102
 const short temptable_3[NUMTEMPS_3][2] = {
103
-		{(1*OVERSAMPLENR),864},
104
-		{(21*OVERSAMPLENR),300},
105
-		{(25*OVERSAMPLENR),290},
106
-		{(29*OVERSAMPLENR),280},
107
-		{(33*OVERSAMPLENR),270},
108
-		{(39*OVERSAMPLENR),260},
109
-		{(46*OVERSAMPLENR),250},
110
-		{(54*OVERSAMPLENR),240},
111
-		{(64*OVERSAMPLENR),230},
112
-		{(75*OVERSAMPLENR),220},
113
-		{(90*OVERSAMPLENR),210},
114
-		{(107*OVERSAMPLENR),200},
115
-		{(128*OVERSAMPLENR),190},
116
-		{(154*OVERSAMPLENR),180},
117
-		{(184*OVERSAMPLENR),170},
118
-		{(221*OVERSAMPLENR),160},
119
-		{(265*OVERSAMPLENR),150},
120
-		{(316*OVERSAMPLENR),140},
121
-		{(375*OVERSAMPLENR),130},
122
-		{(441*OVERSAMPLENR),120},
123
-		{(513*OVERSAMPLENR),110},
124
-		{(588*OVERSAMPLENR),100},
125
-		{(734*OVERSAMPLENR),80},
126
-		{(856*OVERSAMPLENR),60},
127
-		{(938*OVERSAMPLENR),40},
128
-		{(986*OVERSAMPLENR),20},
129
-		{(1008*OVERSAMPLENR),0},
130
-		{(1018*OVERSAMPLENR),-20}
103
+		{1*OVERSAMPLENR,864},
104
+		{21*OVERSAMPLENR,300},
105
+		{25*OVERSAMPLENR,290},
106
+		{29*OVERSAMPLENR,280},
107
+		{33*OVERSAMPLENR,270},
108
+		{39*OVERSAMPLENR,260},
109
+		{46*OVERSAMPLENR,250},
110
+		{54*OVERSAMPLENR,240},
111
+		{64*OVERSAMPLENR,230},
112
+		{75*OVERSAMPLENR,220},
113
+		{90*OVERSAMPLENR,210},
114
+		{107*OVERSAMPLENR,200},
115
+		{128*OVERSAMPLENR,190},
116
+		{154*OVERSAMPLENR,180},
117
+		{184*OVERSAMPLENR,170},
118
+		{221*OVERSAMPLENR,160},
119
+		{265*OVERSAMPLENR,150},
120
+		{316*OVERSAMPLENR,140},
121
+		{375*OVERSAMPLENR,130},
122
+		{441*OVERSAMPLENR,120},
123
+		{513*OVERSAMPLENR,110},
124
+		{588*OVERSAMPLENR,100},
125
+		{734*OVERSAMPLENR,80},
126
+		{856*OVERSAMPLENR,60},
127
+		{938*OVERSAMPLENR,40},
128
+		{986*OVERSAMPLENR,20},
129
+		{1008*OVERSAMPLENR,0},
130
+		{1018*OVERSAMPLENR,-20}
131 131
 	};
132 132
 
133 133
 #endif
134
+#if (THERMISTORHEATER_1 == 4) || (THERMISTORHEATER_2 == 4) || (THERMISTORBED == 4) //10k thermistor
134 135
 
135
-#if THERMISTORHEATER == 1
136
-#define NUMTEMPS NUMTEMPS_1
137
-#define temptable temptable_1
138
-#elif THERMISTORHEATER == 2
139
-#define NUMTEMPS NUMTEMPS_2
140
-#define temptable temptable_2
141
-#elif THERMISTORHEATER == 3
142
-#define NUMTEMPS NUMTEMPS_3
143
-#define temptable temptable_3
144
-#else
145
-#error No heater thermistor table specified
136
+#define NUMTEMPS_4 20
137
+short temptable_4[NUMTEMPS_4][2] = {
138
+   {1*OVERSAMPLENR, 430},
139
+   {54*OVERSAMPLENR, 137},
140
+   {107*OVERSAMPLENR, 107},
141
+   {160*OVERSAMPLENR, 91},
142
+   {213*OVERSAMPLENR, 80},
143
+   {266*OVERSAMPLENR, 71},
144
+   {319*OVERSAMPLENR, 64},
145
+   {372*OVERSAMPLENR, 57},
146
+   {425*OVERSAMPLENR, 51},
147
+   {478*OVERSAMPLENR, 46},
148
+   {531*OVERSAMPLENR, 41},
149
+   {584*OVERSAMPLENR, 35},
150
+   {637*OVERSAMPLENR, 30},
151
+   {690*OVERSAMPLENR, 25},
152
+   {743*OVERSAMPLENR, 20},
153
+   {796*OVERSAMPLENR, 14},
154
+   {849*OVERSAMPLENR, 7},
155
+   {902*OVERSAMPLENR, 0},
156
+   {955*OVERSAMPLENR, -11},
157
+   {1008*OVERSAMPLENR, -35}
158
+};
159
+#endif
160
+
161
+#if (THERMISTORHEATER_1 == 5) || (THERMISTORHEATER_2 == 5) || (THERMISTORBED == 5) //100k ParCan thermistor (104GT-2)
162
+
163
+#define NUMTEMPS_5 61
164
+const short temptable_5[NUMTEMPS_5][2] = {
165
+{1*OVERSAMPLENR, 713},
166
+{18*OVERSAMPLENR, 316},
167
+{35*OVERSAMPLENR, 266},
168
+{52*OVERSAMPLENR, 239},
169
+{69*OVERSAMPLENR, 221},
170
+{86*OVERSAMPLENR, 208},
171
+{103*OVERSAMPLENR, 197},
172
+{120*OVERSAMPLENR, 188},
173
+{137*OVERSAMPLENR, 181},
174
+{154*OVERSAMPLENR, 174},
175
+{171*OVERSAMPLENR, 169},
176
+{188*OVERSAMPLENR, 163},
177
+{205*OVERSAMPLENR, 159},
178
+{222*OVERSAMPLENR, 154},
179
+{239*OVERSAMPLENR, 150},
180
+{256*OVERSAMPLENR, 147},
181
+{273*OVERSAMPLENR, 143},
182
+{290*OVERSAMPLENR, 140},
183
+{307*OVERSAMPLENR, 136},
184
+{324*OVERSAMPLENR, 133},
185
+{341*OVERSAMPLENR, 130},
186
+{358*OVERSAMPLENR, 128},
187
+{375*OVERSAMPLENR, 125},
188
+{392*OVERSAMPLENR, 122},
189
+{409*OVERSAMPLENR, 120},
190
+{426*OVERSAMPLENR, 117},
191
+{443*OVERSAMPLENR, 115},
192
+{460*OVERSAMPLENR, 112},
193
+{477*OVERSAMPLENR, 110},
194
+{494*OVERSAMPLENR, 108},
195
+{511*OVERSAMPLENR, 106},
196
+{528*OVERSAMPLENR, 103},
197
+{545*OVERSAMPLENR, 101},
198
+{562*OVERSAMPLENR, 99},
199
+{579*OVERSAMPLENR, 97},
200
+{596*OVERSAMPLENR, 95},
201
+{613*OVERSAMPLENR, 92},
202
+{630*OVERSAMPLENR, 90},
203
+{647*OVERSAMPLENR, 88},
204
+{664*OVERSAMPLENR, 86},
205
+{681*OVERSAMPLENR, 84},
206
+{698*OVERSAMPLENR, 81},
207
+{715*OVERSAMPLENR, 79},
208
+{732*OVERSAMPLENR, 77},
209
+{749*OVERSAMPLENR, 75},
210
+{766*OVERSAMPLENR, 72},
211
+{783*OVERSAMPLENR, 70},
212
+{800*OVERSAMPLENR, 67},
213
+{817*OVERSAMPLENR, 64},
214
+{834*OVERSAMPLENR, 61},
215
+{851*OVERSAMPLENR, 58},
216
+{868*OVERSAMPLENR, 55},
217
+{885*OVERSAMPLENR, 52},
218
+{902*OVERSAMPLENR, 48},
219
+{919*OVERSAMPLENR, 44},
220
+{936*OVERSAMPLENR, 40},
221
+{953*OVERSAMPLENR, 34},
222
+{970*OVERSAMPLENR, 28},
223
+{987*OVERSAMPLENR, 20},
224
+{1004*OVERSAMPLENR, 8},
225
+{1021*OVERSAMPLENR, 0}
226
+};
227
+#endif
228
+
229
+#if (THERMISTORHEATER_1 == 6) || (THERMISTORHEATER_2 == 6) || (THERMISTORBED == 6) // 100k Epcos thermistor
230
+#define NUMTEMPS_6 36
231
+const short temptable_6[NUMTEMPS_6][2] = {
232
+   {28*OVERSAMPLENR, 250},
233
+   {31*OVERSAMPLENR, 245},
234
+   {35*OVERSAMPLENR, 240},
235
+   {39*OVERSAMPLENR, 235},
236
+   {42*OVERSAMPLENR, 230},
237
+   {44*OVERSAMPLENR, 225},
238
+   {49*OVERSAMPLENR, 220},
239
+   {53*OVERSAMPLENR, 215},
240
+   {62*OVERSAMPLENR, 210},
241
+   {73*OVERSAMPLENR, 205},
242
+   {72*OVERSAMPLENR, 200},
243
+   {94*OVERSAMPLENR, 190},
244
+   {102*OVERSAMPLENR, 185},
245
+   {116*OVERSAMPLENR, 170},
246
+   {143*OVERSAMPLENR, 160},
247
+   {183*OVERSAMPLENR, 150},
248
+   {223*OVERSAMPLENR, 140},
249
+   {270*OVERSAMPLENR, 130},
250
+   {318*OVERSAMPLENR, 120},
251
+   {383*OVERSAMPLENR, 110},
252
+   {413*OVERSAMPLENR, 105},
253
+   {439*OVERSAMPLENR, 100},
254
+   {484*OVERSAMPLENR, 95},
255
+   {513*OVERSAMPLENR, 90},
256
+   {607*OVERSAMPLENR, 80},
257
+   {664*OVERSAMPLENR, 70},
258
+   {781*OVERSAMPLENR, 60},
259
+   {810*OVERSAMPLENR, 55},
260
+   {849*OVERSAMPLENR, 50},
261
+   {914*OVERSAMPLENR, 45},
262
+   {914*OVERSAMPLENR, 40},
263
+   {935*OVERSAMPLENR, 35},
264
+   {954*OVERSAMPLENR, 30},
265
+   {970*OVERSAMPLENR, 25},
266
+   {978*OVERSAMPLENR, 22},
267
+   {1008*OVERSAMPLENR, 3}
268
+};
269
+#endif
270
+
271
+#if (THERMISTORHEATER_1 == 7) || (THERMISTORHEATER_2 == 7) || (THERMISTORBED == 7) // 100k Honeywell 135-104LAG-J01
272
+#define NUMTEMPS_7 54
273
+const short temptable_7[NUMTEMPS_7][2] = {
274
+   {46*OVERSAMPLENR, 270},
275
+   {50*OVERSAMPLENR, 265},
276
+   {54*OVERSAMPLENR, 260},
277
+   {58*OVERSAMPLENR, 255},
278
+   {62*OVERSAMPLENR, 250},
279
+   {67*OVERSAMPLENR, 245},
280
+   {72*OVERSAMPLENR, 240},
281
+   {79*OVERSAMPLENR, 235},
282
+   {85*OVERSAMPLENR, 230},
283
+   {91*OVERSAMPLENR, 225},
284
+   {99*OVERSAMPLENR, 220},
285
+   {107*OVERSAMPLENR, 215},
286
+   {116*OVERSAMPLENR, 210},
287
+   {126*OVERSAMPLENR, 205},
288
+   {136*OVERSAMPLENR, 200},
289
+   {149*OVERSAMPLENR, 195},
290
+   {160*OVERSAMPLENR, 190},
291
+   {175*OVERSAMPLENR, 185},
292
+   {191*OVERSAMPLENR, 180},
293
+   {209*OVERSAMPLENR, 175},
294
+   {224*OVERSAMPLENR, 170},
295
+   {246*OVERSAMPLENR, 165},
296
+   {267*OVERSAMPLENR, 160},
297
+   {293*OVERSAMPLENR, 155},
298
+   {316*OVERSAMPLENR, 150},
299
+   {340*OVERSAMPLENR, 145},
300
+   {364*OVERSAMPLENR, 140},
301
+   {396*OVERSAMPLENR, 135},
302
+   {425*OVERSAMPLENR, 130},
303
+   {460*OVERSAMPLENR, 125},
304
+   {489*OVERSAMPLENR, 120},
305
+   {526*OVERSAMPLENR, 115},
306
+   {558*OVERSAMPLENR, 110},
307
+   {591*OVERSAMPLENR, 105},
308
+   {628*OVERSAMPLENR, 100},
309
+   {660*OVERSAMPLENR, 95},
310
+   {696*OVERSAMPLENR, 90},
311
+   {733*OVERSAMPLENR, 85},
312
+   {761*OVERSAMPLENR, 80},
313
+   {794*OVERSAMPLENR, 75},
314
+   {819*OVERSAMPLENR, 70},
315
+   {847*OVERSAMPLENR, 65},
316
+   {870*OVERSAMPLENR, 60},
317
+   {892*OVERSAMPLENR, 55},
318
+   {911*OVERSAMPLENR, 50},
319
+   {929*OVERSAMPLENR, 45},
320
+   {944*OVERSAMPLENR, 40},
321
+   {959*OVERSAMPLENR, 35},
322
+   {971*OVERSAMPLENR, 30},
323
+   {981*OVERSAMPLENR, 25},
324
+   {989*OVERSAMPLENR, 20},
325
+   {994*OVERSAMPLENR, 15},
326
+   {1001*OVERSAMPLENR, 10},
327
+   {1005*OVERSAMPLENR, 5}
328
+};
329
+#endif
330
+
331
+
332
+
333
+#if THERMISTORHEATER_1 == 1
334
+#define NUMTEMPS_HEATER_1 NUMTEMPS_1
335
+#define temptable_1 temptable_1
336
+#elif THERMISTORHEATER_1 == 2
337
+#define NUMTEMPS_HEATER_1 NUMTEMPS_2
338
+#define temptable_1 temptable_2
339
+#elif THERMISTORHEATER_1 == 3
340
+#define NUMTEMPS_HEATER_1 NUMTEMPS_3
341
+#define temptable_1 temptable_3
342
+#elif THERMISTORHEATER_1 == 4
343
+#define NUMTEMPS_HEATER_1 NUMTEMPS_4
344
+#define temptable_1 temptable_4
345
+#elif THERMISTORHEATER_1 == 5
346
+#define NUMTEMPS_HEATER_1 NUMTEMPS_5
347
+#define temptable_1 temptable_5
348
+#elif THERMISTORHEATER_1 == 6
349
+#define NUMTEMPS_HEATER_1 NUMTEMPS_6
350
+#define temptable_1 temptable_6
351
+#elif THERMISTORHEATER_1 == 7
352
+#define NUMTEMPS_HEATER_1 NUMTEMPS_7
353
+#define temptable_1 temptable_7
354
+#elif defined HEATER_1_USES_THERMISTOR
355
+#error No heater 1 thermistor table specified
356
+#endif
357
+
358
+#if THERMISTORHEATER_2 == 1
359
+#define NUMTEMPS_HEATER_2 NUMTEMPS_1
360
+#define temptable_2 temptable_1
361
+#elif THERMISTORHEATER_2 == 2
362
+#define NUMTEMPS_HEATER_2 NUMTEMPS_2
363
+#define temptable_2 temptable_2
364
+#elif THERMISTORHEATER_2 == 3
365
+#define NUMTEMPS_HEATER_2 NUMTEMPS_3
366
+#define temptable_2 temptable_3
367
+#elif THERMISTORHEATER_2 == 4
368
+#define NUMTEMPS_HEATER_2 NUMTEMPS_4
369
+#define temptable_2 temptable_4
370
+#elif THERMISTORHEATER_2 == 5
371
+#define NUMTEMPS_HEATER_2 NUMTEMPS_5
372
+#define temptable_2 temptable_5
373
+#elif THERMISTORHEATER_2 == 6
374
+#define NUMTEMPS_HEATER_2 NUMTEMPS_6
375
+#define temptable_2 temptable_6
376
+#elif THERMISTORHEATER_2 == 7
377
+#define NUMTEMPS_HEATER22 NUMTEMPS_7
378
+#define temptable_2 temptable_7
379
+#elif defined HEATER_2_USES_THERMISTOR
380
+#error No heater 2 thermistor table specified
146 381
 #endif
147 382
 
148 383
 
384
+#if THERMISTORBED == 1
385
+#define BNUMTEMPS NUMTEMPS_1
386
+#define bedtemptable temptable_1
387
+#elif THERMISTORBED == 2
388
+#define BNUMTEMPS NUMTEMPS_2
389
+#define bedtemptable temptable_2
390
+#elif THERMISTORBED == 3
391
+#define BNUMTEMPS NUMTEMPS_3
392
+#define bedtemptable temptable_3
393
+#elif THERMISTORBED == 4
394
+#define BNUMTEMPS NUMTEMPS_4
395
+#define bedtemptable temptable_4
396
+#elif THERMISTORBED == 5
397
+#define BNUMTEMPS NUMTEMPS_5
398
+#define bedtemptable temptable_5
399
+#elif THERMISTORBED == 6
400
+#define BNUMTEMPS NUMTEMPS_6
401
+#define bedtemptable temptable_6
402
+#elif THERMISTORBED == 7
403
+#define BNUMTEMPS NUMTEMPS_7
404
+#define bedtemptable temptable_7
405
+#elif defined BED_USES_THERMISTOR
406
+#error No bed thermistor table specified
407
+#endif
408
+
149 409
 #endif //THERMISTORTABLES_H_
410
+

Laddar…
Avbryt
Spara