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 624
Line 1... Line 1...
1
#include "D:\@Kaklik\programy\PIC_C\prenos\blikac.h"
1
#include "blikac.h"
2
#DEFINE  SERVO_X        PIN_A2      // piny na ktere jsou pripojena serva
2
#DEFINE  SERVO_X        PIN_A2      // piny na ktere jsou pripojena serva
3
#DEFINE  SERVO_Y        PIN_B0
3
#DEFINE  SERVO_Y        PIN_B0
4
#DEFINE  TL1        PIN_B1
4
#DEFINE  TL1        PIN_B1
5
 
5
 
6
void main()
6
void main()
Line 17... Line 17...
17
        delay_us(1000);
17
        delay_us(1000);
18
        output_low(servo_y);
18
        output_low(servo_y);
19
        output_low(servo_x);
19
        output_low(servo_x);
20
        delay_ms(20);
20
        delay_ms(20);
21
       }
21
       }
22
       
22
 
23
       for(i=0;i<=100;i++)
23
       for(i=0;i<=100;i++)
24
       {
24
       {
25
        output_high(servo_y);
25
        output_high(servo_y);
26
        output_high(servo_x);
26
        output_high(servo_x);
27
        delay_us(20`00);
27
        delay_us(2000);
28
        output_low(servo_y);
28
        output_low(servo_y);
29
        output_low(servo_x);
29
        output_low(servo_x);
30
        delay_ms(20);
30
        delay_ms(20);
31
       }
31
       }
32
     }
32
     }
33
     output_high(servo_y);
33
     output_high(servo_y);
34
     output_high(servo_x);
34
     output_high(servo_x);
35
     delay_us(1500);
35
     delay_us(1500);
36
     output_low(servo_y);
36
     output_low(servo_y);
37
     output_low(servo_x);
37
     output_low(servo_x);
38
     delay_ms(20);    
38
     delay_ms(20);
39
   }
39
   }
40
}
40
}