http://www.52rd.com/Blog/Detail_RD.Blog_whq0217_66110.html
花了一些时间去点亮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 DCLKthb = 11'd46, //HS Blanking 46 DCLK = HS Pulse Width + HS Back Porchthd = 11'd800, //Horizontal Display Area,800 DCLKthfp = 11'd210, //HS Front Porch,16-210-354 DCLKth = (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 THtvb = 11'd23, //Vs Blanking 23 TH = Vs Pulse Width + VS Back Porchtvd = 11'd480, //Vertical Dsiplay Area 480 THtvfp = 11'd22, //Vs Front Porch 7-22-147 THtv = (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 DCLKthb = 11'd216, //HS Blanking 46 DCLK = HS Pulse Width + HS Back Porchthd = 11'd800, //Horizontal Display Area,800 DCLKthfp = 11'd88, //HS Front Porch,16-210-354 DCLKth = (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 THtvb = 11'd35, //Vs Blanking 23 TH = Vs Pulse Width + VS Back Porchtvd = 11'd480, //Vertical Dsiplay Area 480 THtvfp = 11'd8, //Vs Front Porch 7-22-147 THtv = (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 DCLKthb = 12'd160, //HS Blanking 46 DCLK = HS Pulse Width + HS Back Porchthd = 12'd1024, //Horizontal Display Area,800 DCLKthfp = 12'd160, //HS Front Porch,16-210-354 DCLKth = (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 THtvb = 12'd23, //Vs Blanking 23 TH = Vs Pulse Width + VS Back Porchtvd = 12'd600, //Vertical Dsiplay Area 480 THtvfp = 12'd12, //Vs Front Porch 7-22-147 THtv = (tvb+tvd+tvfp); //Vs Blanking (tvb) + Vertical Dsiplay Area (tvd) + Vs Front Porch (tvfp)