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

📄 t6963.lst

📁 简易数字存储示波器
💻 LST
字号:
C51 COMPILER V7.50   T6963                                                                 04/19/2008 15:16:25 PAGE 1   


C51 COMPILER V7.50, COMPILATION OF MODULE T6963
OBJECT MODULE PLACED IN T6963.OBJ
COMPILER INVOKED BY: C:\Keil\C51\BIN\C51.EXE T6963.c

line level    source

   1          #include"T6963.h"
   2          #include"regx52.h"
   3          #include "absacc.h"
   4          #include"math.h"
   5          
   6          unsigned char xdata ins _at_   0xe000;     //命令写地址
   7          unsigned char xdata dat _at_   0xa000;     //数据写地址
   8          unsigned char xdata ins_R _at_ 0xc000;     //命令读地址
   9          
  10          // 外部RAM地址0x800-0xfff
  11          
  12          void stste_check(void)  //状态检测
  13          {
  14   1              while((ins_R & 0x03) != 0x03); 
  15   1      }
  16          
  17          void ins_write(unsigned char s)      //写一个命令
  18          {
  19   1              stste_check();
  20   1              ins=s;
  21   1      }
  22          
  23          void dat_write(unsigned char d)      //写一个数据
  24          {
  25   1              stste_check();
  26   1              dat=d;
  27   1      }
  28          
  29          void set_gra_pos(unsigned char x,unsigned char y)   //x:0-16  y:0-127   设置图形区坐标
  30          {
  31   1              unsigned int temp=x+16*y;
  32   1              dat_write((unsigned char)(temp&0xff));
  33   1              dat_write((unsigned char)(temp>>8)+0x08);  
  34   1              ins_write(0x24);
  35   1      }
  36          
  37          void set_text_pos(unsigned char x,unsigned char y)  //x:0-16  y:0-16    设置文本区坐标
  38          {
  39   1              unsigned int temp=x+16*y;
  40   1              dat_write((unsigned char)(temp&0xff));
  41   1              dat_write((unsigned char)(temp>>8));  
  42   1              ins_write(0x24);
  43   1      }
  44          void lcd_init(void)              //初始化LCD
  45          {
  46   1              dat_write(0);//设置文本显示区域首地址
  47   1              dat_write(0);
  48   1              ins_write(0x40);
  49   1      
  50   1              dat_write(0x10);//设置文本显示区域宽度
  51   1              dat_write(0);   //即一行显示所占的字节数
  52   1              ins_write(0x41);
  53   1      
  54   1              dat_write(0x0);//设置图形显示区域首地址
  55   1              dat_write(0x08);  
C51 COMPILER V7.50   T6963                                                                 04/19/2008 15:16:25 PAGE 2   

  56   1              ins_write(0x42);
  57   1      
  58   1              dat_write(0x10);//设置图形显示区域宽度
  59   1              dat_write(0);   
  60   1              ins_write(0x43);
  61   1              
  62   1              ins_write(0xa1);//光标形状设置
  63   1      
  64   1              ins_write(0x80);//显示或合成
  65   1      
  66   1              ins_write(0x9c);//显示开关设置
  67   1      
  68   1              dat_write(0);//设置显示RAM首地址
  69   1              dat_write(0x08);  
  70   1              ins_write(0x24);
  71   1      }
  72          
  73          void lcd_char(unsigned char c)
  74          {
  75   1              dat_write(c-32);
  76   1              ins_write(0xc0);
  77   1      }
  78          
  79          void pixel(unsigned char x,unsigned char y)   //x:0-127  y:0-127   显示一个点
  80          {
  81   1              unsigned char temp;
  82   1              temp=x>>3;
  83   1          set_gra_pos(temp,y);
  84   1              temp=(7-(x % 8))&(0x07);
  85   1              
  86   1          temp = 0xF0 | temp | 0x08; // 字节内位置计算
  87   1          ins_write(temp); 
  88   1      }
  89          
  90          void gracls(void)
  91          {
  92   1              unsigned char i,j;
  93   1              set_gra_pos(0,0);
  94   1              ins_write(0xb0);
  95   1              for(i=0;i<=33;i++)
  96   1              {
  97   2                      for(j=0;j<=15;j++)
  98   2                      {
  99   3                              dat_write(0);   
 100   3                      }
 101   2              }
 102   1              ins_write(0xb2);
 103   1      }


MODULE INFORMATION:   STATIC OVERLAYABLE
   CODE SIZE        =    244    ----
   CONSTANT SIZE    =   ----    ----
   XDATA SIZE       =   ----    ----
   PDATA SIZE       =   ----    ----
   DATA SIZE        =   ----    ----
   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 + -