Subversion Repositories svnkaklik

Rev

Rev 410 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | Download

#include "D:\KAKLIK\programy\PIC_C\mereni\otmer\otmer.h"

#define DATA   PIN_A1
#define CP     PIN_A0
#define STROBE PIN_A2

#include "shift_reg.c"

void main()
{
int n=0;
int i;
   putreg(1);
   while(true)
   {
      i=1;
      for(n=0;n<=7;n++)
      {
         putreg(i);
         i=i<<1;
         Delay_ms(50);
      };
      i=0x80;
      for(n=0;n<=7;n++)
      {
         putreg(i);
         i=i>>1;
         Delay_ms(50);
      };
   }

   while(true)
   {
      putreg(~n);
      Delay_ms(100);
      n++;
   }
}