Rev Author Line No. Line
3615 kakl 1 /***** LX200obfuscator *****/
2 /***** 2014 (c) MLAB *****/
3614 kakl 3  
3615 kakl 4 #include "main.h"
3614 kakl 5  
6  
3615 kakl 7 #define LX200 PIN_E0 // Connection to the LX200
8  
3614 kakl 9 void main()
10 {
3617 kakl 11 setup_oscillator(OSC_8MHZ|OSC_INTRC);
12  
3614 kakl 13 setup_adc_ports(NO_ANALOGS|VSS_VDD);
14 setup_adc(ADC_CLOCK_DIV_2);
15 setup_psp(PSP_DISABLED);
16 setup_spi(SPI_SS_DISABLED);
17 setup_wdt(WDT_OFF);
18 setup_timer_0(RTCC_INTERNAL);
19 setup_timer_1(T1_DISABLED);
20 setup_timer_2(T2_DISABLED,0,1);
21 setup_timer_3(T3_DISABLED|T3_DIV_BY_1);
22 setup_comparator(NC_NC_NC_NC);
23 setup_vref(FALSE);
3615 kakl 24  
3616 kakl 25 while(TRUE)
26 {
27 output_low(LX200);
28 delay_ms(1000);
29 output_high(LX200);
30 delay_us(100);
31 output_toggle(LX200);
32 delay_us(940);
33 output_toggle(LX200);
34 delay_us(100);
35 output_toggle(LX200);
36 delay_us(940);
37 output_toggle(LX200);
38 delay_us(100);
39 output_toggle(LX200);
40 delay_us(940);
41 output_toggle(LX200);
42 delay_us(200);
43 output_toggle(LX200);
44 delay_us(100);
45 output_toggle(LX200);
46 delay_us(100);
47 output_toggle(LX200);
48 delay_us(100);
49 output_toggle(LX200);
50 delay_us(100);
51 output_toggle(LX200);
52 delay_us(100);
53 output_toggle(LX200);
54 delay_us(200);
55 output_toggle(LX200);
56 }
3614 kakl 57 }