显示器件驱动实验报告Word格式文档下载.docx
- 文档编号:20087509
- 上传时间:2023-01-16
- 格式:DOCX
- 页数:13
- 大小:793.25KB
显示器件驱动实验报告Word格式文档下载.docx
《显示器件驱动实验报告Word格式文档下载.docx》由会员分享,可在线阅读,更多相关《显示器件驱动实验报告Word格式文档下载.docx(13页珍藏版)》请在冰豆网上搜索。
显示码由16位组成,对应16根列线的值,列线值(显示码)由两个字节来表示。
每个字节8位,代表8列,从第一行开始显示;
并关闭其他行;
然后第二行显示;
并关闭其他行。
第三行
……
第十六行
第一行,第二行……第十六行
如此周而复始,由于扫描频率很快,所以人眼视觉暂留效应,会感觉16行都被显示了,并且显示不同的内容。
实际上任何时刻只点亮了一行。
2.汉字取模
3.取模软件的用法
四、实验结果记录(如输出波形,显示结果等)
五、主要源代码
amodulehanzi1(mainclk,rst,DATA,SRCK,RCK,AB,CLK);
inputmainclk,rst;
outputDATA,SRCK,RCK,AB,CLK;
reg[10:
0]count;
wireclk_24;
reg[3:
0]state;
0]cnt_164,cnt_595;
reg[15:
0]temp;
//reg[4:
0]cnt_c;
reg[14:
0]delay_164;
reg[13:
0]delay_595;
regSRCK,RCK,AB,CLK,DATA;
reg[15:
0]table1[15:
0];
reg[3:
0]sel;
reg[26:
0]count1;
reg[2:
0]state1;
//{0x00,0x80,0xF8,0x88,0x08,0x8C,0x08,0x90,0x78,0xA0,0x40,0xC0,0x40,0x80,0x43,0xFE},
//{0xF8,0xA0,0x48,0xA0,0x08,0x90,0x08,0x90,0x08,0x88,0x08,0xA6,0x29,0xC4,0x10,0x80},/*"
张"
0*/
//{{0x7E,0xFC,0x22,0x44,0x12,0x24,0x0A,0x14,0x12,0x24,0x29,0x44,0x0C,0x80,0x1F,0xFC},
//{0x10,0x80,0x3F,0xFC,0x50,0x80,0x1F,0xFC,0x10,0x80,0x10,0x80,0x1F,0xFE,0x10,0x00},/*"
翟"
always@(posedgemainclk)
count1<
=count1==49999999?
0:
count1+1;
begin
if(count1==49999999)
state1<
=state1==5?
state1+1;
else
state1<
=state1;
end
//{0x01,0x00,0x21,0x10,0x19,0x18,0x0D,0x10,0x09,0x20,0x01,0x04,0x7F,0xFE,0x04,0x40},
//{0x04,0x40,0x04,0x40,0x04,0x40,0x08,0x42,0x08,0x42,0x10,0x42,0x20,0x3E,0x40,0x00},/*"
光"
always@(state1)
if(state1==0)
begin
table1[0]=16'
h0100;
table1[1]=16'
h2110;
table1[2]=16'
h1918;
table1[3]=16'
h0d10;
table1[4]=16'
h0920;
table1[5]=16'
h0104;
table1[6]=16'
h7ffe;
table1[7]=16'
h0440;
table1[8]=16'
table1[9]=16'
table1[10]=16'
table1[11]=16'
h0842;
table1[12]=16'
table1[13]=16'
h1042;
table1[14]=16'
h203e;
table1[15]=16'
h4000;
end
//{0x01,0x00,0x01,0x00,0x01,0x00,0x3F,0xF8,0x21,0x08,0x21,0x08,0x3F,0xF8,0x21,0x08},
//{0x21,0x08,0x21,0x08,0x3F,0xF8,0x21,0x08,0x01,0x02,0x01,0x02,0x00,0xFE,0x00,0x00},/*"
电"
elseif(state1==1)
h3FF8;
h2108;
h0102;
h00FE;
h0000;
2*/
elseif(state1==2)
h0080;
hF888;
h088C;
h0890;
h78A0;
h40C0;
h4080;
h43FE;
hF8A0;
h48A0;
h0888;
h08A6;
h29C4;
h1080;
//{0x7E,0xFC,0x22,0x44,0x12,0x24,0x0A,0x14,0x12,0x24,0x29,0x44,0x0C,0x80,0x1F,0xFC},
3*/
elseif(state1==3)
h7EFC;
h2244;
h1224;
h0A14;
h2944;
h0C80;
h1FFC;
h3FFC;
h5080;
h1FFE;
h1000;
//{0x01,0x08,0x10,0x8C,0x0C,0xC8,0x08,0x90,0x7F,0xFE,0x40,0x04,0x8F,0xE8,0x00,0x40},
//{0x00,0x80,0x7F,0xFE,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x02,0x80,0x01,0x00},/*"
学"
4*/
elseif(state1==4)
h0108;
h108C;
h0CC8;
h7FFE;
h4004;
h8FE8;
h0040;
h0280;
//{0x00,0x80,0xF8,0x40,0x8F,0xFE,0x94,0x04,0xA0,0x00,0xA3,0xF8,0x90,0x00,0x88,0x00},
//{0x8F,0xFE,0xA9,0x20,0x91,0x20,0x81,0x20,0x82,0x22,0x82,0x22,0x84,0x22,0x88,0x1E},/*"
院"
5*/
elseif(state1==5)
hF840;
h8FFE;
h9404;
hA000;
hA3F8;
h9000;
h8800;
hA920;
h9120;
h8120;
h8222;
h8422;
h881E;
end
end
always@(posedgemainclk)
count=count+1;
assignclk_24=count[3];
always@(posedgeclk_24ornegedgerst)
if(!
rst)
begin
state=0;
cnt_595=0;
cnt_164=0;
temp=16'
end
else
case(state)
0:
beginAB=0;
CLK=0;
state=state+1;
1:
beginCLK=1;
state=state+1;
2:
beginCLK=0;
RCK=0;
3:
begintemp=~table1[cnt_164];
4:
beginSRCK=0;
DATA=temp[cnt_595];
5:
beginSRCK=1;
6:
if(cnt_595==15)
beginstate=7;
else
beginstate=4;
cnt_595=cnt_595+1;
7:
beginAB=1;
8:
beginRCK=1;
9:
10:
/*if(delay_164<
1000)
begindelay_164=delay_164+1;
begindelay_164=0;
end*/
beginstate=state+1;
11:
if(cnt_164==15)
beginstate=0;
beginstate=2;
cnt_164=cnt_164+1;
default:
beginstate=0;
endcase
endmodule
6、实验遇到的问题及解决办法(余留问题、体会等)
代码下载后总是不能正确显示,以为代码有问题,最后更换点阵屏后正确了。
顶层实体名称和工程名必须一样;
顶层实体为bdf文件。
verilog文件(.v)都为子模块,不能与工程名或顶层实体名一样。
所有verilog文件(.v)里面的模块名必须和这个verilog文件(.v)的文件名一样.
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 显示 器件 驱动 实验 报告