• 大小: 97KB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2021-06-13
  • 语言: 其他
  • 标签: 51  

资源简介

#include unsigned char code time[]={0x59,0x58,0x57,0x56,0x55,0x54,0x53,0x52,0x51,0x50,0x49,0x48,0x47, 0x46,0x45,0x44,0x43,0x42,0x41,0x39,0x38,0x37,0x36,0x35,0x34,0x33,0x32,0x31,0x30,0x29,0x28,0x27,0x26,0x25,0x24,0x23,0x22,0x21,0x20,0x19,0x18,0x17,0x16,0x15,0x14,0x13,0x12,0x11,0x10,0x09,0x08,0x07,0x06,0x05,0x04,0x03,0x02,0x01,0x00}; unsigned char Second; unsigned char timer; unsigned char fen; void delays() { unsigned char i,j,k; for(k=100;k>0;k--) for(i=20;i>0;i--) for(j=248;j>0;j--); } void main() { TMOD=0X02; EX0=1; EA=1; fen=47; timer=0; Second=34; P2=time[Second]; P1=time[timer]; P0=time[fen]; while(1) { delays(); Second++; timer++; if(Second==59) { Second=34; } P2=time[Second]; if(timer==59) { ++fen; timer=0; } if(fen==59) fen=47; P1=time[timer]; P0=time[fen]; } } void int0() interrupt 0 using 0 { Second=34; P2=time[Second]; }

资源截图

代码片段和文件信息

#include
unsigned char code time[]={0x590x580x570x560x550x540x530x520x510x500x490x480x47
0x460x450x440x430x420x410x390x380x370x360x350x340x330x320x310x300x290x280x270x260x250x240x230x220x210x200x190x180x170x160x150x140x130x120x110x100x090x080x070x060x050x040x030x020x010x00};
unsigned char Second;
unsigned char timer;
unsigned char fen;
  
void delays() 

  unsigned char ijk; 
  for(k=100;k>0;k--) 
  for(i=20;i>0;i--) 
  for(j=248;j>0;j--); 

  
  
void main() 
{
TMOD=0X02; 
 EX0=1;
 EA=1;
  fen=47;
  timer=0;
  Second=34; 
  P2=time[Second]; 
  P1=time[timer];
  P0=time[fen];
  while(1) 
    { 
      delays(); 
      Second++;
      timer++; 
      if(Second==59) 
        { 
        Second=34;
        } 

      P2=time[Second]; 
      if(timer==59)
     {
  ++fen;
      timer=0;
     }
if(fen==59) fen=47;
     P1=time[timer];
     P0=time[fen];

}
void int0() interrupt 0 using 0
{
Second=34;
P2=time[Second];
}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

    .......         0  2009-01-18 15:12  24计数器\24 account_Uv2.Bak

     文件      31479  2009-01-14 13:07  24计数器\SAMPLES.rar

     文件       6376  2005-03-22 15:22  24计数器\STARTUP.A51

     文件       9288  2009-02-17 16:40  24计数器\24 account.plg

     文件        749  2009-02-17 16:18  24计数器\STARTUP.OBJ

     文件        742  2009-02-17 16:40  24计数器\1.PWI

     文件      14049  2009-02-17 16:18  24计数器\STARTUP.LST

     文件         52  2009-02-17 16:30  24计数器\24 account.lnp

     文件       5966  2009-02-17 16:30  24计数器\24 account.M51

     文件     398702  2009-01-10 16:25  24计数器\1.BMP

     文件     137637  2009-02-17 16:40  24计数器\1.DSN

     文件       1054  2009-02-17 16:30  24计数器\24 accout.c

     文件       2695  2009-02-17 16:30  24计数器\24 accout.LST

     文件         39  2009-02-17 16:30  24计数器\24 accout.__i

    .......      1370  2009-02-17 16:30  24计数器\24 account_Opt.Bak

     文件     136700  2009-02-17 11:11  24计数器\Last Loaded 1.DBK

     文件       2205  2009-01-18 15:42  24计数器\24 account.Uv2

     文件       1370  2009-02-17 16:40  24计数器\24 account.Opt

     文件       4353  2009-02-17 16:30  24计数器\24 accout.OBJ

     文件       4465  2009-02-17 16:30  24计数器\24 account

     文件        642  2009-02-17 16:30  24计数器\24 account.hex

     目录          0  2009-01-13 16:08  24计数器

----------- ---------  ---------- -----  ----

               759933                    22


评论

共有 条评论