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

📄 main.lst

📁 芯片at89s52
💻 LST
📖 第 1 页 / 共 2 页
字号:
C51 COMPILER V8.05a   MAIN                                                                 08/11/2007 16:36:19 PAGE 1   


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

line level    source

   1          /****************************************Copyright (c)**************************************************
   2          **                           西南科技大学计算机科学与技术学院                                                                              *
   3          **                                    嵌入式研究实验室                                                                                             *
   4          **                                                                                                                                 *
   5          **                             http://www.cs.swust.edu.cn                                                                                          *
   6          **                                                                                                                                                                         *
   7          **                                                                                                                                                                                                         *
   8          ** file    name   : test.c                                                                                                                                                         *
   9          ** creat   date   : 2007年7月13日                                                                                                                                          *
  10          ** correct date   :                                                                                                                                                                *
  11          ** description    :                                                                                                                                                                *
  12          **                :                                                                                                                                                                *
  13          **                :                                                                                                                                                                *
  14          ** version        :                                                                                                                                                                *
  15          ** designed by    :                                                                                                                                                                *
  16          ;**---------------------------------------------------------------------------------------------------*/
  17          
  18          
  19          /******************************
  20           *      Head File                         *
  21           *****************************/
  22           #include"KeyBord\key.h"
  23           #include"LCD\lcd.h"
  24           #include"COM\comm.h"
  25           #include"PS2KeyBord\PS2KeyBord.h"
  26          /******************************
  27           *     Macros Segment             *
  28           *****************************/
  29          
  30          /******************************
  31           *     Global Variable            *
  32           *****************************/
  33           int timecount=0; 
  34           
  35           /*uchar g_ucPSkeydata = 0x00;  
  36           uchar ucRecBuf_ptr=0x00;
  37           uchar ucRecBuf[11];
  38           uchar cntOddNum = 0x00;
  39           
  40           //extern void Int0_init_PSkeybord(void);
  41           //extern void GetData(void);
  42           //extern void DataReceive(void); 
  43           //extern uchar PSkeydata_value(void);
  44          
  45          
  46           void Int0_init_PSkeybord(void)
  47          {
  48                  TMOD = 0x01; //选择定时/计数器0,做定时器用,选择模式1,THx和TLx构成全16位计数器
  49                  TL0 = 0x00;     //定时器中断时间为2.5ms
  50                  TH0 = 0xee; //65536 - 0.0025/(12/22118400)=X,反解求出
  51                  TR0 = 0x01;     //开启定时器0
  52                  IE = 0x83;      //允许全局中断,允许定时器/计数器0溢出中断
  53                  PT1 = 0x00;
  54                  PX0 = 0x01;
  55          
C51 COMPILER V8.05a   MAIN                                                                 08/11/2007 16:36:19 PAGE 2   

  56          }
  57          uchar oddCheck(void)
  58          {
  59                  uchar tmp;
  60                  for(tmp=0;tmp<9;tmp++)
  61                  {
  62                          if(ucRecBuf[tmp+1]==0x01)
  63                                  cntOddNum++;
  64                  }
  65                  if(cntOddNum%2 == 1)
  66                          return 0x01;
  67                  else return 0x00;
  68          }  
  69           void GetData(void)
  70          {       
  71                  uchar tmp,tmp2;
  72                  if(oddCheck())
  73                  {
  74                          tmp2 = g_ucPSkeydata;
  75                          g_ucPSkeydata = 0x00;
  76                          for(tmp=0;tmp<0x08;tmp++)
  77                          {  
  78                                  g_ucPSkeydata |= ucRecBuf[tmp+1]<<tmp;          
  79                          }
  80                          if(g_ucPSkeydata == 0xf0)
  81                                  g_ucPSkeydata = tmp2;           
  82                  }       
  83          }
  84          void DataReceive(void)
  85          {       
  86                  if(ucRecBuf_ptr<=0x0a)
  87                  {       
  88                     if(P3_2 == 0)           
  89                     {
  90                                  ucRecBuf[ucRecBuf_ptr] = P3_7; 
  91                                  ucRecBuf_ptr++;
  92                     }
  93                     
  94                  }
  95                  else
  96                  {
  97                          GetData();      
  98                          ucRecBuf_ptr = 0x00;
  99                  }               
 100            
 101          } */
 102          
 103          /******************************
 104           *         Const Segment                  *
 105           *****************************/
 106          
 107          /******************************
 108           *     Function Declaration       *
 109           *****************************/
 110            void Timer0_init(void);
 111            void Device_init(void); 
 112            void Int0_init(void); 
 113          
 114            
 115          
 116          /******************************

⌨️ 快捷键说明

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