Subversion Repositories svnkaklik

Rev

Go to most recent revision | Details | Last modification | View Log

Rev Author Line No. Line
6 kaklik 1
#include "D:\KAKLIK\programy\PIC_C\mereni\otmer\otmer.h"
2
 
3
#define DATA   PIN_A1
4
#define CP     PIN_A0
5
#define STROBE PIN_A2
6
 
7
#include "shift_reg.c"
8
 
9
void main()
10
{
11
int n=0;
12
int i;
13
   putreg(1);
14
   while(true)
15
   {
16
      i=1;
17
      for(n=0;n<=7;n++)
18
      {
19
         putreg(i);
20
         i=i<<1;
21
         Delay_ms(50);
22
      };
23
      i=0x80;
24
      for(n=0;n<=7;n++)
25
      {
26
         putreg(i);
27
         i=i>>1;
28
         Delay_ms(50);
29
      };
30
   }
31
 
32
   while(true)
33
   {
34
      putreg(~n);
35
      Delay_ms(100);
36
      n++;
37
   }
38
}