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

📄 main.lst

📁 DA代码 经测试通过的c8051f020 DA代码 内有锯齿波, 正弦波, 三角波等产生的代码...
💻 LST
字号:
C51 COMPILER V8.01   MAIN                                                                  07/31/2007 22:06:22 PAGE 1   


C51 COMPILER V8.01, COMPILATION OF MODULE MAIN
OBJECT MODULE PLACED IN main.OBJ
COMPILER INVOKED BY: d:\Keil\C51\BIN\C51.EXE main.c BROWSE DEBUG OBJECTEXTEND

line level    source

   1          //#include"12864.h" 
   2          #include"dac.c"
   3          
   4          void SYSCLK_Init (void)
   5          {
   6   1         int i;                              // delay counter
   7   1      
   8   1         OSCXCN = 0x67;                      // start external oscillator with
   9   1                                             // 22.1184MHz crystal
  10   1      
  11   1         for (i=0; i < 256; i++) ;           // wait for oscillator to start
  12   1      
  13   1         while (!(OSCXCN & 0x80)) ;          // Wait for crystal osc. to settle
  14   1      
  15   1         OSCICN = 0x88;                      // select external oscillator as SYSCLK
  16   1                                             // source and enable missing clock
  17   1                                             // detector
  18   1      }
  19          
  20          
  21          //-----------------------------------------------------------------------------
  22          // Sys_Init
  23          //-----------------------------------------------------------------------------
  24          //
  25          // Disable watchdog timer and call other Init functions.
  26          //
  27          void Sys_Init (void)
  28          {
  29   1              WDTCN   = 0xde;                                                         // disable watchdog timer
  30   1              WDTCN   = 0xad;
  31   1              
  32   1              SYSCLK_Init ();                                                         // initialize oscillator
  33   1              
  34   1              //UART0_Init ();                                                                // initialize UART0
  35   1              
  36   1              //XBR0 |= 0x04;                                                 //UART0  允许
  37   1              //XBR2 |= 0x40;                                 // Enable crossbar(数据交叉开关) and weak pull-ups
  38   1              
  39   1              //P0MDOUT |= 0x01;                              // Set TX0 to push/pull
  40   1              //port_init
  41   1              //P0MDOUT |=0x00;
  42   1              //P0=0xff;
  43   1              //P0MDOUT |=0xff;
  44   1              //P74OUT        =0xff;
  45   1              //P2MDOUT |=0xff;
  46   1      }
  47          
  48          void main()
  49          {
  50   1              Sys_Init();
  51   1              DAC0_Init();
  52   1              DAC1_Init();
  53   1              while(1)
  54   1              {
  55   2                      //squrewave(0);
C51 COMPILER V8.01   MAIN                                                                  07/31/2007 22:06:22 PAGE 2   

  56   2                      sawtooth(0); 
  57   2                      //sinwave(0);
  58   2                      //squrewave(1);
  59   2                      //sawtooth(1); 
  60   2                      //sinwave(1); 
  61   2              }
  62   1      }


MODULE INFORMATION:   STATIC OVERLAYABLE
   CODE SIZE        =    475    ----
   CONSTANT SIZE    =   ----    ----
   XDATA SIZE       =   ----    ----
   PDATA SIZE       =   ----    ----
   DATA SIZE        =   ----      10
   IDATA SIZE       =   ----    ----
   BIT SIZE         =   ----       3
END OF MODULE INFORMATION.


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

⌨️ 快捷键说明

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