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

📄 main.lst

📁 F系列单片机的液晶显示程序 LM28124液晶
💻 LST
字号:
C51 COMPILER V8.02   MAIN                                                                  09/22/2007 15:22:03 PAGE 1   


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

line level    source

   1          // Target: C8051F02x
   2          //-----------------------------------------------------------------------------
   3          // Includes
   4          //-----------------------------------------------------------------------------
   5                                  
   6          #include <c8051f020.h>                 // SFR declarations
   7          #include <stdio.h>
   8          #include <var.h>
   9          #include <lib.h>
*** ERROR C141 IN LINE 17 OF LIB.H: syntax error near '('
*** ERROR C141 IN LINE 17 OF LIB.H: syntax error near ')'
  10          #include <define.h>
  11          #include <AD.c>
*** ERROR C231 IN LINE 9 OF DEFINE.H: 'EN': redefinition
*** ERROR C231 IN LINE 9 OF AD.C: 'AD': redefinition
*** ERROR C231 IN LINE 58 OF AD.C: 'AD': redefinition
  12          #include <data.c>
*** ERROR C231 IN LINE 9 OF DEFINE.H: 'EN': redefinition
*** ERROR C141 IN LINE 8 OF DATA.C: syntax error near ')'
*** ERROR C141 IN LINE 11 OF DATA.C: syntax error near '=', expected ')'
*** ERROR C129 IN LINE 11 OF DATA.C: missing ';' before '<'
  13          
  14          //----------------------------------------------------------------------------
  15          // main Routine
  16          //----------------------------------------------------------------------------
  17          void main (void) {
  18                               
  19             
  20              WDTCN = 0xde;                       // disable watchdog timer
  21              WDTCN = 0xad;
  22              PORT_Init ();   
  23              SYSCLK_Init ();                     // initialize oscillator
  24             
  25              AD();       
  26              data();
  27                  P0=0x00;
  28              P0=0x01;
  29          }
  30          //----------------------------------------------------------------------------
  31          //subprograms
  32          //----------------------------------------------------------------------------
  33          //-----------------------------------------------------------------------------
  34          //SYSCLK_Init
  35          //----------------------------------------------------------------------------
  36          void SYSCLK_Init (void) 
  37          {
  38             int i;                              // delay counter
  39          
  40             OSCXCN = 0x67;                      // start external oscillator with
  41                                                 // 22.1184MHz crystal
  42          
  43             for (i=0; i < 256; i++) ;           // XTLVLD blanking interval (>1ms)
  44          
  45             while (!(OSCXCN & 0x80)) ;          // Wait for crystal osc. to settle
  46          
C51 COMPILER V8.02   MAIN                                                                  09/22/2007 15:22:03 PAGE 2   

  47             OSCICN = 0x88;                      // select external oscillator as SYSCLK
  48                                                 // source and enable missing clock
  49                                                 // detector
  50          }
  51          //----------------------------------------------------------------------------
  52          //PORT_Init
  53          //----------------------------------------------------------------------------
  54          void PORT_Init (void)
  55          {   
  56                                 // Enable crossbar and weak pull-ups
  57                           
  58               
  59                                
  60                   P0MDOUT |= 0x00; 
  61               XBR2    = 0x40;   
  62                   //P1MDIN   =0x40;
  63          
  64          }
  65          //----------------------------------------------------------------------------
  66          //TIMER0_Init      INT1_Init  INT0_Init
  67          //----------------------------------------------------------------------------
  68          
  69          void  delay(void)
  70          {
  71              unsigned int i;
  72               i=11715;
  73                   while(i)
  74                   {i=i-1;
  75                 } 
  76          }
  77          
  78          //----------------------------------------------------------------------------
  79          //ADC1_Init
  80          //----------------------------------------------------------------------------
  81          
  82          
  83          //-----------------------------------------------------------------------------
  84          // Timer3_Init
  85          //-----------------------------------------------------------------------------
  86          //
  87          // Configure Timer3 to auto-reload at interval specified by <counts> (no 
  88          // interrupt generated) using SYSCLK as its time base.
  89          //
  90          
  91          //----------------------------------------------------------------------------
  92          //ASC1_ISR
  93          //----------------------------------------------------------------------------
  94          
  95          

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

⌨️ 快捷键说明

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