Commit 9110b1271cdb23483c5f923a3c266a160f4bab46
1 parent
17cc306f
New values
Showing
1 changed file
with
772 additions
and
10 deletions
Show diff stats
1 | #include <avr/io.h> | 1 | #include <avr/io.h> |
2 | #include <util/delay.h> | 2 | #include <util/delay.h> |
3 | 3 | ||
4 | + | ||
5 | +#define TMP0 932 | ||
6 | +#define TMP1 931 | ||
7 | +#define TMP2 929 | ||
8 | +#define TMP3 928 | ||
9 | +#define TMP4 927 | ||
10 | +#define TMP5 925 | ||
11 | +#define TMP6 924 | ||
12 | +#define TMP7 923 | ||
13 | +#define TMP8 921 | ||
14 | +#define TMP9 920 | ||
15 | +#define TMP10 918 | ||
16 | +#define TMP11 917 | ||
17 | +#define TMP12 916 | ||
18 | +#define TMP13 914 | ||
19 | +#define TMP14 913 | ||
20 | +#define TMP15 911 | ||
21 | +#define TMP16 910 | ||
22 | +#define TMP17 908 | ||
23 | +#define TMP18 907 | ||
24 | +#define TMP19 905 | ||
25 | +#define TMP20 904 | ||
26 | +#define TMP21 902 | ||
27 | +#define TMP22 900 | ||
28 | +#define TMP23 899 | ||
29 | +#define TMP24 897 | ||
30 | +#define TMP25 896 | ||
31 | +#define TMP26 894 | ||
32 | +#define TMP27 892 | ||
33 | +#define TMP28 891 | ||
34 | +#define TMP29 889 | ||
35 | +#define TMP30 887 | ||
36 | +#define TMP31 886 | ||
37 | +#define TMP32 884 | ||
38 | +#define TMP33 882 | ||
39 | +#define TMP34 880 | ||
40 | +#define TMP35 879 | ||
41 | +#define TMP36 877 | ||
42 | +#define TMP37 875 | ||
43 | +#define TMP38 873 | ||
44 | +#define TMP39 871 | ||
45 | +#define TMP40 869 | ||
46 | +#define TMP41 868 | ||
47 | +#define TMP42 866 | ||
48 | +#define TMP43 864 | ||
49 | +#define TMP44 862 | ||
50 | +#define TMP45 860 | ||
51 | +#define TMP46 858 | ||
52 | +#define TMP47 856 | ||
53 | +#define TMP48 854 | ||
54 | +#define TMP49 852 | ||
55 | +#define TMP50 850 | ||
56 | +#define TMP51 848 | ||
57 | +#define TMP52 846 | ||
58 | +#define TMP53 844 | ||
59 | +#define TMP54 842 | ||
60 | +#define TMP55 840 | ||
61 | +#define TMP56 838 | ||
62 | +#define TMP57 836 | ||
63 | +#define TMP58 834 | ||
64 | +#define TMP59 832 | ||
65 | +#define TMP60 830 | ||
66 | +#define TMP61 828 | ||
67 | +#define TMP62 825 | ||
68 | +#define TMP63 823 | ||
69 | +#define TMP64 821 | ||
70 | +#define TMP65 819 | ||
71 | +#define TMP66 817 | ||
72 | +#define TMP67 814 | ||
73 | +#define TMP68 812 | ||
74 | +#define TMP69 810 | ||
75 | +#define TMP70 808 | ||
76 | +#define TMP71 805 | ||
77 | +#define TMP72 803 | ||
78 | +#define TMP73 801 | ||
79 | +#define TMP74 799 | ||
80 | +#define TMP75 796 | ||
81 | +#define TMP76 794 | ||
82 | +#define TMP77 792 | ||
83 | +#define TMP78 789 | ||
84 | +#define TMP79 787 | ||
85 | +#define TMP80 784 | ||
86 | +#define TMP81 782 | ||
87 | +#define TMP82 780 | ||
88 | +#define TMP83 777 | ||
89 | +#define TMP84 775 | ||
90 | +#define TMP85 772 | ||
91 | +#define TMP86 770 | ||
92 | +#define TMP87 767 | ||
93 | +#define TMP88 765 | ||
94 | +#define TMP89 762 | ||
95 | +#define TMP90 760 | ||
96 | +#define TMP91 757 | ||
97 | +#define TMP92 755 | ||
98 | +#define TMP93 752 | ||
99 | +#define TMP94 750 | ||
100 | +#define TMP95 747 | ||
101 | +#define TMP96 745 | ||
102 | +#define TMP97 742 | ||
103 | +#define TMP98 740 | ||
104 | +#define TMP99 737 | ||
105 | +#define TMP100 734 | ||
106 | +#define TMP101 732 | ||
107 | +#define TMP102 729 | ||
108 | +#define TMP103 727 | ||
109 | +#define TMP104 724 | ||
110 | +#define TMP105 721 | ||
111 | +#define TMP106 719 | ||
112 | +#define TMP107 716 | ||
113 | +#define TMP108 713 | ||
114 | +#define TMP109 711 | ||
115 | +#define TMP110 708 | ||
116 | +#define TMP111 705 | ||
117 | +#define TMP112 703 | ||
118 | +#define TMP113 700 | ||
119 | +#define TMP114 697 | ||
120 | +#define TMP115 694 | ||
121 | +#define TMP116 692 | ||
122 | +#define TMP117 689 | ||
123 | +#define TMP118 686 | ||
124 | +#define TMP119 684 | ||
125 | +#define TMP120 681 | ||
126 | +#define TMP121 678 | ||
127 | +#define TMP122 675 | ||
128 | +#define TMP123 673 | ||
129 | +#define TMP124 670 | ||
130 | +#define TMP125 667 | ||
131 | +#define TMP126 664 | ||
132 | +#define TMP127 661 | ||
133 | +#define TMP128 659 | ||
134 | +#define TMP129 656 | ||
135 | +#define TMP130 653 | ||
136 | +#define TMP131 650 | ||
137 | +#define TMP132 647 | ||
138 | +#define TMP133 645 | ||
139 | +#define TMP134 642 | ||
140 | +#define TMP135 639 | ||
141 | +#define TMP136 636 | ||
142 | +#define TMP137 633 | ||
143 | +#define TMP138 631 | ||
144 | +#define TMP139 628 | ||
145 | +#define TMP140 625 | ||
146 | +#define TMP141 622 | ||
147 | +#define TMP142 619 | ||
148 | +#define TMP143 616 | ||
149 | +#define TMP144 614 | ||
150 | +#define TMP145 611 | ||
151 | +#define TMP146 608 | ||
152 | +#define TMP147 605 | ||
153 | +#define TMP148 602 | ||
154 | +#define TMP149 599 | ||
155 | +#define TMP150 596 | ||
156 | +#define TMP151 594 | ||
157 | +#define TMP152 591 | ||
158 | +#define TMP153 588 | ||
159 | +#define TMP154 585 | ||
160 | +#define TMP155 582 | ||
161 | +#define TMP156 579 | ||
162 | +#define TMP157 577 | ||
163 | +#define TMP158 574 | ||
164 | +#define TMP159 571 | ||
165 | +#define TMP160 568 | ||
166 | +#define TMP161 565 | ||
167 | +#define TMP162 562 | ||
168 | +#define TMP163 560 | ||
169 | +#define TMP164 557 | ||
170 | +#define TMP165 554 | ||
171 | +#define TMP166 551 | ||
172 | +#define TMP167 548 | ||
173 | +#define TMP168 545 | ||
174 | +#define TMP169 543 | ||
175 | +#define TMP170 540 | ||
176 | +#define TMP171 537 | ||
177 | +#define TMP172 534 | ||
178 | +#define TMP173 531 | ||
179 | +#define TMP174 529 | ||
180 | +#define TMP175 526 | ||
181 | +#define TMP176 523 | ||
182 | +#define TMP177 520 | ||
183 | +#define TMP178 518 | ||
184 | +#define TMP179 515 | ||
185 | +#define TMP180 512 | ||
186 | +#define TMP181 509 | ||
187 | +#define TMP182 506 | ||
188 | +#define TMP183 504 | ||
189 | +#define TMP184 501 | ||
190 | +#define TMP185 498 | ||
191 | +#define TMP186 495 | ||
192 | +#define TMP187 493 | ||
193 | +#define TMP188 490 | ||
194 | +#define TMP189 487 | ||
195 | +#define TMP190 485 | ||
196 | +#define TMP191 482 | ||
197 | +#define TMP192 479 | ||
198 | +#define TMP193 476 | ||
199 | +#define TMP194 474 | ||
200 | +#define TMP195 471 | ||
201 | +#define TMP196 468 | ||
202 | +#define TMP197 466 | ||
203 | +#define TMP198 463 | ||
204 | +#define TMP199 460 | ||
205 | +#define TMP200 458 | ||
206 | +#define TMP201 455 | ||
207 | +#define TMP202 453 | ||
208 | +#define TMP203 450 | ||
209 | +#define TMP204 447 | ||
210 | +#define TMP205 445 | ||
211 | +#define TMP206 442 | ||
212 | +#define TMP207 439 | ||
213 | +#define TMP208 437 | ||
214 | +#define TMP209 434 | ||
215 | +#define TMP210 432 | ||
216 | +#define TMP211 429 | ||
217 | +#define TMP212 427 | ||
218 | +#define TMP213 424 | ||
219 | +#define TMP214 422 | ||
220 | +#define TMP215 419 | ||
221 | +#define TMP216 417 | ||
222 | +#define TMP217 414 | ||
223 | +#define TMP218 412 | ||
224 | +#define TMP219 409 | ||
225 | +#define TMP220 407 | ||
226 | +#define TMP221 404 | ||
227 | +#define TMP222 402 | ||
228 | +#define TMP223 399 | ||
229 | +#define TMP224 397 | ||
230 | +#define TMP225 394 | ||
231 | +#define TMP226 392 | ||
232 | +#define TMP227 389 | ||
233 | +#define TMP228 387 | ||
234 | +#define TMP229 385 | ||
235 | +#define TMP230 382 | ||
236 | +#define TMP231 380 | ||
237 | +#define TMP232 378 | ||
238 | +#define TMP233 375 | ||
239 | +#define TMP234 373 | ||
240 | +#define TMP235 371 | ||
241 | +#define TMP236 368 | ||
242 | +#define TMP237 366 | ||
243 | +#define TMP238 364 | ||
244 | +#define TMP239 361 | ||
245 | +#define TMP240 359 | ||
246 | +#define TMP241 357 | ||
247 | +#define TMP242 355 | ||
248 | +#define TMP243 352 | ||
249 | +#define TMP244 350 | ||
250 | +#define TMP245 348 | ||
251 | +#define TMP246 346 | ||
252 | +#define TMP247 343 | ||
253 | +#define TMP248 341 | ||
254 | +#define TMP249 339 | ||
255 | +#define TMP250 337 | ||
256 | +#define TMP251 335 | ||
257 | +#define TMP252 333 | ||
258 | +#define TMP253 330 | ||
259 | +#define TMP254 328 | ||
260 | +#define TMP255 326 | ||
261 | + | ||
262 | + | ||
263 | + | ||
264 | + | ||
4 | #define CPU_FREQ 16000000L | 265 | #define CPU_FREQ 16000000L |
5 | #define VAL25 895 | 266 | #define VAL25 895 |
6 | #define VAL105 246 | 267 | #define VAL105 246 |
@@ -71,18 +332,519 @@ int main(void) | @@ -71,18 +332,519 @@ int main(void) | ||
71 | while (1) | 332 | while (1) |
72 | { | 333 | { |
73 | temp = analogRead(0); | 334 | temp = analogRead(0); |
74 | - if(temp > VAL25) | ||
75 | - ftemp = 0; | ||
76 | - else if(temp < VAL105) | ||
77 | - { | 335 | + if(temp <= TMP255) |
78 | ftemp = 255; | 336 | ftemp = 255; |
79 | - opto1 = 0; | ||
80 | - } | 337 | + else if(temp <= TMP254) |
338 | + ftemp = 254; | ||
339 | + else if(temp <= TMP253) | ||
340 | + ftemp = 253; | ||
341 | + else if(temp <= TMP252) | ||
342 | + ftemp = 252; | ||
343 | + else if(temp <= TMP251) | ||
344 | + ftemp = 251; | ||
345 | + else if(temp <= TMP250) | ||
346 | + ftemp = 250; | ||
347 | + else if(temp <= TMP249) | ||
348 | + ftemp = 249; | ||
349 | + else if(temp <= TMP248) | ||
350 | + ftemp = 248; | ||
351 | + else if(temp <= TMP247) | ||
352 | + ftemp = 247; | ||
353 | + else if(temp <= TMP246) | ||
354 | + ftemp = 246; | ||
355 | + else if(temp <= TMP245) | ||
356 | + ftemp = 245; | ||
357 | + else if(temp <= TMP244) | ||
358 | + ftemp = 244; | ||
359 | + else if(temp <= TMP243) | ||
360 | + ftemp = 243; | ||
361 | + else if(temp <= TMP242) | ||
362 | + ftemp = 242; | ||
363 | + else if(temp <= TMP241) | ||
364 | + ftemp = 241; | ||
365 | + else if(temp <= TMP240) | ||
366 | + ftemp = 240; | ||
367 | + else if(temp <= TMP239) | ||
368 | + ftemp = 239; | ||
369 | + else if(temp <= TMP238) | ||
370 | + ftemp = 238; | ||
371 | + else if(temp <= TMP237) | ||
372 | + ftemp = 237; | ||
373 | + else if(temp <= TMP236) | ||
374 | + ftemp = 236; | ||
375 | + else if(temp <= TMP235) | ||
376 | + ftemp = 235; | ||
377 | + else if(temp <= TMP234) | ||
378 | + ftemp = 234; | ||
379 | + else if(temp <= TMP233) | ||
380 | + ftemp = 233; | ||
381 | + else if(temp <= TMP232) | ||
382 | + ftemp = 232; | ||
383 | + else if(temp <= TMP231) | ||
384 | + ftemp = 231; | ||
385 | + else if(temp <= TMP230) | ||
386 | + ftemp = 230; | ||
387 | + else if(temp <= TMP229) | ||
388 | + ftemp = 229; | ||
389 | + else if(temp <= TMP228) | ||
390 | + ftemp = 228; | ||
391 | + else if(temp <= TMP227) | ||
392 | + ftemp = 227; | ||
393 | + else if(temp <= TMP226) | ||
394 | + ftemp = 226; | ||
395 | + else if(temp <= TMP225) | ||
396 | + ftemp = 225; | ||
397 | + else if(temp <= TMP224) | ||
398 | + ftemp = 224; | ||
399 | + else if(temp <= TMP223) | ||
400 | + ftemp = 223; | ||
401 | + else if(temp <= TMP222) | ||
402 | + ftemp = 222; | ||
403 | + else if(temp <= TMP221) | ||
404 | + ftemp = 221; | ||
405 | + else if(temp <= TMP220) | ||
406 | + ftemp = 220; | ||
407 | + else if(temp <= TMP219) | ||
408 | + ftemp = 219; | ||
409 | + else if(temp <= TMP218) | ||
410 | + ftemp = 218; | ||
411 | + else if(temp <= TMP217) | ||
412 | + ftemp = 217; | ||
413 | + else if(temp <= TMP216) | ||
414 | + ftemp = 216; | ||
415 | + else if(temp <= TMP215) | ||
416 | + ftemp = 215; | ||
417 | + else if(temp <= TMP214) | ||
418 | + ftemp = 214; | ||
419 | + else if(temp <= TMP213) | ||
420 | + ftemp = 213; | ||
421 | + else if(temp <= TMP212) | ||
422 | + ftemp = 212; | ||
423 | + else if(temp <= TMP211) | ||
424 | + ftemp = 211; | ||
425 | + else if(temp <= TMP210) | ||
426 | + ftemp = 210; | ||
427 | + else if(temp <= TMP209) | ||
428 | + ftemp = 209; | ||
429 | + else if(temp <= TMP208) | ||
430 | + ftemp = 208; | ||
431 | + else if(temp <= TMP207) | ||
432 | + ftemp = 207; | ||
433 | + else if(temp <= TMP206) | ||
434 | + ftemp = 206; | ||
435 | + else if(temp <= TMP205) | ||
436 | + ftemp = 205; | ||
437 | + else if(temp <= TMP204) | ||
438 | + ftemp = 204; | ||
439 | + else if(temp <= TMP203) | ||
440 | + ftemp = 203; | ||
441 | + else if(temp <= TMP202) | ||
442 | + ftemp = 202; | ||
443 | + else if(temp <= TMP201) | ||
444 | + ftemp = 201; | ||
445 | + else if(temp <= TMP200) | ||
446 | + ftemp = 200; | ||
447 | + else if(temp <= TMP199) | ||
448 | + ftemp = 199; | ||
449 | + else if(temp <= TMP198) | ||
450 | + ftemp = 198; | ||
451 | + else if(temp <= TMP197) | ||
452 | + ftemp = 197; | ||
453 | + else if(temp <= TMP196) | ||
454 | + ftemp = 196; | ||
455 | + else if(temp <= TMP195) | ||
456 | + ftemp = 195; | ||
457 | + else if(temp <= TMP194) | ||
458 | + ftemp = 194; | ||
459 | + else if(temp <= TMP193) | ||
460 | + ftemp = 193; | ||
461 | + else if(temp <= TMP192) | ||
462 | + ftemp = 192; | ||
463 | + else if(temp <= TMP191) | ||
464 | + ftemp = 191; | ||
465 | + else if(temp <= TMP190) | ||
466 | + ftemp = 190; | ||
467 | + else if(temp <= TMP189) | ||
468 | + ftemp = 189; | ||
469 | + else if(temp <= TMP188) | ||
470 | + ftemp = 188; | ||
471 | + else if(temp <= TMP187) | ||
472 | + ftemp = 187; | ||
473 | + else if(temp <= TMP186) | ||
474 | + ftemp = 186; | ||
475 | + else if(temp <= TMP185) | ||
476 | + ftemp = 185; | ||
477 | + else if(temp <= TMP184) | ||
478 | + ftemp = 184; | ||
479 | + else if(temp <= TMP183) | ||
480 | + ftemp = 183; | ||
481 | + else if(temp <= TMP182) | ||
482 | + ftemp = 182; | ||
483 | + else if(temp <= TMP181) | ||
484 | + ftemp = 181; | ||
485 | + else if(temp <= TMP180) | ||
486 | + ftemp = 180; | ||
487 | + else if(temp <= TMP179) | ||
488 | + ftemp = 179; | ||
489 | + else if(temp <= TMP178) | ||
490 | + ftemp = 178; | ||
491 | + else if(temp <= TMP177) | ||
492 | + ftemp = 177; | ||
493 | + else if(temp <= TMP176) | ||
494 | + ftemp = 176; | ||
495 | + else if(temp <= TMP175) | ||
496 | + ftemp = 175; | ||
497 | + else if(temp <= TMP174) | ||
498 | + ftemp = 174; | ||
499 | + else if(temp <= TMP173) | ||
500 | + ftemp = 173; | ||
501 | + else if(temp <= TMP172) | ||
502 | + ftemp = 172; | ||
503 | + else if(temp <= TMP171) | ||
504 | + ftemp = 171; | ||
505 | + else if(temp <= TMP170) | ||
506 | + ftemp = 170; | ||
507 | + else if(temp <= TMP169) | ||
508 | + ftemp = 169; | ||
509 | + else if(temp <= TMP168) | ||
510 | + ftemp = 168; | ||
511 | + else if(temp <= TMP167) | ||
512 | + ftemp = 167; | ||
513 | + else if(temp <= TMP166) | ||
514 | + ftemp = 166; | ||
515 | + else if(temp <= TMP165) | ||
516 | + ftemp = 165; | ||
517 | + else if(temp <= TMP164) | ||
518 | + ftemp = 164; | ||
519 | + else if(temp <= TMP163) | ||
520 | + ftemp = 163; | ||
521 | + else if(temp <= TMP162) | ||
522 | + ftemp = 162; | ||
523 | + else if(temp <= TMP161) | ||
524 | + ftemp = 161; | ||
525 | + else if(temp <= TMP160) | ||
526 | + ftemp = 160; | ||
527 | + else if(temp <= TMP159) | ||
528 | + ftemp = 159; | ||
529 | + else if(temp <= TMP158) | ||
530 | + ftemp = 158; | ||
531 | + else if(temp <= TMP157) | ||
532 | + ftemp = 157; | ||
533 | + else if(temp <= TMP156) | ||
534 | + ftemp = 156; | ||
535 | + else if(temp <= TMP155) | ||
536 | + ftemp = 155; | ||
537 | + else if(temp <= TMP154) | ||
538 | + ftemp = 154; | ||
539 | + else if(temp <= TMP153) | ||
540 | + ftemp = 153; | ||
541 | + else if(temp <= TMP152) | ||
542 | + ftemp = 152; | ||
543 | + else if(temp <= TMP151) | ||
544 | + ftemp = 151; | ||
545 | + else if(temp <= TMP150) | ||
546 | + ftemp = 150; | ||
547 | + else if(temp <= TMP149) | ||
548 | + ftemp = 149; | ||
549 | + else if(temp <= TMP148) | ||
550 | + ftemp = 148; | ||
551 | + else if(temp <= TMP147) | ||
552 | + ftemp = 147; | ||
553 | + else if(temp <= TMP146) | ||
554 | + ftemp = 146; | ||
555 | + else if(temp <= TMP145) | ||
556 | + ftemp = 145; | ||
557 | + else if(temp <= TMP144) | ||
558 | + ftemp = 144; | ||
559 | + else if(temp <= TMP143) | ||
560 | + ftemp = 143; | ||
561 | + else if(temp <= TMP142) | ||
562 | + ftemp = 142; | ||
563 | + else if(temp <= TMP141) | ||
564 | + ftemp = 141; | ||
565 | + else if(temp <= TMP140) | ||
566 | + ftemp = 140; | ||
567 | + else if(temp <= TMP139) | ||
568 | + ftemp = 139; | ||
569 | + else if(temp <= TMP138) | ||
570 | + ftemp = 138; | ||
571 | + else if(temp <= TMP137) | ||
572 | + ftemp = 137; | ||
573 | + else if(temp <= TMP136) | ||
574 | + ftemp = 136; | ||
575 | + else if(temp <= TMP135) | ||
576 | + ftemp = 135; | ||
577 | + else if(temp <= TMP134) | ||
578 | + ftemp = 134; | ||
579 | + else if(temp <= TMP133) | ||
580 | + ftemp = 133; | ||
581 | + else if(temp <= TMP132) | ||
582 | + ftemp = 132; | ||
583 | + else if(temp <= TMP131) | ||
584 | + ftemp = 131; | ||
585 | + else if(temp <= TMP130) | ||
586 | + ftemp = 130; | ||
587 | + else if(temp <= TMP129) | ||
588 | + ftemp = 129; | ||
589 | + else if(temp <= TMP128) | ||
590 | + ftemp = 128; | ||
591 | + else if(temp <= TMP127) | ||
592 | + ftemp = 127; | ||
593 | + else if(temp <= TMP126) | ||
594 | + ftemp = 126; | ||
595 | + else if(temp <= TMP125) | ||
596 | + ftemp = 125; | ||
597 | + else if(temp <= TMP124) | ||
598 | + ftemp = 124; | ||
599 | + else if(temp <= TMP123) | ||
600 | + ftemp = 123; | ||
601 | + else if(temp <= TMP122) | ||
602 | + ftemp = 122; | ||
603 | + else if(temp <= TMP121) | ||
604 | + ftemp = 121; | ||
605 | + else if(temp <= TMP120) | ||
606 | + ftemp = 120; | ||
607 | + else if(temp <= TMP119) | ||
608 | + ftemp = 119; | ||
609 | + else if(temp <= TMP118) | ||
610 | + ftemp = 118; | ||
611 | + else if(temp <= TMP117) | ||
612 | + ftemp = 117; | ||
613 | + else if(temp <= TMP116) | ||
614 | + ftemp = 116; | ||
615 | + else if(temp <= TMP115) | ||
616 | + ftemp = 115; | ||
617 | + else if(temp <= TMP114) | ||
618 | + ftemp = 114; | ||
619 | + else if(temp <= TMP113) | ||
620 | + ftemp = 113; | ||
621 | + else if(temp <= TMP112) | ||
622 | + ftemp = 112; | ||
623 | + else if(temp <= TMP111) | ||
624 | + ftemp = 111; | ||
625 | + else if(temp <= TMP110) | ||
626 | + ftemp = 110; | ||
627 | + else if(temp <= TMP109) | ||
628 | + ftemp = 109; | ||
629 | + else if(temp <= TMP108) | ||
630 | + ftemp = 108; | ||
631 | + else if(temp <= TMP107) | ||
632 | + ftemp = 107; | ||
633 | + else if(temp <= TMP106) | ||
634 | + ftemp = 106; | ||
635 | + else if(temp <= TMP105) | ||
636 | + ftemp = 105; | ||
637 | + else if(temp <= TMP104) | ||
638 | + ftemp = 104; | ||
639 | + else if(temp <= TMP103) | ||
640 | + ftemp = 103; | ||
641 | + else if(temp <= TMP102) | ||
642 | + ftemp = 102; | ||
643 | + else if(temp <= TMP101) | ||
644 | + ftemp = 101; | ||
645 | + else if(temp <= TMP100) | ||
646 | + ftemp = 100; | ||
647 | + else if(temp <= TMP99) | ||
648 | + ftemp = 99; | ||
649 | + else if(temp <= TMP98) | ||
650 | + ftemp = 98; | ||
651 | + else if(temp <= TMP97) | ||
652 | + ftemp = 97; | ||
653 | + else if(temp <= TMP96) | ||
654 | + ftemp = 96; | ||
655 | + else if(temp <= TMP95) | ||
656 | + ftemp = 95; | ||
657 | + else if(temp <= TMP94) | ||
658 | + ftemp = 94; | ||
659 | + else if(temp <= TMP93) | ||
660 | + ftemp = 93; | ||
661 | + else if(temp <= TMP92) | ||
662 | + ftemp = 92; | ||
663 | + else if(temp <= TMP91) | ||
664 | + ftemp = 91; | ||
665 | + else if(temp <= TMP90) | ||
666 | + ftemp = 90; | ||
667 | + else if(temp <= TMP89) | ||
668 | + ftemp = 89; | ||
669 | + else if(temp <= TMP88) | ||
670 | + ftemp = 88; | ||
671 | + else if(temp <= TMP87) | ||
672 | + ftemp = 87; | ||
673 | + else if(temp <= TMP86) | ||
674 | + ftemp = 86; | ||
675 | + else if(temp <= TMP85) | ||
676 | + ftemp = 85; | ||
677 | + else if(temp <= TMP84) | ||
678 | + ftemp = 84; | ||
679 | + else if(temp <= TMP83) | ||
680 | + ftemp = 83; | ||
681 | + else if(temp <= TMP82) | ||
682 | + ftemp = 82; | ||
683 | + else if(temp <= TMP81) | ||
684 | + ftemp = 81; | ||
685 | + else if(temp <= TMP80) | ||
686 | + ftemp = 80; | ||
687 | + else if(temp <= TMP79) | ||
688 | + ftemp = 79; | ||
689 | + else if(temp <= TMP78) | ||
690 | + ftemp = 78; | ||
691 | + else if(temp <= TMP77) | ||
692 | + ftemp = 77; | ||
693 | + else if(temp <= TMP76) | ||
694 | + ftemp = 76; | ||
695 | + else if(temp <= TMP75) | ||
696 | + ftemp = 75; | ||
697 | + else if(temp <= TMP74) | ||
698 | + ftemp = 74; | ||
699 | + else if(temp <= TMP73) | ||
700 | + ftemp = 73; | ||
701 | + else if(temp <= TMP72) | ||
702 | + ftemp = 72; | ||
703 | + else if(temp <= TMP71) | ||
704 | + ftemp = 71; | ||
705 | + else if(temp <= TMP70) | ||
706 | + ftemp = 70; | ||
707 | + else if(temp <= TMP69) | ||
708 | + ftemp = 69; | ||
709 | + else if(temp <= TMP68) | ||
710 | + ftemp = 68; | ||
711 | + else if(temp <= TMP67) | ||
712 | + ftemp = 67; | ||
713 | + else if(temp <= TMP66) | ||
714 | + ftemp = 66; | ||
715 | + else if(temp <= TMP65) | ||
716 | + ftemp = 65; | ||
717 | + else if(temp <= TMP64) | ||
718 | + ftemp = 64; | ||
719 | + else if(temp <= TMP63) | ||
720 | + ftemp = 63; | ||
721 | + else if(temp <= TMP62) | ||
722 | + ftemp = 62; | ||
723 | + else if(temp <= TMP61) | ||
724 | + ftemp = 61; | ||
725 | + else if(temp <= TMP60) | ||
726 | + ftemp = 60; | ||
727 | + else if(temp <= TMP59) | ||
728 | + ftemp = 59; | ||
729 | + else if(temp <= TMP58) | ||
730 | + ftemp = 58; | ||
731 | + else if(temp <= TMP57) | ||
732 | + ftemp = 57; | ||
733 | + else if(temp <= TMP56) | ||
734 | + ftemp = 56; | ||
735 | + else if(temp <= TMP55) | ||
736 | + ftemp = 55; | ||
737 | + else if(temp <= TMP54) | ||
738 | + ftemp = 54; | ||
739 | + else if(temp <= TMP53) | ||
740 | + ftemp = 53; | ||
741 | + else if(temp <= TMP52) | ||
742 | + ftemp = 52; | ||
743 | + else if(temp <= TMP51) | ||
744 | + ftemp = 51; | ||
745 | + else if(temp <= TMP50) | ||
746 | + ftemp = 50; | ||
747 | + else if(temp <= TMP49) | ||
748 | + ftemp = 49; | ||
749 | + else if(temp <= TMP48) | ||
750 | + ftemp = 48; | ||
751 | + else if(temp <= TMP47) | ||
752 | + ftemp = 47; | ||
753 | + else if(temp <= TMP46) | ||
754 | + ftemp = 46; | ||
755 | + else if(temp <= TMP45) | ||
756 | + ftemp = 45; | ||
757 | + else if(temp <= TMP44) | ||
758 | + ftemp = 44; | ||
759 | + else if(temp <= TMP43) | ||
760 | + ftemp = 43; | ||
761 | + else if(temp <= TMP42) | ||
762 | + ftemp = 42; | ||
763 | + else if(temp <= TMP41) | ||
764 | + ftemp = 41; | ||
765 | + else if(temp <= TMP40) | ||
766 | + ftemp = 40; | ||
767 | + else if(temp <= TMP39) | ||
768 | + ftemp = 39; | ||
769 | + else if(temp <= TMP38) | ||
770 | + ftemp = 38; | ||
771 | + else if(temp <= TMP37) | ||
772 | + ftemp = 37; | ||
773 | + else if(temp <= TMP36) | ||
774 | + ftemp = 36; | ||
775 | + else if(temp <= TMP35) | ||
776 | + ftemp = 35; | ||
777 | + else if(temp <= TMP34) | ||
778 | + ftemp = 34; | ||
779 | + else if(temp <= TMP33) | ||
780 | + ftemp = 33; | ||
781 | + else if(temp <= TMP32) | ||
782 | + ftemp = 32; | ||
783 | + else if(temp <= TMP31) | ||
784 | + ftemp = 31; | ||
785 | + else if(temp <= TMP30) | ||
786 | + ftemp = 30; | ||
787 | + else if(temp <= TMP29) | ||
788 | + ftemp = 29; | ||
789 | + else if(temp <= TMP28) | ||
790 | + ftemp = 28; | ||
791 | + else if(temp <= TMP27) | ||
792 | + ftemp = 27; | ||
793 | + else if(temp <= TMP26) | ||
794 | + ftemp = 26; | ||
795 | + else if(temp <= TMP25) | ||
796 | + ftemp = 25; | ||
797 | + else if(temp <= TMP24) | ||
798 | + ftemp = 24; | ||
799 | + else if(temp <= TMP23) | ||
800 | + ftemp = 23; | ||
801 | + else if(temp <= TMP22) | ||
802 | + ftemp = 22; | ||
803 | + else if(temp <= TMP21) | ||
804 | + ftemp = 21; | ||
805 | + else if(temp <= TMP20) | ||
806 | + ftemp = 20; | ||
807 | + else if(temp <= TMP19) | ||
808 | + ftemp = 19; | ||
809 | + else if(temp <= TMP18) | ||
810 | + ftemp = 18; | ||
811 | + else if(temp <= TMP17) | ||
812 | + ftemp = 17; | ||
813 | + else if(temp <= TMP16) | ||
814 | + ftemp = 16; | ||
815 | + else if(temp <= TMP15) | ||
816 | + ftemp = 15; | ||
817 | + else if(temp <= TMP14) | ||
818 | + ftemp = 14; | ||
819 | + else if(temp <= TMP13) | ||
820 | + ftemp = 13; | ||
821 | + else if(temp <= TMP12) | ||
822 | + ftemp = 12; | ||
823 | + else if(temp <= TMP11) | ||
824 | + ftemp = 11; | ||
825 | + else if(temp <= TMP10) | ||
826 | + ftemp = 10; | ||
827 | + else if(temp <= TMP9) | ||
828 | + ftemp = 9; | ||
829 | + else if(temp <= TMP8) | ||
830 | + ftemp = 8; | ||
831 | + else if(temp <= TMP7) | ||
832 | + ftemp = 7; | ||
833 | + else if(temp <= TMP6) | ||
834 | + ftemp = 6; | ||
835 | + else if(temp <= TMP5) | ||
836 | + ftemp = 5; | ||
837 | + else if(temp <= TMP4) | ||
838 | + ftemp = 4; | ||
839 | + else if(temp <= TMP3) | ||
840 | + ftemp = 3; | ||
841 | + else if(temp <= TMP2) | ||
842 | + ftemp = 2; | ||
843 | + else if(temp <= TMP1) | ||
844 | + ftemp = 1; | ||
81 | else | 845 | else |
82 | - { | ||
83 | - temp = (VAL25 - temp) * 255; | ||
84 | - ftemp = temp / (VAL25 - VAL105); | ||
85 | - } | 846 | + ftemp = 0; |
847 | + | ||
86 | if((opto0 == 1) && ((PIND & 0x40) == 0x40)) | 848 | if((opto0 == 1) && ((PIND & 0x40) == 0x40)) |
87 | PORTD &= 0xE7; | 849 | PORTD &= 0xE7; |
88 | else | 850 | else |