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

📄 t6963init.lst

📁 ad准确采集
💻 LST
字号:
C51 COMPILER V6.23a  T6963INIT                                                             10/27/2004 16:04:59 PAGE 1   


C51 COMPILER V6.23a, COMPILATION OF MODULE T6963INIT
OBJECT MODULE PLACED IN t6963init.OBJ
COMPILER INVOKED BY: C:\Keil\C51\BIN\c51.exe t6963init.H DB OE

stmt level    source

   1          
   2          /********************************************
   3           * Filename: t6963init.h                        *
   4           *                                          *
   5           * Description: Header file for t6963.c     *
   6           *                                          *
   7           *                                          *
   8           * Date: 06/02/2003                         *
   9           *******************************************/
  10          
  11          
  12          
  13          //-----------------------------------------------------------------------------
  14          // LCD的常量定义
  15          //-----------------------------------------------------------------------------
  16          /* Pragmas */
  17          //#pragma CLOCK_FREQ      4000000
  18          //#include <C8051F020.H> 
  19          /* LCD Parameters */
  20          
  21          //#define LCD_TEXT_WIDTH   0x1E       /* Text Width = Graphics Width / Character Width */
  22          //#define LCD_TEXT_WIDTH          0x20    //MODIFY
  23          //#define LCD_TEXT_HEIGHT         0x10    //MODIFY
  24          //#define LCD_TEXT_HEIGHT         0x08    /* Text Height = Graphics Height / Character Height */
  25          //#define LCD_GRAPHICS_WIDTH      0xF0    /* Width of display (0xA0 = 240 pixels) */
  26          //#define LCD_GRAPHICS_HEIGHT     0x80    /* Height of display (0x80 = 128 pixels) */
  27          //#define LCD_NUMBER_OF_SCREENS   0x02    /* for > 68 pixels height, is probably split into 2 screens */
  28          #define LCD_CHARACTER_WIDTH     0x08    /* Is character 8x8 or 6x8 (0x08 / 0x06) */ 
  29          
  30          #define LCD_TEXT_HOME       0x0000  /* Graphics Area + Text Attribute Size (same size as text size) */
  31          #define LCD_TEXT_AREA       0x1E    /* Text line is 30 chars wide */
  32          #define LCD_TEXT_SIZE       0x01E0  /* Size of text RAM */                                       /* into 2
             - screens */
  33          
  34          
  35          /* Define the Memory Map */
  36          #define LCD_GRAPHICS_HOME   0x01E0  /* This will usually be at the start of RAM */
  37          //#define LCD_GRAPHICS_AREA   0x1E    /* A graphic character is 8 bits wide (same as 8x8 char) */
  38          
  39          #define LCD_GRAPHICS_AREA   0x1E    //MODIFY
  40          //#define LCD_GRAPHICS_SIZE   0x0800  /* Size of graphics RAM */
  41          #define LCD_GRAPHICS_SIZE   0x0F00
  42          
  43          
  44          /*  Memory Map for 240x128 pixel display */
  45          /*  This display is made up of two screens */
  46          /*  Both 240x64 pixels */
  47          
  48          /*  Screen 1 */
  49          
  50          /*  0x0000  ----------------------------- */
  51          /*          | Graphic RAM Area          | */
  52          /*          | 0x0000 to 0x07FF          | */
  53          /*          | (256x64 pixels)           | */
  54          /*  0x0800  ----------------------------- */
