Subversion Repositories svnkaklik

Rev

Rev 410 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log

Rev 410 Rev 460
Line 2... Line 2...
2
 
2
 
3
 
3
 
4
void main()
4
void main()
5
{
5
{
6
 
6
 
-
 
7
int i;
-
 
8
 
7
   setup_adc_ports(NO_ANALOGS|VSS_VDD);   // parametry
9
   setup_adc_ports(NO_ANALOGS|VSS_VDD);   // parametry
8
   setup_adc(ADC_OFF);
10
   setup_adc(ADC_OFF);
9
   setup_spi(FALSE);
11
   setup_spi(FALSE);
10
   setup_timer_0(RTCC_INTERNAL|RTCC_DIV_1);
12
   setup_timer_0(RTCC_INTERNAL|RTCC_DIV_1);
11
   setup_timer_1(T1_DISABLED);
13
   setup_timer_1(T1_DISABLED);
Line 15... Line 17...
15
   setup_oscillator(False);
17
   setup_oscillator(False);
16
 
18
 
17
   while(true) // nekonecny cyklus
19
   while(true) // nekonecny cyklus
18
   {
20
   {
19
      output_high(PIN_B0);    // nastav B0 na 1
21
      output_high(PIN_B0);    // nastav B0 na 1
20
      Delay_ms(700);          // pockej 700ms
22
      Delay_ms(50);           // pockej 50ms
-
 
23
      output_high(PIN_B1);    // nastav B0 na 1
-
 
24
      Delay_ms(50);           // pockej 50ms
-
 
25
      output_high(PIN_B2);    // nastav B0 na 1
-
 
26
 
-
 
27
      for(i=0;i<=100;i++)
-
 
28
      {
-
 
29
        Output_high(PIN_A2);
-
 
30
        Delay_ms(1);
-
 
31
        Output_low(PIN_A2);
-
 
32
        Delay_ms(1);
-
 
33
      }
-
 
34
      
21
      output_low(PIN_B0);     //nastav B0 na 0
35
      output_low(PIN_B0);     //nastav B0 na 0
22
      Delay_ms(50);           // pockej 50ms
36
      Delay_ms(50);           // pockej 50ms
-
 
37
      output_low(PIN_B1);     //nastav B0 na 0
-
 
38
      Delay_ms(50);           // pockej 50ms
-
 
39
      output_low(PIN_B2);     //nastav B0 na 0
-
 
40
      Delay_ms(50);           // pockej 50ms
23
   }                       // opakuj cyklus
41
   }                          // opakuj cyklus
24
 
42
 
25
}
43
}