Subversion Repositories svnkaklik

Rev

Details | Last modification | View Log

Rev Author Line No. Line
6 kaklik 1
#include "D:\KAKLIK\programy\PIC_C\mereni\otmer\otackomer.h"
2
 
3
#define DATA   PIN_A1
4
#define CP     PIN_A0
5
 
6
void main()
7
{
8
int i;
9
   setup_timer_0(RTCC_INTERNAL|RTCC_DIV_1);
10
 
11
   while(true)
12
   {
13
      output_high(DATA);
14
      output_high(CP);
15
      Delay_ms(100);
16
      output_low(CP);
17
      output_low(DATA);
18
 
19
      for(i=7;i>0;i--)
20
      {
21
         Delay_ms(100);
22
         output_high(CP);
23
         Delay_ms(100);
24
         output_low(CP);
25
      }
26
   }
27
}