Rev 2318 Rev 3432
Line 1... Line 1...
1 #include "reflow.h" 1 #include "reflow.h"
2 #include "process.h" 2 #include "process.h"
3 #include <math.h> 3 #include <math.h>
4   4  
5 // nastaveni teplot a casu -  
6 #define TEPLOTA_PREDEHREVU 120 -  
7 #define DOBA_PREDEHREVU 60 -  
8   -  
9 #define TEPLOTA_VRCHOLU 216 -  
10 #define DOBA_VRCHOLU 5 -  
11   -  
12 // CPU IO rozhrani 5 // CPU IO
13 #define LCD_RS PIN_C1 // rizeni registru LCD displeje 6 #define LCD_RS PIN_C1 // rizeni registru LCD displeje
14 #define LCD_E PIN_C2 // enable LCD displeje 7 #define LCD_E PIN_C2 // enable LCD displeje
15 #define LCD_DATA_LSB PIN_D0 // data LCD 8 #define LCD_DATA_LSB PIN_D0 // data LCD
16 #include "lcd.c" 9 #include "lcd.c"
17   10  
Line 30... Line 23...
30   23  
31 // interni 24 // interni
32 #define PowerOn() output_low(POWER_T4);output_low(POWER_T5) 25 #define PowerOn() output_low(POWER_T4);output_low(POWER_T5)
33 #define PowerOff() output_high(POWER_T4);output_high(POWER_T5) 26 #define PowerOff() output_high(POWER_T4);output_high(POWER_T5)
34   27  
35 // globalni promenne 28 // global variables
36 struct time 29 struct time
37 { 30 {
38 volatile signed int8 hod; 31 volatile signed int8 hod;
39 volatile signed int8 min; 32 volatile signed int8 min;
40 volatile signed int8 sec; 33 volatile signed int8 sec;
Line 235... Line 228...
235   228  
236 lcd_gotoxy(10,2); 229 lcd_gotoxy(10,2);
237 printf(lcd_putc,"%1.1f\21C/s ",temp_slope); 230 printf(lcd_putc,"%1.1f\21C/s ",temp_slope);
238   231  
239 delay_ms(200); 232 delay_ms(200);
240 if (cas.min>3) heat_failure(); 233 if (cas.min>4) heat_failure(); // hardcoded timeout to heating failure
241 } 234 }
242 while (teplota() < SOAK_TEMP); 235 while (teplota() < SOAK_TEMP);
243   236  
244 // ----------- SOAK --------------- 237 // ----------- SOAK ---------------
245 nullcas(&cas); 238 nullcas(&cas);