Line 1... |
Line 1... |
1 |
/**** Automatic weather station 01A ****/ |
1 |
/**** Automatic weather station 01A ****/ |
2 |
#define VERSION "0.1" |
2 |
#define VERSION "0.1" |
3 |
#define ID "$Id: main.c 2820 2013-03-10 14:37:47Z kaklik $" |
3 |
#define ID "$Id: main.c 2821 2013-03-10 14:47:53Z kaklik $" |
4 |
#include "main.h" |
4 |
#include "main.h" |
5 |
#include <string.h> |
5 |
#include <string.h> |
6 |
|
6 |
|
7 |
#CASE // Case sensitive compiler |
7 |
#CASE // Case sensitive compiler |
8 |
|
8 |
|
Line 62... |
Line 62... |
62 |
|
62 |
|
63 |
void main() |
63 |
void main() |
64 |
{ |
64 |
{ |
65 |
unsigned int16 seq=0; |
65 |
unsigned int16 seq=0; |
66 |
|
66 |
|
67 |
setup_adc_ports(NO_ANALOGS|VSS_VDD); |
67 |
/* setup_adc_ports(NO_ANALOGS|VSS_VDD); |
68 |
setup_adc(ADC_CLOCK_DIV_2); |
68 |
setup_adc(ADC_CLOCK_DIV_2); |
69 |
setup_timer_0(RTCC_EXT_L_TO_H|RTCC_DIV_1); |
69 |
setup_timer_0(RTCC_EXT_L_TO_H|RTCC_DIV_1); |
70 |
setup_timer_1(T1_EXTERNAL|T1_DIV_BY_1|T1_CLK_OUT); |
70 |
setup_timer_1(T1_EXTERNAL|T1_DIV_BY_1|T1_CLK_OUT); |
71 |
setup_timer_2(T2_DISABLED,0,1); |
71 |
setup_timer_2(T2_DISABLED,0,1); |
72 |
setup_ccp1(CCP_OFF); |
72 |
setup_ccp1(CCP_OFF); |
Line 77... |
Line 77... |
77 |
output_high(CSN_SPI); |
77 |
output_high(CSN_SPI); |
78 |
// enable_interrupts(INT_TIMER1); |
78 |
// enable_interrupts(INT_TIMER1); |
79 |
// enable_interrupts(INT_TIMER0); |
79 |
// enable_interrupts(INT_TIMER0); |
80 |
// enable_interrupts(GLOBAL); |
80 |
// enable_interrupts(GLOBAL); |
81 |
|
81 |
|
82 |
|
82 |
*/ |
83 |
delay_ms(100); |
83 |
delay_ms(100); |
84 |
|
84 |
|
85 |
welcome(); |
85 |
welcome(); |
86 |
|
86 |
|
87 |
sht_init(); |
87 |
sht_init(); |