⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 8870try.lst

📁 AT89c2051控制9200b发双音频码用8870解码并将BCD码返回AT89C2051,然后比较的源代码和Hex文件。
💻 LST
字号:
C51 COMPILER V7.00  8870TRY                                                                06/09/2005 14:57:02 PAGE 1   


C51 COMPILER V7.00, COMPILATION OF MODULE 8870TRY
OBJECT MODULE PLACED IN 8870try.OBJ
COMPILER INVOKED BY: C:\Keil\C51\BIN\C51.EXE 8870try.c ROM(SMALL) BROWSE DEBUG OBJECTEXTEND

stmt level    source

   1          #include<At89x51.h>
   2          #include<INTRINS.H>
   3          unsigned int out,in,ms,zd0,zd1,i;
   4          //unsigned int shu[]={0xcc,0xcd,0xce,0xcf,0xdc,0xdd,0xde,0xdf,0xec,0xed,0xee,0xef,0xfc,0xfd,0xfe,0xff};
   5          unsigned int shu[]={0xcc,0xcd,0xce,0xcf,0xdc,0xdd,0xde,0xdf,0xec,0xed,0xee,0xef,0xfc,0xfd,0xfe,0xff};
   6          void zhongduan0(void) interrupt 0 using 0 //8870 over
   7          {
   8   1       in=P3;zd0=1;
   9   1      }
  10          
  11          void zhongduan1(void) interrupt 2 using 2 //button
  12          {
  13   1       zd1=1;
  14   1      }
  15          
  16          void timer1(void) interrupt 3 using 3 //定时器1程序
  17          {
  18   1       TH1=0xfc;TL1=0x16;ms--;
  19   1      }
  20          
  21          void delay(unsigned int s) //1 ms延时程序
  22          {
  23   1       TR1=1;
  24   1       ms=s;
  25   1       while(ms){;}
  26   1       TR1=0;  
  27   1      }
  28          void start(void) //初始化程序
  29          {
  30   1       TMOD=0x11;TR0=0;TR1=0;IT1=1;EA=1;PT0=1;P1=0xff;P3=0xff;
  31   1       ET1=1;EX1=1;EX0=1;TH1=0xfc;TL1=0x16;out=1;IT0=1;zd0=0;
  32   1      }
  33          
  34          void main(void) 
  35          {
  36   1       start();
  37   1      S: 
  38   1       while(1)
  39   1       {
  40   2        P1=out;
  41   2        i=1;
  42   2        P1_6=1;
  43   2        delay(10);
  44   2        P3_7=0;
  45   2        delay(100);
  46   2        P3_7=1;
  47   2        P1_6=0;
  48   2        if(out>=10){P1=(out-10);P1_5=1;} else P1_5=0;
  49   2        delay(10);
  50   2        while(!zd0){delay(10);i++;if(i>=100)break;}
  51   2        in=(in|0xcc);
  52   2        if(in==shu[out]){out++;zd0=0;}
  53   2        else break;
  54   2        in=P3;
  55   2        if(in!=0)zd0=1;
C51 COMPILER V7.00  8870TRY                                                                06/09/2005 14:57:02 PAGE 2   

  56   2        if(out>=16)break;
  57   2       }
  58   1       while(1)
  59   1       {
  60   2        zd1=0;if(P1_6==1)P1_6=0;
  61   2        if(out>=16){P1_7=1;if(zd1){zd1=0;P1_7=0;out=1;goto S;}}
  62   2        else {P1_7=1;delay(200);P1_7=0;delay(200);if(zd1){zd1=0;out=1;goto S;}}
  63   2       }
  64   1      }


MODULE INFORMATION:   STATIC OVERLAYABLE
   CODE SIZE        =    333    ----
   CONSTANT SIZE    =   ----    ----
   XDATA SIZE       =   ----    ----
   PDATA SIZE       =   ----    ----
   DATA SIZE        =     44    ----
   IDATA SIZE       =   ----    ----
   BIT SIZE         =   ----    ----
END OF MODULE INFORMATION.


C51 COMPILATION COMPLETE.  0 WARNING(S),  0 ERROR(S)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -