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

📄 tw88_reg.h

📁 PIC单片机上用C语言写的TW88TFT屏控制程序,有注释
💻 H
字号:
/**************************************************/
/*        TW88_reg.h                              */
/*        TW8801 registers                        */
/*  Projet DVD_portable                           */
/*  Hinh Sary 10/12/2004                          */ 
/**************************************************/

#define TWCLK           27      //TW88 clock 27MHz

#define TW88            0x88    // TW8801 adress 

#define CSTATUS			0x01	// Chip Status
//#define ACNTL           0x06    // analog control register
//#define ACNTL_VAL       0x03     

//select video source (p32)
#define INFORM			0x02	// Input source
#define VIDEO1          0x40    // value for video1 
#define VIDEO2          0x44    // value for video2
//display option (p35-37)      
#define BRIGHT			0x10	// Brightness Control
#define CONTRAST		0x11	// Contrast Control
//#define SHARPNESS		0x12	// Sharpness Control
#define CHROMA		    0x14	// color Conrol
//select input format
#define SDT				0x1C	// Standard Selection
//#define V_FORMAT        0x0F   // auto video format detection
//#define SDTR			0x1D	// Standard Recognition
//#define V_RECO			0xFF	// auto Recognition

/*
//select output format
#define OUT_PIN         0x41    // Output setting address
#define OUT_LCD         0x40    // Output setting value FPDE active high    
#define OUT_FORMAT      0xAF
#define DITHER          0x21    // Output format RGB 6:6:6     
#define CROP_HI         0x07    // Cropping register address
#define CROP_LCD        0x22    // Cropping value for Sharp LCD(640*480)
#define VDELAY_LO       0x08    // VDELAY address
#define VD_LO           34
#define VACTIVE_LO      0x09    // VACTIVE address
#define VA_LO           13     // VACTIVE value
#define HDELAY_LO       0x0A    // HDELAY address
#define HD_LO           44      // HDELAY value
#define HACTIVE_LO      0x0B    // HACTIVE address
#define HA_LO           188     // HACTIVE value
*/
// Power Management (p60) 
#define POWER_TW        0xB4    
#define TW_ON           0x03    // TW88 Power on  
#define TW_SP           0x10    // TW88 Suspend  
#define TW_SB           0x01    // TW88 Stand by  
#define TW_OFF          0x00    // TW88 Power off 
#define TW_AUTO         0x04    // TW88 auto Power management

/*
// pll (p65-66)
#define PLLCON          0xFA    // PLL control address 
#define PLLCON_VAL      0x00     // Output clock is pll!!!       
#define PLLS            0xFB    // PLLS address bit[0:1]
#define PLLS_VAL        0       
#define FBDN_LO         0xFC    
#define FBDN_HI         0xFD    // !bit[0:3] 
#define REFDM           0xFE    // REFDE address (bit[0:5])
#define REFDM_VAL       0      // REFDM value 
*/

/***************Menu display (p52-55)***************/

//Font registers
#define FONT_SELECT     0x70 //font selection 
#define ROM             0    //value to select font ROM 
#define FONT_RAM        0x73 //font address in the RAM   
#define FONT_OUT        0x74 //code of the font to display
#define FONT_OPTION     0x75 //Attribute of font

//window 1 
#define WINDOW1         0x76 //window1 options
#define W1_WIDTH        0x79 //window1 width address

#define W1_HSTART       0x77 //horizontal start address 
#define W1_VSTART       0x78 //Vertical start address

#define W1_HEIGHT       0x7A //window1 height address
#define BORDER1         0x7B //window1 border options
#define B1_H            0x7C //border1 H space address
#define B1_V            0x7D //border1 V space address
#define W1_HSPACE       0x7E //character H-space inside window1
#define W1_VSPACE       0x7F //character V-space inside window1
#define W1_ADDSTART     0x80 //window1 content start address (p18)

//window2 
#define WINDOW2         0x81 //window2 options
#define W2_WIDTH        0x84 //window2 width address

#define W2_HSTART       0x82 //horizontal start address 
#define W2_VSTART       0x83 //Vertical start address

#define W2_HEIGHT       0x85 //window2 height address
#define BORDER2         0x86 //window2 border options
#define B2_H            0x87 //border2 H space address
#define B2_V            0x88 //border2 V space address
#define W2_HSPACE       0x89 //character H-space inside window2
#define W2_VSPACE       0x8A //character V-space inside window2
#define W2_ADDSTART     0x8B //window2 content start address (p18)

//window3 
#define WINDOW3         0x8C //window3 options
#define W3_WIDTH        0x8F //window3 width address

#define W3_HSTART       0x8D //horizontal start address 
#define W3_VSTART       0x8E //Vertical start address
#define W3_WIDTH        0x8F //window3 width address
#define W3_HEIGHT       0x90 //window3 height address
#define BORDER3         0x91 //window3 border options
#define B3_H            0x92 //border3 H space address
#define B3_V            0x93 //border3 V space address

#define W3_VSPACE       0x95 //character V-space inside window3
#define W3_ADDSTART     0x96 //window3 content start address (p18)

//window4 
#define WINDOW4         0x97 //window2 options
#define W4_WIDTH        0x9A //window4 width address

#define W4_HSTART       0x98 //horizontal start address 
#define W4_VSTART       0x99 //Vertical start address
#define W4_WIDTH        0x9A //window4 width address
#define W4_HEIGHT       0x9B //window4 height address
#define BORDER4         0x9C //window4 border options
#define B4_H            0x9D //border4 H space address
#define B4_V            0x9E //border4 V space address
#define W4_HSPACE       0x9F //character H-space inside window4
#define W4_VSPACE       0xA0 //character V-space inside window4
#define W4_ADDSTART     0xA1 //window4 content start address (p18)







⌨️ 快捷键说明

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