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

📄 main.lst

📁 12232液晶单片机驱动程序源代码
💻 LST
📖 第 1 页 / 共 3 页
字号:
C51 COMPILER V6.00i MAIN                                                                   07/16/2004 10:11:59 PAGE 1   


C51 COMPILER 6.00i, COMPILATION OF MODULE MAIN
OBJECT MODULE PLACED IN main.OBJ
COMPILER INVOKED BY: G:\mywork\cygnal单片机\CYGNAL\IDEfiles\C51\BIN\C51.exe main.c DB OE

stmt level    source

   1          //#include "REG51F.H"
   2          //#include "c8051F020.h"
   3          //#include "absacc.h" 
   4          //#include "string.h"
   5          //#include "stdio.h"
   6          //#include "intrins.h"
   7          //#include <MfRcuC.h>
   8          //#include <MfRc500R.h>
   9          //#include <MfErrNo.h>
  10          //don't del above test,else will don't open .c 
  11          #include "c8051F020.h"
  12          #include "absacc.h" 
  13          #include "string.h"
  14          #include "stdio.h"
  15          #include "intrins.h"
  16          #include <MfRcuC.h>
  17          #include <MfRc500R.h>
  18          #include <MfErrNo.h>
  19          #include <I2c.h>
  20          
  21          /////////////////////////////////液晶测试
  22          #define uchar unsigned char
  23          
  24          //#define data  1
  25          #define comm  0
  26          #define f_page  0xb8
  27          #define f_row   0xc0
  28          #define f_line  0x00
  29          //#define LCD12232_DATA P2 //数据口
  30          
  31          //******************************************************************
  32          // 串口1中断服务相应定义
  33          unsigned char xdata Receive_Buf_UART1[30];// UART1 RECEIVE buffer
  34          unsigned char xdata UART1_Receive_Len;	
  35          bit Receive_Flag_UART1=0,Padding_Flag_UART1=0,UART1_Rec_Complete=0; // UART1 RECEIVE FLAG
  36          //********************************************************************
  37          unsigned char xdata MLastSelectedSnr[5];
  38          unsigned char xdata Returnval; 
  39          unsigned char xdata MRcvBuffer[64] ,MSndBuffer[16]; //
  40          static MfCmdInfo  MInfo;
  41          unsigned char status=0;
  42          //********************************************
  43          bit haveset=0;
  44          sbit PReset=P1^3;
  45          //sbit csflash=P1^1;
  46          sbit csrc500=P1^2;
  47          sbit csrtc=P1^1;
  48          sbit DIR=P1^4;   //DIR=1时发送
  49          sbit speak=P1^7;
  50          
  51          sbit rst=P1^1;
  52          
  53          sbit e1 =P1^5;
  54          sbit e2 =P1^6;
  55          sbit rw =P1^7;
