Subversion Repositories svnkaklik

Rev

Rev 471 | Blame | Compare with Previous | Last modification | View Log | Download

#include "blik.h"


void main()
{

int i;

   setup_adc_ports(NO_ANALOGS|VSS_VDD);   // parametry
   setup_adc(ADC_OFF);
   setup_spi(FALSE);
   setup_timer_0(RTCC_INTERNAL|RTCC_DIV_1);
   setup_timer_1(T1_DISABLED);
   setup_timer_2(T2_DISABLED,0,1);
   setup_comparator(NC_NC_NC_NC);
   setup_vref(FALSE);
   setup_oscillator(False);

   while(true) // nekonecny cyklus
   {
      output_high(PIN_B0);    // nastav B0 na 1
      Delay_ms(50);           // pockej 50ms
      output_high(PIN_B1);    // nastav B0 na 1
      Delay_ms(50);           // pockej 50ms
      output_high(PIN_B2);    // nastav B0 na 1

      for(i=0;i<=100;i++)
      {
     
        Output_high(PIN_A2);
        Delay_ms(1);
        Output_low(PIN_A2);
        Delay_ms(1);
      }

      output_low(PIN_B0);     //nastav B0 na 0
      Delay_ms(50);           // pockej 50ms
      output_low(PIN_B1);     //nastav B0 na 0
      Delay_ms(50);           // pockej 50ms
      output_low(PIN_B2);     //nastav B0 na 0
      Delay_ms(50);           // pockej 50ms
   }                          // opakuj cyklus

}