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\mereni\serva\PIC16F88\tester.h"
1
#include "tester.h"
2
 
2
 
3
#DEFINE servo1 PIN_B1
3
#DEFINE servo1 PIN_B1
4
#DEFINE servo2 PIN_A3
4
#DEFINE servo2 PIN_A3
5
#DEFINE servo3 PIN_A2
5
#DEFINE servo3 PIN_A2
6
#DEFINE servo4 PIN_A0
6
#DEFINE servo4 PIN_A0
Line 8... Line 8...
8
 
8
 
9
void main()
9
void main()
10
{
10
{
11
int i;
11
int i;
12
 
12
 
-
 
13
   port_b_pullups(TRUE);
13
   setup_adc_ports(NO_ANALOGS|VSS_VDD);
14
   setup_adc_ports(NO_ANALOGS|VSS_VDD);
14
   setup_adc(ADC_OFF);
15
   setup_adc(ADC_OFF);
15
   setup_spi(FALSE);
16
   setup_spi(FALSE);
16
   setup_timer_0(RTCC_INTERNAL|RTCC_DIV_1);
17
   setup_timer_0(RTCC_INTERNAL|RTCC_DIV_1);
17
   setup_timer_1(T1_DISABLED);
18
   setup_timer_1(T1_DISABLED);
18
   setup_timer_2(T2_DISABLED,0,1);
19
   setup_timer_2(T2_DISABLED,0,1);
19
   setup_comparator(NC_NC_NC_NC);
20
   setup_comparator(NC_NC_NC_NC);
20
   setup_vref(FALSE);
21
   setup_vref(FALSE);
21
 
22
 
22
 
-
 
23
 
-
 
24
   while(true)
23
   while(true)
25
   {   
24
   {   
26
      While(input(SW)) 
25
      While(input(SW)) 
27
      {
26
      {
28
         output_high(servo1);
27
         output_high(servo1);