电子密码锁发展及设计 第5页

电子密码锁发展及设计 第5页
  if(second3==6400)

              for(j=248;j>0;j--);
              if(P3_7==0)
                {
                  if(hibitflag==0)
                    {
                      digitcount++;                     
                      if(digitcount==10)
                        {
                          digitcount=0;
                        }
               
                    }
                    else
                      {
                        second3=0;
                      }
                  while(P3_7==0);
                }
            }
        }
        else
          {
            cmpflag=0;
            for(i=0;i<pslen;i++)
              {
                if(ps[i]!=psbuf[i])
                  {
                    hibitflag=1;
                    i=pslen;
            
                 
                           else psbuf[funcount-2]=digitcount;
                          }
                    cmpflag=0;
                    second3=0;
                    goto a;
                  }
                   } 

void dfg (void)        ;电磁锁继电器驱动
{
     cc=0;
     errorflag=0;
     rightflag=1;        {
     oka++;
 if(oka==2)         
 oka=0;
        P0_0=~P0_0;
        hibitflag=0;
a:       cmpflag=0;

void t0(void) interrupt 1 using 0      ;密码存储
{         bb++;
      if(bb==800)
        {
          bb=0;
          alarmflag=~alarmflag;
        }
      if(alarmflag==1)
        {
          P0_0=~P0_0;
        }

      aa++;

  if((errorflag==1) && (rightflag==0))
      if(aa==800)
        {
          aa=0;        }
 
              {
                okb=0;
                P0_0=~P0_0;
              }
       else
          {
            okb++;
            if(okb==3)
          P0_1=~P0_1;
        }
      second3++;
      if(okflag==1)

上一页  [1] [2] [3] [4] [5] [6] 下一页

Copyright © 2007-2012 www.chuibin.com 六维论文网 版权所有