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 2822 2013-03-10 14:51:27Z kaklik $" |
3 |
#define ID "$Id: main.c 2823 2013-03-10 14:54:05Z 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 68... |
Line 68... |
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); |
73 |
/* setup_comparator(NC_NC_NC_NC); // This device COMP currently not supported by the PICWizard |
73 |
setup_comparator(NC_NC_NC_NC); // This device COMP currently not supported by the PICWizard |
74 |
setup_oscillator(OSC_8MHZ); |
74 |
setup_oscillator(OSC_8MHZ); |
75 |
setup_wdt(WDT_1152MS|WDT_DIV_16); |
75 |
/* setup_wdt(WDT_1152MS|WDT_DIV_16); |
76 |
setup_spi(SPI_MASTER | SPI_MODE_0 | SPI_CLK_DIV_64); |
76 |
setup_spi(SPI_MASTER | SPI_MODE_0 | SPI_CLK_DIV_64); |
77 |
output_high(CSN_SPI); |
77 |
output_high(CSN_SPI); |
78 |
|
78 |
|
79 |
*/ |
79 |
*/ |
80 |
delay_ms(100); |
80 |
delay_ms(100); |