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

📄 9325tp.lst

📁 2.4tft彩屏教程
💻 LST
字号:
C51 COMPILER V7.06   9325TP                                                                07/13/2010 00:43:21 PAGE 1   


C51 COMPILER V7.06, COMPILATION OF MODULE 9325TP
OBJECT MODULE PLACED IN 9325TP.OBJ
COMPILER INVOKED BY: d:\Keil\C51\BIN\C51.EXE 9325TP.C BROWSE DEBUG OBJECTEXTEND

stmt level    source

   1          
   2          #include"reg52.h"
   3          
   4          #define WINDOW_XADDR_START      0x0050 // Horizontal Start Address Set
   5          #define WINDOW_XADDR_END        0x0051 // Horizontal End Address Set
   6          #define WINDOW_YADDR_START      0x0052 // Vertical Start Address Set
   7          #define WINDOW_YADDR_END        0x0053 // Vertical End Address Set
   8          #define GRAM_XADDR                  0x0020 // GRAM Horizontal Address Set
   9          #define GRAM_YADDR                  0x0021 // GRAM Vertical Address Set
  10          #define GRAMWR                      0x0022 // memory write
  11          
  12          /* LCD color */
  13          #define White          0xFFFF
  14          #define Black          0x0000
  15          #define Blue           0x001F
  16          #define Blue2          0x051F
  17          #define Red            0xF800
  18          #define Magenta        0xF81F
  19          #define Green          0x07E0
  20          #define Cyan           0x7FFF
  21          #define Yellow         0xFFE0
  22          
  23          sbit CS=P2^2;           //片选
  24          sbit RES=P2^1;          //复位
  25          sbit RS=P2^4;           //数据/命令选择
  26          sbit RW=P2^5;
  27                              //数据口使用P0
  28          //====================================================//
  29          
  30          void main (void);
  31          void ILI9325_Initial(void);
  32          void show_colour_bar (void);
  33          void Write_Cmd_Data(unsigned char x, unsigned int y);
  34          void Write_Cmd(unsigned char DH,unsigned char DL);
  35          void Write_Data(unsigned char DH,unsigned char DL);
  36          void delayms(unsigned int tt);
  37          void show_photo(void);
  38          void Show_RGB (unsigned int x0,unsigned int x1,unsigned int y0,unsigned int y1,unsigned int Color);
  39          unsigned char code pic[];
  40          void  Write_Data_U16(unsigned int y);
  41          static void LCD_SetPos(unsigned int x0,unsigned int x1,unsigned int y0,unsigned int y1);
  42          void ClearScreen(unsigned int bColor);
  43          void LCD_PutChar8x16(unsigned short x, unsigned short y, char c, unsigned int fColor, unsigned int bColor)
             -;
  44          void LCD_PutChar(unsigned short x, unsigned short y, char c, unsigned int fColor, unsigned int bColor);
  45          void LCD_PutString(unsigned short x, unsigned short y, char *s, unsigned int fColor, unsigned int bColor);
  46          
  47          void LCD_PutChar8x8(unsigned short x, unsigned short y, char c, unsigned int fColor, unsigned int bColor);
  48          void PutGB1616(unsigned short x, unsigned short  y, unsigned char c[2], unsigned int fColor,unsigned int b
             -Color);
  49          void PutGB3232(unsigned short x, unsigned short  y, unsigned char c[2], unsigned int fColor,unsigned int b
             -Color);
  50          //================================================//
  51          
  52          void  main(void)
C51 COMPILER V7.06   9325TP                                                                07/13/2010 00:43:21 PAGE 2   

  53          {   
  54   1              CS=1;
  55   1              delayms(5);
  56   1              RES=0;
  57   1              delayms(5);
  58   1              RES=1;
  59   1              delayms(5);
  60   1              ILI9325_Initial();
  61   1              while(1)
  62   1              {
  63   2              
  64   2      
  65   2      
  66   2      ClearScreen(Blue); //清屏
  67   2      
  68   2      //show_colour_bar();    
  69   2      
  70   2      
  71   2      LCD_PutString(0,40,"www.doflye.net",White,Blue);                  ///前景颜色和背景颜色,可以直接预定义,

⌨️ 快捷键说明

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