C51 COMPILER V6.23a  T6963INIT                                                             10/27/2004 16:04:59 PAGE 2   

  55          /*          | Text Attribute Area       | */
  56          /*  0x0A00  ----------------------------- */
  57          /*          | Text RAM Area             | */
  58          /*          | 512 Bytes                 | */
  59          /*          | (256x64 pixels)           | */
  60          /*  0x0C00  ----------------------------- */
  61          
  62          /*  Screen 2 (Automatically derived from Screen 1) */
  63          
  64          /*  0x8000  ----------------------------- */
  65          /*          | Graphic RAM Area          | */
  66          /*          | 0x0000 to 0x07FF          | */
  67          /*          | (256x64 pixels)           | */
  68          /*  0x8800  ----------------------------- */
  69          /*          | Text Attribute Area       | */
  70          /*  0x8A00  ----------------------------- */
  71          /*          | Text RAM Area             | */
  72          /*          | 512 Bytes                 | */
  73          /*          | (256x64 pixels)           | */
  74          /*  0x8C00  ----------------------------- */
  75          
  76          
  77          /* LCD Data Bus Pins */
  78          #define LCD_DATA_BUS        P7
  79          #define LCD_DATA_BUS_TRIS   P74OUT
  80          
  81          /* LCD Control Pins */
  82          #define LCD_CONTROL         P2
  83          #define LCD_CONTROL_TRIS    P2MDOUT
  84          #define LCD_WR_BIT          0x07
  85          #define LCD_RD_BIT          0x06
  86          #define LCD_CE_BIT          0x02
  87          #define LCD_CD_BIT          0x03
  88          #define LCD_RST_BIT         0x04
  89          
  90          #define LCD_WR              0x80
  91          #define LCD_RD              0x40
  92          #define LCD_CE              0x04
  93          #define LCD_CD              0x08
  94          #define LCD_RST             0x10
  95          
  96          /* Control Word Definitions */
  97          #define LCD_CURSOR_POINTER_SET          0x21
  98          #define LCD_OFFSET_REGISTER_SET         0x22
  99          #define LCD_ADDRESS_POINTER_SET         0x24
 100          
 101          #define LCD_TEXT_HOME_ADDRESS_SET       0x40
 102          #define LCD_TEXT_AREA_SET               0x41
 103          #define LCD_GRAPHIC_HOME_ADDRESS_SET    0x42
 104          #define LCD_GRAPHIC_AREA_SET            0x43
 105          
 106          #define LCD_CG_ROM_MODE_OR              0x80
 107          #define LCD_CG_ROM_MODE_EXOR            0x81
 108          #define LCD_CG_ROM_MODE_AND             0x83
 109          #define LCD_CG_ROM_MODE_TEXT            0x84
 110          #define LCD_CG_RAM_MODE_OR              0x88
 111          #define LCD_CG_RAM_MODE_EXOR            0x89
 112          #define LCD_CG_RAM_MODE_AND             0x8B
 113          #define LCD_CG_RAM_MODE_TEXT            0x8C
 114          
 115          /* 1001 0000 is all off, OR together for ON modes */
 116          #define LCD_DISPLAY_MODES_ALL_OFF       0x90
