Subversion Repositories svnkaklik

Rev

Rev 52 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log

Rev 52 Rev 410
1
#include "blik.h"
1
#include "blik.h"
2
 
2
 
3
 
3
 
4
void main()
4
void main()
5
{
5
{
6
 
6
 
7
   setup_adc_ports(NO_ANALOGS|VSS_VDD);   // parametry
7
   setup_adc_ports(NO_ANALOGS|VSS_VDD);   // parametry
8
   setup_adc(ADC_OFF);
8
   setup_adc(ADC_OFF);
9
   setup_spi(FALSE);
9
   setup_spi(FALSE);
10
   setup_timer_0(RTCC_INTERNAL|RTCC_DIV_1);
10
   setup_timer_0(RTCC_INTERNAL|RTCC_DIV_1);
11
   setup_timer_1(T1_DISABLED);
11
   setup_timer_1(T1_DISABLED);
12
   setup_timer_2(T2_DISABLED,0,1);
12
   setup_timer_2(T2_DISABLED,0,1);
13
   setup_comparator(NC_NC_NC_NC);
13
   setup_comparator(NC_NC_NC_NC);
14
   setup_vref(FALSE);
14
   setup_vref(FALSE);
15
   setup_oscillator(False);
15
   setup_oscillator(False);
16
 
16
 
17
   while(true) // nekonecny cyklus
17
   while(true) // nekonecny cyklus
18
   {
18
   {
19
      output_high(PIN_B0);    // nastav B0 na 1
19
      output_high(PIN_B0);    // nastav B0 na 1
20
      Delay_ms(700);          // pockej 700ms
20
      Delay_ms(700);          // pockej 700ms
21
      output_low(PIN_B0);     //nastav B0 na 0
21
      output_low(PIN_B0);     //nastav B0 na 0
22
      Delay_ms(50);           // pockej 50ms
22
      Delay_ms(50);           // pockej 50ms
23
   }                       // opakuj cyklus
23
   }                       // opakuj cyklus
24
 
24
 
25
}
25
}