C51 COMPILER V6.00i MAIN                                                                   07/16/2004 10:11:59 PAGE 2   

  56          sbit a0 =P1^4;
  57          
  58          sbit bf =P2^7;
  59          
  60          uchar code tab1[]={
  61          0x0,0x22,0x64,0x0C,0x80,0x04, 0x74, 0x84, 
  62             0x04, 0x04, 0x04,0x0C4, 0x3E, 0x04, 0x00, 0x00, 
  63             0x04, 0x04, 0x7E, 0x01, 0x80, 0x40, 0x20, 0x11, 
  64             0x0A, 0x04, 0x0B, 0x10, 0x60,0x0C0, 0x40, 0x00, 
  65          /*--  文字:  国  --*/
  66          0x00,0xFE,0x02,0x0A,0x8A,0x8A,0x8A,0xFA,0x8A,0x8A,0x8A,0x0A,0x02,0xFE,0x00,0x00,
  67          0x00,0xFF,0x40,0x48,0x48,0x48,0x48,0x4F,0x48,0x49,0x4E,0x48,0x40,0xFF,0x00,0x00,
  68          /*--  文字:  技  --*/
  69          0x08,0x08,0x88,0xFF,0x48,0x28,0x00,0xC8,0x48,0x48,0x7F,0x48,0xC8,0x48,0x08,0x00,
  70          0x01,0x41,0x80,0x7F,0x00,0x40,0x40,0x20,0x13,0x0C,0x0C,0x12,0x21,0x60,0x20,0x00,
  71          /*--  文字:  肇  --*/
  72          0x80,0x60,0x1C,0x95,0x96,0x94,0x9C,0xC8,0xA4,0xAF,0x94,0x94,0x2C,0x44,0x44,0x00,
  73          0x20,0x22,0x2A,0x2A,0x2A,0x2A,0x2A,0xFF,0x2A,0x2A,0x2A,0x2F,0x22,0x22,0x20,0x00,
  74          /*--  文字:  有  --*/
  75          0x00,0x04,0x84,0x44,0xE4,0x34,0x2C,0x27,0x24,0x24,0x24,0xE4,0x04,0x04,0x04,0x00,
  76          0x02,0x01,0x00,0x00,0xFF,0x09,0x09,0x09,0x29,0x49,0xC9,0x7F,0x00,0x00,0x00,0x00,
  77          /*--  文字:  庆  --*/
  78          0x00,0x00,0xFC,0x44,0x44,0x44,0x44,0xC5,0x7E,0xC4,0x44,0x44,0x44,0x44,0x44,0x00,
  79          0x40,0x30,0x0F,0x40,0x20,0x10,0x0C,0x03,0x00,0x01,0x06,0x18,0x30,0x60,0x20,0x00,
  80          /*--  文字:  限  --*/
  81          0xFE,0x02,0x32,0x4E,0x82,0x00,0xFE,0x4A,0xCA,0x4A,0x4A,0x4A,0x7E,0x00,0x00,0x00,
  82          0xFF,0x00,0x02,0x04,0x03,0x00,0xFF,0x40,0x20,0x03,0x0C,0x12,0x21,0x60,0x20,0x00,
  83          /*--  文字:  金  --*/
  84          0x40,0x40,0x20,0x20,0x50,0x48,0x44,0xC3,0x44,0x48,0x50,0x50,0x20,0x60,0x20,0x00,
  85          0x40,0x40,0x42,0x42,0x4A,0x72,0x42,0x7F,0x42,0x62,0x5A,0x42,0x42,0x40,0x40,0x00,
  86          /*--  文字:  公  --*/
  87          0x00,0x00,0x80,0x40,0x30,0x0E,0x84,0x00,0x00,0x0E,0x10,0x60,0xC0,0x80,0x80,0x00,
  88          0x00,0x01,0x20,0x70,0x28,0x24,0x23,0x31,0x10,0x10,0x14,0x78,0x30,0x01,0x00,0x00,
  89          /*--  文字:  鹏  --*/
  90          0x00,0xFE,0x12,0xFE,0x00,0xFE,0x12,0xFE,0x00,0xFC,0x0E,0x35,0x44,0x7C,0x00,0x00,
  91          0x20,0x1F,0x21,0x7F,0x20,0x1F,0x41,0x7F,0x08,0x09,0x09,0x29,0x49,0x21,0x1F,0x00,
  92          /*--  文字:  司  --*/
  93          0x00,0x10,0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x12,0x02,0x02,0xFE,0x00,0x00,
  94          0x00,0x00,0x1F,0x04,0x04,0x04,0x04,0x04,0x04,0x0F,0x00,0x20,0x40,0x3F,0x00,0x00
  95          };
  96          
  97          
  98          uchar code tab2[]={
  99          //--  文字:  8  --
 100          0x00,0x70,0x88,0x08,0x08,0x88,0x70,0x00,0x00,0x1C,0x22,0x21,0x21,0x22,0x1C,0x00,
 101          //--  文字:  G  --
 102          0xC0,0x30,0x08,0x08,0x08,0x38,0x00,0x00,0x07,0x18,0x20,0x20,0x22,0x1E,0x02,0x00,
 103          //--  文字:  6  --
 104          0x00,0xE0,0x10,0x88,0x88,0x18,0x00,0x00,0x00,0x0F,0x11,0x20,0x20,0x11,0x0E,0x00,
 105          //--  文字:  o  --
 106          0x00,0x00,0x80,0x80,0x80,0x80,0x00,0x00,0x00,0x1F,0x20,0x20,0x20,0x20,0x1F,0x00,
 107          //--  文字:  -  --
 108          0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
 109          //--  文字:  l  --
 110          0x00,0x08,0x08,0xF8,0x00,0x00,0x00,0x00,0x00,0x20,0x20,0x3F,0x20,0x20,0x00,0x00,
 111          //--  文字:  7  --
 112          0x00,0x38,0x08,0x08,0xC8,0x38,0x08,0x00,0x00,0x00,0x00,0x3F,0x00,0x00,0x00,0x00,
 113          //--  文字:  d  --
 114          0x00,0x00,0x00,0x80,0x80,0x88,0xF8,0x00,0x00,0x0E,0x11,0x20,0x20,0x10,0x3F,0x20,
 115          //--  文字:  5  --
 116          0x00,0xF8,0x08,0x88,0x88,0x08,0x08,0x00,0x00,0x19,0x21,0x20,0x20,0x11,0x0E,0x00,
 117          //--  文字:  e  --
C51 COMPILER V6.00i MAIN                                                                   07/16/2004 10:11:59 PAGE 3   

 118          0x00,0x00,0x80,0x80,0x80,0x80,0x00,0x00,0x00,0x1F,0x22,0x22,0x22,0x22,0x13,0x00,
 119          //--  文字:  8  --
 120          0x00,0x70,0x88,0x08,0x08,0x88,0x70,0x00,0x00,0x1C,0x22,0x21,0x21,0x22,0x1C,0x00,
 121          //--  文字:  n  --
 122          0x80,0x80,0x00,0x80,0x80,0x80,0x00,0x00,0x20,0x3F,0x21,0x00,0x00,0x20,0x3F,0x20,
 123          //--  文字:  -  --
 124          0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
 125          //--  文字:  P  --
 126          0x08,0xF8,0x08,0x08,0x08,0x08,0xF0,0x00,0x20,0x3F,0x21,0x01,0x01,0x01,0x00,0x00,
 127          //--  文字:  2  --
 128          0x00,0x70,0x08,0x08,0x08,0x88,0x70,0x00,0x00,0x30,0x28,0x24,0x22,0x21,0x30,0x00,
 129          //--  文字:  a  --
 130          0x00,0x00,0x80,0x80,0x80,0x80,0x00,0x00,0x00,0x19,0x24,0x22,0x22,0x22,0x3F,0x20,
 131          //--  文字:  2  --
 132          0x00,0x70,0x08,0x08,0x08,0x88,0x70,0x00,0x00,0x30,0x28,0x24,0x22,0x21,0x30,0x00,
 133          //--  文字:  l  --
 134          0x00,0x08,0x08,0xF8,0x00,0x00,0x00,0x00,0x00,0x20,0x20,0x3F,0x20,0x20,0x00,0x00,
 135          //--  文字:  2  --
 136          0x00,0x70,0x08,0x08,0x08,0x88,0x70,0x00,0x00,0x30,0x28,0x24,0x22,0x21,0x30,0x00,
 137          //--  文字:  m  --
 138          0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x00,0x20,0x3F,0x20,0x00,0x3F,0x20,0x00,0x3F,
 139          //--  文字:  3  --
 140          0x00,0x30,0x08,0x88,0x88,0x48,0x30,0x00,0x00,0x18,0x20,0x20,0x20,0x11,0x0E,0x00,
 141          //--  文字:     --
 142          0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
 143          //--  文字:  1  --
 144          0x00,0x10,0x10,0xF8,0x00,0x00,0x00,0x00,0x00,0x20,0x20,0x3F,0x20,0x20,0x00,0x00,
 145          //--  文字:  L  --
 146          0x08,0xF8,0x08,0x00,0x00,0x00,0x00,0x00,0x20,0x3F,0x20,0x20,0x20,0x20,0x30,0x00,
 147          //--  文字:  9  --
 148          0x00,0xE0,0x10,0x08,0x08,0x10,0xE0,0x00,0x00,0x00,0x31,0x22,0x22,0x11,0x0F,0x00,
 149          //--  文字:  C  --
 150          0xC0,0x30,0x08,0x08,0x08,0x08,0x38,0x00,0x07,0x18,0x20,0x20,0x20,0x10,0x08,0x00,
 151          //--  文字:  6  --
 152          0x00,0xE0,0x10,0x88,0x88,0x18,0x00,0x00,0x00,0x0F,0x11,0x20,0x20,0x11,0x0E,0x00,
 153          //--  文字:  M  --
 154          0x08,0xF8,0xF8,0x00,0xF8,0xF8,0x08,0x00,0x20,0x3F,0x00,0x3F,0x00,0x3F,0x20,0x00
 155          };
 156          
 157          uchar code tab3[488]={
 158          //--  调入了一幅图像:F:\梁\其它\HOCO12232.bmp  --
 159          //--  宽度x高度=122x32  --
 160          0x00,0x00,0x00,0x70,0xF8,0xF8,0xFC,0xFC,0xFE,0xFE,0xFE,0xFE,0xFC,0xFC,0xF0,0xE0,
 161          0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
 162          0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
 163          0x00,0x00,0x00,0x80,0x40,0x20,0x10,0x48,0xD4,0xB4,0x62,0xC2,0x82,0x03,0x02,0x02,
 164          0x02,0x84,0xC4,0xE0,0xA0,0xE0,0x60,0x20,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
 165          0x00,0x00,0x00,0x00,0x00,0x80,0xE0,0xB0,0xF8,0xF0,0xF0,0xF8,0xFC,0x60,0x60,0x30,
 166          0x18,0x00,0x00,0x00,0x80,0xC0,0xE0,0xE0,0xF0,0xF0,0xF0,0xD8,0x58,0x58,0x58,0x58,
 167          0x58,0xD8,0xD8,0x98,0xB0,0x30,0x70,0xE0,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x07,
 168          0x07,0x07,0x02,0x7F,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFE,0xFC,0xFC,0xFC,0xFC,
 169          0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xF8,0xF0,0xC0,0x00,0x00,0x00,0x00,0x00,
 170          0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFE,0x01,0x00,0x04,
 171          0x0D,0x1B,0x36,0x6D,0xDB,0xF6,0xED,0xFB,0xFE,0xFE,0xFF,0x7F,0x1F,0x07,0x01,0x00,
 172          0x00,0x00,0xF0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF8,0xFC,0xFE,0xFE,
 173          0xFE,0xFF,0xFF,0xFF,0xFF,0xFF,0xFE,0xFC,0xE0,0xC0,0xC0,0xF8,0xFE,0xFF,0xFF,0xFF,
 174          0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFE,0x3E,0xF8,0x01,0x37,
 175          0x0C,0x00,0x1F,0x00,0x00,0x00,0x00,0x00,0x60,0xFF,0xC7,0x03,0x03,0x03,0x03,0xE1,
 176          0xFF,0x3F,0x0F,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x0F,0x3F,0x7F,0xFF,0xEF,
 177          0xBF,0x7F,0xFF,0xC7,0x07,0x1F,0xFE,0xF8,0xB0,0x60,0x80,0x00,0x00,0x00,0x00,0x00,
 178          0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x04,0x08,0x10,0x20,0x40,0x40,0x80,0x83,
 179          0xFF,0xFF,0xFF,0xFF,0x83,0x40,0x40,0x20,0x10,0x08,0x04,0x03,0x00,0x00,0x00,0x00,
C51 COMPILER V6.00i MAIN                                                                   07/16/2004 10:11:59 PAGE 4   

 180          0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x03,0x03,0x07,0x0F,0x1F,0x3F,0x3F,0x7F,0xFF,
 181          0xFF,0x7F,0x7F,0xFF,0xFF,0xFF,0xFF,0xDF,0x3F,0x3F,0x0F,0x61,0x3F,0x1F,0x2F,0x3F,
 182          0x1F,0x0F,0x00,0x0F,0x07,0x03,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
 183          0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x18,0x1E,0x07,0x00,0x00,0x00,0x00,0x00,0x00,
 184          0x00,0x00,0x00,0x00,0x00,0x40,0x60,0x70,0x3C,0x1F,0x07,0x03,0x01,0x01,0x00,0x00,
 185          0x01,0x07,0x07,0x01,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x7C,0x44,0xEC,0x00,
 186          0x7C,0x44,0x7C,0x00,0x7C,0x40,0x40,0x00,0x7C,0x44,0x38,0x00,0x7C,0x14,0x1C,0x00,
 187          0x7C,0x40,0x40,0x00,0x78,0x24,0x78,0x00,0x7C,0x18,0x18,0x7C,0x00,0x00,0x00,0x00,
 188          0x00,0x00,0x00,0x20,0x20,0x20,0x20,0x10,0x04,0x07,0x00,0x01,0x00,0x00,0x00,0x01,
 189          0x05,0x03,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
 190          0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
 191          };
 192          
 193          /****************************************************************************
 194          *                                                                           *
 195          * Function:     main                                                        *
 196          *                                                                           *
 197          * Input:        -                                                           *
 198          * Output:       -                                                           *
 199          *                                                                           *
 200          * Description:                                                              *
 201          ****************************************************************************/
 202          void main(void)
 203          {
 204   1       // unsigned char idata i;
 205   1        unsigned char xdata catq[2],csn[5];
 206   1        unsigned char xdata rbuf[16]={0};
 207   1        unsigned char xdata keybuf[6],keycodebuf[12],temp_buf[17];
 208   1        unsigned char xdata sector_num;  //扇区绝对号
 209   1        unsigned char xdata selec_abkey;  //key a b selector
 210   1        unsigned char xdata block_num;    //块绝对号
 211   1        unsigned char xdata e2key_secotor;
 212   1       // unsigned short idata rc500_e2addr;
 213   1        unsigned short delay;
 214   1        unsigned char xdata i,j,buff[40];
 215   1       
 216   1      	OSCXCN = 0x67;					// Enable external crystal	
 217   1      	WDTCN = 0xDE;					// disable watchdog timer
 218   1      	WDTCN = 0xAD;
 219   1      
 220   1          EMI0CF = 0x07;	      			// Set External Memory Configuration Register,
 221   1      	                                //使用片内 4K 和片外存储器低端口,地址数据复用

⌨️ 快捷键说明

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