Rev Author Line No. Line
1384 mija 1 /* mija 2009 - header for proces.c
2  
3 SW pro ATmega8 mereni + regulace teploty
4 Fosc = 8192000Hz externi krystal
5  
6 ver.: 0.0 - start
7  
8 */
9  
10 #ifndef __process_h_included__
11 #define __process_h_included__
12  
13 #include "clock.h" // struc Clock_t
14  
15 #define POSITIVTIME 15 //minuty
16 #define DRYTIME 120 //minuty
17  
18 #define POSITIVTEMP 70 //°C
19 #define DRYTEMP 80 //°C
20  
21 #define PREHEATTEMPSTART 100
22 #define PREHEATTEMPSTOP 150
23 #define PREHEATTIMEOFF 50 //sec
24  
25 #define PREHEATTEMP 126 //°C
26  
27 #define PREHEATTIME 120 //sec
28  
29 #define SOLDERTEMPSTART 183
30 #define SOLDERTEMPSTOP 180
31  
32 #define SOLDERTEMP 206 //°C
33 #define SOLDERTIME 10 //sec
34  
35 #define COOLTEMP 50 //°C
36 #define COOLTIME 10 //sec
37  
38 #define HEAT PD7
39 #define HEAT_DDR DDRD
40 #define HEAT_PORT PORTD
41  
42 #define MAXDISPLBUFFER 20 //buffer pro lcd display
43  
44 enum{START=0,SOLDER,POSITIV,DRY}; //main proces
45  
46 uint8_t ProcesStart(char *buffer,uint8_t key,uint16_t temp);
47 uint8_t ProcesSolder(char *buffer,uint8_t key,uint16_t temp,Clockt_t *clock);
48 uint8_t ProcesPositiv(char *buffer,uint8_t key,uint16_t temp,Clockt_t *clock);
49 uint8_t ProcesDry(char *buffer,uint8_t key,uint16_t temp,Clockt_t *clock);
50  
51 void ProcesDispl(char *data);
52 void ProcesTemp(uint16_t adc,uint16_t *temp);
53 void ProcesHeat(uint16_t temp,uint16_t ActualTemp);
54  
55 #define HeatInit() HEAT_DDR|=_BV(HEAT)
56 #define HeatOn() HEAT_PORT|=_BV(HEAT)
57 #define HeatOff() HEAT_PORT &= (~(_BV(HEAT)))
58  
59 #endif /* __process_h_included__ */