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 2824 2013-03-10 14:55:55Z kaklik $" |
3 |
#define ID "$Id: main.c 2825 2013-03-10 14:57:58Z 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 70... |
Line 70... |
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); |