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

📄 t515.lst

📁 台湾宏芯针对几乎市面所有模拟TFT屏驱动芯片T100-T101-T103-T118系列源代码
💻 LST
字号:
C51 COMPILER V7.50   T515                                                                  01/12/2006 13:31:13 PAGE 1   


C51 COMPILER V7.50, COMPILATION OF MODULE T515
OBJECT MODULE PLACED IN .\Obj\T515.obj
COMPILER INVOKED BY: C:\Keil\C51\BIN\C51.EXE Source\VDD\T515.c BROWSE INCDIR(.\Include\;.\Source\;.\Include\Panel\;.\Inc
                    -lude\GammaTable\) DEFINE(T106) DEBUG OBJECTEXTEND PRINT(.\T515.lst) OBJECT(.\Obj\T515.obj)

line level    source

   1          #include <reg51.h>
   2          #include "math.h"
   3          #include "common.h"
   4          #include "system.h"
   5          #include "struct.h"
   6          #include "T101_Util.h"
   7          #include "TW10xReg.h"
   8          #include "twowire.h"
   9          
  10          #ifdef T515
              #include "T515.h"
              
              extern uCHAR idata m_cStandard;
              extern uCHAR idata m_cSource;
              void T515_CVIDEO_NTSC();
              void T515_CVIDEO_PAL();
              void T515_SVIDEO_NTSC();
              void T515_SVIDEO_PAL();
              void T515_NTSC_PAL();
              
              void Init_T515(void)
              {
                      I2CWriteByte(TW515, 0xE0, 0xB0);
                      I2CWriteByte(TW515, 0x00, 0x00);
                      I2CWriteByte(TW515, 0x01, 0x00);
                      I2CWriteByte(TW515, 0x0A, 0x60);
                      I2CWriteByte(TW515, 0x0B, 0x60);
                      I2CWriteByte(TW515, 0x0D, 0x20);
                      I2CWriteByte(TW515, 0x1A, 0x87);
                      I2CWriteByte(TW515, 0x0F, 0x02);
                      I2CWriteByte(TW515, 0x11, 0x02);
                      I2CWriteByte(TW515, 0x28, 0x50);
                      I2CWriteByte(TW515, 0x29, 0x20);  //0x50 0x20 2005 02 23 if too high color will blind
                      I2CWriteByte(TW515, 0x2A, 0x78);  //0x50 0x78 2005 02 23
                      I2CWriteByte(TW515, 0x2B, 0x00);
                      I2CWriteByte(TW515, 0x2c, 0x80);  //0x50 0x80 2005 02 23 if too high color will blind
                      I2CWriteByte(TW515, 0x2f, 0x0c);
                      I2CWriteByte(TW515, 0xD1, 0xc8);
                      I2CWriteByte(TW515, 0xD2, 0x27);
                      I2CWriteByte(TW515, 0x04, 0x2f);
                      I2CWriteByte(TW515, 0xa0, 0x05);
                      I2CWriteByte(TW515, 0x5f, 0x00);  
                      I2CWriteByte(TW515, 0x30, 0x27);  
                      I2CWriteByte(TW515, 0x1A, 0x87);
                      I2CWriteByte(TW515, 0x22, 0x4B);           
                      I2CWriteByte(TW515, 0x27, 0x22);
                      I2CWriteByte(TW515, 0x1C, 0xe7);
              }
              
              void SRC_656(void)
              {
                      Init_T515();
                  I2CWriteByte(TW101, 0x30, 0x02);
                      I2CWriteByte(TW101, 0x31, 0x10);
C51 COMPILER V7.50   T515                                                                  01/12/2006 13:31:13 PAGE 2   

                      I2CWriteByte(TW101, 0x40, 0x00);
                  I2CWriteByte(TW101+2, 0xdf, 0x0c);
                  switch_T515();
                      I2CWriteByte(TW101,0xc2, 00);
                      I2CWriteByte(TW101,0x88, 00); 
                      I2CWriteByte(TW101,0x89, 00);  
                      I2CWriteByte(TW101,0x8a, 00); 
                      I2CWriteByte(TW101,0x8b, 00);
              }
              void  switch_T515()
              {
                      T515_NTSC_PAL();
                      switch (m_cSource&0x0f)
                   {
                      case isrc_T515_CVIDEO1:
                              case isrc_T515_CVIDEO2:
                                      I2CWriteByte(TW515, 0x18, 0x00);
                              if ((m_cSource&0x0f)==isrc_T515_CVIDEO1)
                                      I2CWriteByte(TW515, 0x19, 0x04);
                                      else 
                                      I2CWriteByte(TW515, 0x19, 0x00);
                                      I2CWriteByte(TW515, 0x11, 0x00);
                                      I2CWriteByte(TW515, 0x23, 0x00);
                                      I2CWriteByte(TW515, 0x27, 0x21);
                                      I2CWriteByte(TW515, 0x20,I2CReadByte(TW515, 0x20)&0xFE);
                              break;
                              
                          case isrc_T515_SVIDEO:
                                      I2CWriteByte(TW515, 0x18, 0x05);
                                  I2CWriteByte(TW515, 0x19, 0x01);
                                      I2CWriteByte(TW515, 0x11, 0x02);
                                      I2CWriteByte(TW515, 0x20,I2CReadByte(TW515, 0x20)|0x01);
                                      I2CWriteByte(TW515, 0x23, 0x03);
                                      I2CWriteByte(TW515, 0x27, 0x25);
                              I2CWriteByte(TW515, 0x21,I2CReadByte(TW515, 0x21)|0x10);
                              break;
                              
                  }     
              
              
              }
              
              
              void  T515_NTSC_PAL(void)
              {
                  if(m_cStandard==S_NTSC){//NTSC
                      I2CWriteByte(TW101+2, 0xDb, 0xf4);//0xf0);  // change by Sherman 06'01'03
                      I2CWriteByte(TW101+2, 0xDc, 0x00);
                      I2CWriteByte(TW515, 0x38, 0x21);  
                      I2CWriteByte(TW515, 0x39, 0xf0);  
                      I2CWriteByte(TW515, 0x3a, 0x7c);  
                      I2CWriteByte(TW515, 0x3b, 0x1f); 
                      I2CWriteByte(TW515, 0x44, 0x00);
                      I2CWriteByte(TW515, 0x45, 0x08);
                      I2CWriteByte(TW515, 0x4e, 0x88);  
                      I2CWriteByte(TW515, 0xa2, 0x46); 
                      I2CWriteByte(TW515, 0xC1, 0x2a);
                      I2CWriteByte(TW515, 0xC2, 0x03);        
                      I2CWriteByte(TW515, 0x50, 0x26);  
                      I2CWriteByte(TW515, 0x51, 0x61);  
                      I2CWriteByte(TW515, 0x20,I2CReadByte(TW515, 0x20)&0x01|0x00);
                      //I2CWriteByte(TW515, 0x20, 0x00);
C51 COMPILER V7.50   T515                                                                  01/12/2006 13:31:13 PAGE 3   

                      I2CWriteByte(TW515, 0x21, 0x09);
                  }else{
                      I2CWriteByte(TW101+2, 0xDb, 0x28);//0x20); // change by Sherman 06'01'03
                      I2CWriteByte(TW101+2, 0xDc, 0x01);
                      I2CWriteByte(TW515, 0x38, 0x2a);
                      I2CWriteByte(TW515, 0x39, 0x09);
                      I2CWriteByte(TW515, 0x3a, 0x8a);
                      I2CWriteByte(TW515, 0x3b, 0xcb);
                      I2CWriteByte(TW515, 0x44, 0xe9);
                      I2CWriteByte(TW515, 0x45, 0x0f);
                      I2CWriteByte(TW515, 0x4e, 0x88);  
                      I2CWriteByte(TW515, 0xa2, 0x52);
                      I2CWriteByte(TW515, 0xC1, 0x2f);
                      I2CWriteByte(TW515, 0xC2, 0x03);
                      I2CWriteByte(TW515, 0x50, 0x2A);
                      I2CWriteByte(TW515, 0x51, 0xc1);
                      I2CWriteByte(TW515, 0x20,I2CReadByte(TW515, 0x20)&0x01|0x32);
                      //I2CWriteByte(TW515, 0x20, 0x32);
                      I2CWriteByte(TW515, 0x21, 0x08);
                   }   
              }
              
              
              
              #endif


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 + -