花了一些时间去点亮7寸TFT,现在只能做自动切换画面的部分,按键切换还正在调试中。如下:
`timescale 1ns / 1ps
module CMO_5WVGA(CLK,DCLK,HS,UD,LR,VS,DE,LCDR,LCDG,LCDB);
input CLK;
output DCLK;
output HS;
output VS;
output DE;
output UD;
output LR;
output [7:0] LCDR;
output [7:0] LCDG;
output [7:0] LCDB;
/*************BOE 7DD HS/VS parameter*********************
// Horizontal Signals:
parameter
thpw = 11'd20, //HS Pulse Width,1-40 DCLK
thb = 11'd46, //HS Blanking 46 DCLK = HS Pulse Width + HS Back Porch
thd = 11'd800, //Horizontal Display Area,800 DCLK
thfp = 11'd210, //HS Front Porch,16-210-354 DCLK
th = (thb+thd+thfp), //One Horizontal Line = HS Blanking (thb) + Horizontal Display Area (thd) + HS Front Porch (thfp)
// Vertical Signals:
tvpw = 11'd10, //Vs Pulse Width 1-20 TH
tvb = 11'd23, //Vs Blanking 23 TH = Vs Pulse Width + VS Back Porch
tvd = 11'd480, //Vertical Dsiplay Area 480 TH
tvfp = 11'd22, //Vs Front Porch 7-22-147 TH
tv = (tvb+tvd+tvfp); //Vs Blanking (tvb) + Vertical Dsiplay Area (tvd) + Vs Front Porch (tvfp)
*/
/******************CMO 5D WVGA parameter*******************
// Horizontal Signals:
parameter
thpw = 11'd128, //HS Pulse Width,1-40 DCLK
thb = 11'd216, //HS Blanking 46 DCLK = HS Pulse Width + HS Back Porch
thd = 11'd800, //Horizontal Display Area,800 DCLK
thfp = 11'd88, //HS Front Porch,16-210-354 DCLK
th = (thb+thd+thfp), //One Horizontal Line = HS Blanking (thb) + Horizontal Display Area (thd) + HS Front Porch (thfp)
// Vertical Signals:
tvpw = 11'd2, //Vs Pulse Width 1-20 TH
tvb = 11'd35, //Vs Blanking 23 TH = Vs Pulse Width + VS Back Porch
tvd = 11'd480, //Vertical Dsiplay Area 480 TH
tvfp = 11'd8, //Vs Front Porch 7-22-147 TH
tv = (tvb+tvd+tvfp); //Vs Blanking (tvb) + Vertical Dsiplay Area (tvd) + Vs Front Porch (tvfp)
*/
/******************CPT 7DH WSVGA parameter******************/
// Horizontal Signals:
parameter
thpw = 12'd70, //HS Pulse Width,1-40 DCLK
thb = 12'd160, //HS Blanking 46 DCLK = HS Pulse Width + HS Back Porch
thd = 12'd1024, //Horizontal Display Area,800 DCLK
thfp = 12'd160, //HS Front Porch,16-210-354 DCLK
th = (thb+thd+thfp), //One Horizontal Line = HS Blanking (thb) + Horizontal Display Area (thd) + HS Front Porch (thfp)
// Vertical Signals:
tvpw = 12'd10, //Vs Pulse Width 1-20 TH
tvb = 12'd23, //Vs Blanking 23 TH = Vs Pulse Width + VS Back Porch
tvd = 12'd600, //Vertical Dsiplay Area 480 TH
tvfp = 12'd12, //Vs Front Porch 7-22-147 TH
tv = (tvb+tvd+tvfp); //Vs Blanking (tvb) + Vertical Dsiplay Area (tvd) + Vs Front Porch (tvfp)