为什么TFT显示黑白格,可是方格的位置有些不对?(已解决!)

2019-03-25 08:39发布

rgb2初始值全为‘1’。液晶分辨率为1280X800的。     
最下面的那一条方格,其实应该和最上面合并起来的。
横竖格子比例是16:10,每个格子占了80个像素点。
if ((h_count >= 0) and (h_count < 1280) and (v_count >= 0) and (v_count < 800)) then
      temp:=temp+1;
      
      if temp=80 then
           temp:=0;
           rgb2<=not rgb2;
      end if;
      rgb<=rgb2;
end if;
     
if h_count=1280 and v_count=800 then
      rgb2<="111111111111111111";
      temp:=0;
      temp1:=0;
elsif h_count=1280 then     
将这一行代码改成:
elsif h_count=1280 and v_count<800 then
然后就好了!呵呵。
      temp:=0;
      temp1:=temp1+1;
      if temp1=80 then
           temp1:=0;
           rgb2<= not rgb2;
     end if;
end if;

总感觉代码没有错。求赐教。。。

[ 本帖最后由 jinghong21 于 2013-1-22 16:48 编辑 ] 此帖出自小平头技术问答
友情提示: 此问题已得到解决,问题已经关闭,关闭后问题禁止继续编辑,回答。
该问题目前已经被作者或者管理员关闭, 无法添加新回复
3条回答
qinkaiabc
1楼-- · 2019-03-25 16:41
< / 关注中~
osoon2008
2楼-- · 2019-03-25 19:04
行频和场频没有配合好, 看看你的tft规格书吧, 行头, 行尾, 场头, 场尾
jinghong21
3楼-- · 2019-03-25 21:41
 精彩回答 2  元偷偷看……

一周热门 更多>