{HEADER END}
{FILE START}

MLAB

[/] [Designs/] [LX200obfuscator/] [SW/] [PIC18F4550/] [main.c] - Revize 3617

Porovnej s předchozí - Blame - Stáhnout jako soubor

/***** LX200obfuscator *****/
/*****  2014 (c) MLAB  *****/

#include "main.h"


#define LX200 PIN_E0  // Connection to the LX200

void main()
{
   setup_oscillator(OSC_8MHZ|OSC_INTRC);
   
   setup_adc_ports(NO_ANALOGS|VSS_VDD);
   setup_adc(ADC_CLOCK_DIV_2);
   setup_psp(PSP_DISABLED);
   setup_spi(SPI_SS_DISABLED);
   setup_wdt(WDT_OFF);
   setup_timer_0(RTCC_INTERNAL);
   setup_timer_1(T1_DISABLED);
   setup_timer_2(T2_DISABLED,0,1);
   setup_timer_3(T3_DISABLED|T3_DIV_BY_1);
   setup_comparator(NC_NC_NC_NC);
   setup_vref(FALSE);

    while(TRUE)
    {
       output_low(LX200);
       delay_ms(1000);
       output_high(LX200);
       delay_us(100);
       output_toggle(LX200);
       delay_us(940);
       output_toggle(LX200);
       delay_us(100);
       output_toggle(LX200);
       delay_us(940);
       output_toggle(LX200);
       delay_us(100);
       output_toggle(LX200);
       delay_us(940);
       output_toggle(LX200);
       delay_us(200);
       output_toggle(LX200);
       delay_us(100);
       output_toggle(LX200);
       delay_us(100);
       output_toggle(LX200);
       delay_us(100);
       output_toggle(LX200);
       delay_us(100);
       output_toggle(LX200);
       delay_us(100);
       output_toggle(LX200);
       delay_us(200);
       output_toggle(LX200);
    }
}
{FILE END}
{FOOTER START}

Poháněno WebSVN v2.1 alpha 1