Rev Author Line No. Line
3614 kakl 1 #include "Z:\home\kakl\svn\MLAB\Designs\LX200obfuscator\SW\PIC18F4550\main.h"
2  
3  
4 #define LX200 PIN_E0 //CHANGE PIN_XX TO YOUR LED PIN NUMBER, EX: PIN_A5
5  
6 void main()
7 {
8  
9 setup_adc_ports(NO_ANALOGS|VSS_VDD);
10 setup_adc(ADC_CLOCK_DIV_2);
11 setup_psp(PSP_DISABLED);
12 setup_spi(SPI_SS_DISABLED);
13 setup_wdt(WDT_OFF);
14 setup_timer_0(RTCC_INTERNAL);
15 setup_timer_1(T1_DISABLED);
16 setup_timer_2(T2_DISABLED,0,1);
17 setup_timer_3(T3_DISABLED|T3_DIV_BY_1);
18 setup_comparator(NC_NC_NC_NC);
19 setup_vref(FALSE);
20 while(TRUE)
21 {
22 output_low(LX200);
23 delay_ms(1000);
24 output_high(LX200);
25 delay_us(100);
26 output_toggle(LX200);
27 delay_us(940);
28 output_toggle(LX200);
29 delay_us(100);
30 output_toggle(LX200);
31 delay_us(940);
32 output_toggle(LX200);
33 delay_us(100);
34 output_toggle(LX200);
35 delay_us(940);
36 output_toggle(LX200);
37 delay_us(200);
38 output_toggle(LX200);
39 delay_us(100);
40 output_toggle(LX200);
41 delay_us(100);
42 output_toggle(LX200);
43 delay_us(100);
44 output_toggle(LX200);
45 delay_us(100);
46 output_toggle(LX200);
47 delay_us(100);
48 output_toggle(LX200);
49 delay_us(200);
50 output_toggle(LX200);
51 }
52  
53 while(TRUE);
54 }