C51 COMPILER V6.23a  T6963INIT                                                             10/27/2004 16:04:59 PAGE 3   

 117          #define LCD_DISPLAY_MODES_GRAPHICS_ON   0x98
 118          #define LCD_DISPLAY_MODES_TEXT_ON       0x94
 119          #define LCD_DISPLAY_MODES_CURSOR_ON     0x92
 120          #define LCD_DISPLAY_MODES_CURSOR_BLINK  0x91
 121          
 122          /* Cursor Pattern Select */
 123          #define LCD_CURSOR_PATTERN_UNDERLINE    0xA0
 124          #define LCD_CURSOR_PATTERN_BLOCK        0xA7
 125          /* Send Auto_XX Command, then block of data, then Auto_reset */
 126          #define LCD_DATA_AUTO_WRITE_SET         0xB0
 127          #define LCD_DATA_AUTO_READ_SET          0xB1
 128          #define LCD_DATA_AUTO_RESET             0xB2
 129          /* Send R/W Then one byte Data */
 130          #define LCD_DATA_WRITE_AUTO_INCREMENT   0xC0
 131          #define LCD_DATA_READ_AUTO_INCREMENT    0xC1
 132          #define LCD_DATA_WRITE_NO_INCREMENT     0xC4
 133          #define LCD_DATA_READ_NO_INCREMENT      0xC5
 134          
 135          
 136          /* Status Register Bits */
 137          #define LCD_STATUS_BUSY1    0x01
 138          #define LCD_STATUS_BUSY2    0x02
 139          #define LCD_STATUS_DARRDY   0x04
 140          #define LCD_STATUS_DAWRDY   0x08
 141          
 142          #define LCD_STATUS_CLR      0x20
 143          #define LCD_STATUS_ERR      0x40
 144          #define LCD_STATUS_BLINK    0x80
 145          
 146          /* Definitions */
 147          #define ALL_INPUTS  0x3F
 148          #define ALL_OUTPUTS 0xC0
 149          
 150          
 151          
 152          
 153          
 154          struct CNode{            //汉字显示结点结构体声明
 155                   char  ch[2];//字体存放单元
 156                   unsigned char  dat[32];//汉字字模存放单元
 157          };
 158          
 159          /*      
 160          struct CNode code newhanzi[]=
 161          {
 162            
 163             {"欢",
 164              0x00,0x80,0x00,0x80,0xFC,0x80,0x05,0xFE,0x85,0x04,0x4A,0x48,0x28,0x40,0x10,0x40,
 165              0x18,0x40,0x18,0x60,0x24,0xA0,0x24,0x90,0x41,0x18,0x86,0x0E,0x38,0x04,0x00,0x00,
 166             },
 167             {"迎",
 168              0x40,0x00,0x21,0x80,0x36,0x7C,0x24,0x44,0x04,0x44,0x04,0x44,0xE4,0x44,0x24,0x44,
 169              0x25,0x44,0x26,0x54,0x24,0x48,0x20,0x40,0x20,0x40,0x50,0x00,0x8F,0xFE,0x00,0x00,
 170             },
 171             {"使",
 172              0x08,0x40,0x0C,0x40,0x1B,0xFE,0x10,0x40,0x37,0xFC,0x64,0x44,0xA4,0x44,0x27,0xFC,
 173              0x24,0x44,0x22,0x40,0x21,0x80,0x20,0x80,0x21,0x70,0x22,0x1E,0x2C,0x04,0x00,0x00,
 174             },
 175             {"用",
 176              0x00,0x00,0x1F,0xFC,0x10,0x84,0x10,0x84,0x10,0x84,0x1F,0xFC,0x10,0x84,0x10,0x84,
 177              0x10,0x84,0x1F,0xFC,0x10,0x84,0x10,0x84,0x20,0x84,0x20,0x84,0x40,0x94,0x80,0x88,
 178             },
C51 COMPILER V6.23a  T6963INIT                                                             10/27/2004 16:04:59 PAGE 4   

 179             {"片",
 180              0x00,0x40,0x10,0x40,0x10,0x40,0x10,0x44,0x1F,0xFE,0x10,0x00,0x10,0x00,0x10,0x00,
 181              0x1F,0xF0,0x10,0x10,0x10,0x10,0x10,0x10,0x20,0x10,0x20,0x10,0x40,0x10,0x80,0x10,
 182             },
 183             {"上",
 184              0x00,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0xF8,0x01,0x00,
 185              0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x04,0x7F,0xFE,0x00,0x00,
 186             },
 187             {"数",
 188              0x08,0x20,0x49,0x30,0x2A,0x20,0x1C,0x20,0xFF,0x7E,0x1C,0x44,0x2B,0x44,0x48,0xC4,
 189              0x08,0x28,0xFF,0x28,0x12,0x10,0x34,0x10,0x0C,0x28,0x32,0x4E,0xC0,0x84,0x00,0x00,
 190             },
 191             {"采",
 192              0x00,0x00,0x01,0xF8,0x7E,0x00,0x00,0x10,0x11,0x10,0x08,0xA0,0x01,0x00,0x7F,0xFE,
 193              0x01,0x80,0x03,0x40,0x05,0x20,0x09,0x18,0x31,0x0E,0xC1,0x04,0x01,0x00,0x01,0x00,
 194             },
 195             {"系",
 196              0x00,0x7C,0x3F,0x80,0x02,0x20,0x04,0x20,0x08,0x40,0x1F,0x80,0x03,0x20,0x0C,0x10,
 197              0x3F,0xF8,0x10,0x8C,0x04,0xA0,0x08,0x90,0x10,0x88,0x20,0x84,0x42,0x84,0x01,0x00,
 198             },
 199          
 200             {"统",
 201              0x10,0x40,0x10,0x20,0x23,0xFE,0x20,0x40,0x44,0x40,0xF8,0x88,0x09,0x04,0x13,0xFE,
 202              0x20,0x94,0x7C,0x90,0x00,0x90,0x00,0x90,0x1D,0x12,0xE1,0x12,0x02,0x0E,0x04,0x00,
 203             },
 204            {"A",
 205              0x00,0x00,0x00,0x10,0x10,0x18,0x28,0x28,0x24,0x3C,0x44,0x42,0x42,0xE7,0x00,0x00,
 206             },
 207             {"D",
 208              0x00,0x00,0x00,0xF8,0x44,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x44,0xF8,0x00,0x00,
 209             },
 210             {"样",
 211              0x11,0x08,0x10,0x88,0x10,0x90,0xFD,0xFE,0x10,0x20,0x30,0x20,0x39,0xFC,0x54,0x20,
 212              0x50,0x20,0x90,0x20,0x13,0xFE,0x10,0x20,0x10,0x20,0x10,0x20,0x10,0x20,0x10,0x20,
 213             },
 214             {"值",
 215              0x10,0x40,0x18,0x60,0x17,0xFC,0x10,0x40,0x20,0x80,0x33,0xF8,0x62,0x08,0xA3,0xF8,
 216              0x22,0x08,0x23,0xF8,0x22,0x08,0x23,0xF8,0x22,0x08,0x22,0x08,0x2F,0xFE,0x20,0x00,
 217             },
 218             {":",
 219              0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
 220              0x00,0x00,0x30,0x00,0x30,0x00,0x00,0x00,0x30,0x00,0x30,0x00,0x00,0x00,0x00,0x00,
 221             },
 222          };
 223          */
 224          //void interupt(void);
 225          void lcd_initialise(void);
 226          void lcd_write_data(unsigned char lwd_data);
 227          //unsigned char lcd_read_data(void);
 228          void lcd_write_command(unsigned char lwc_data);
 229          unsigned char lcd_read_status(void);
 230          void lcd_clear_graphics(void);
 231          void lcd_clear_text(void);
 232          void lcd_write_text(unsigned char character, unsigned char x, unsigned char y);
 233          void lcd_set_pixel(unsigned char x, unsigned char y);
 234          void lcd_clear_pixel(unsigned char x, unsigned char y);
 235          unsigned char lcd_bit_to_byte(unsigned char btb_bit);
 236          void delay_ms(int i); 
 237          //void set_bit(unsigned char sb_data, unsigned char sb_bit);
 238          //void clear_bit(unsigned char cb_data, unsigned char cb_bit);
 239          void set_cgram(unsigned char code *ch);
 240          //void new_write_under_picture(unsigned char  o_x,unsigned char o_y,char cch[2]);
C51 COMPILER V6.23a  T6963INIT                                                             10/27/2004 16:04:59 PAGE 5   

 241          void STA_RST(void);
 242          //void SYSCLK_Init(void);
 243          void PORT_Init (void);
 244          void UART0_Init (void);
 245          void ADC0_Init (void);
 246          void Timer3_Init (int counts);
 247          void ADC0_ISR (void);
 248          void SYSCLK_Init_AD (void);
 249          void SYSCLK_Init_LCD(void);


MODULE INFORMATION:   STATIC OVERLAYABLE
   CODE SIZE        =   ----    ----
   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 + -