首页|资源下载
登录|注册

您现在的位置是:电子研发网 > 资源下载 > LCD1602屏 (EP4CE30) FPGA读写实验Verilog逻辑源码Quartus工程文件+

LCD1602屏 (EP4CE30) FPGA读写实验Verilog逻辑源码Quartus工程文件+

  • 资源大小:3854
  • 上传时间: 2022-09-23
  • 上传用户:june1437
  • 资源积分:2 下载积分
  • 标      签: lcd1602 ep4ce30 fpga verilog quartus

资 源 简 介

LCD1602屏 (EP4CE30) FPGA读写实验Verilog逻辑源码Quartus工程文件+文档资料。FPGA为CYCLONE4系列中的EP4CE30F23C8. 完整的工程文件,可以做为你的学习设计参考。

module LCD1602_Cnt(input sys_clk,      //50M

                     input sys_rst_n,

                    

                     output reg lcd_rs,    //0:write order; 1:write data   

                     output lcd_rw,        //0:write data;  1:read data

                     output reg lcd_en,    // 

                     output reg [7:0] lcd_data);

                      

//--------------------lcd1602 order----------------------------

parameter    Mode_Set    =  8'h38,    //������ʾģʽ��8λ2��5x8����  

             Cursor_Set  =  8'h0c,     //��ʾ������겻��ʾ�����겻������˸

             Address_Set =  8'h06,     //���ֲ����������Զ�����

             Clear_Set   =  8'h01;   //��������긴λ 

 

/****************************LCD1602 Display Data****************************/ 

wire [7:0] data0,data1; //counter data

wire [7:0] addr;   //write address

//---------------------------------1s counter-----------------------------------

reg [25:0] cnt1;

reg [7:0] data_r0,data_r1;

always@(posedge sys_clk or negedge sys_rst_n)

begin

    if(!sys_rst_n)

        begin

            cnt1 <= 1'b0;

            data_r0 <= 1'b0;

            data_r1 <= 1'b0;

        end

    else if(cnt1==26'd50000000)

        begin

            if(data_r0==8'd9)

                begin

                    data_r0 <= 1'b0;

                    if(data_r1==8'd9)

                        data_r1 <= 1'b0;

                    else

                        data_r1 <= data_r1 + 1'b1;

                end

            else

                data_r0 <= data_r0 + 1'b1;

            cnt1 <= 1'b0;

        end

    else

        cnt1 <= cnt1 + 1'b1;

end

 

assign data0 = 8'h30 + data_r0 ;     

assign data1 = 8'h30 + data_r1 ;

 

//-------------------address------------------

assign addr = 8'h80;

 

/****************************LCD1602 Driver****************************/            

//-----------------------lcd1602 sys_clk_en---------------------

reg

image.pngimage.pngimage.png

文 件 预 览

文件名文件大小修改时间
LCD1602_Cnt/db/LCD1602_Cnt.(0).cnf.cdb9KB2014-08-11 13:22:30
LCD1602_Cnt/db/LCD1602_Cnt.(0).cnf.hdb2KB2014-08-11 13:22:30
LCD1602_Cnt/db/LCD1602_Cnt.amm.cdb1KB2014-08-11 13:08:28
LCD1602_Cnt/db/LCD1602_Cnt.asm.qmsg2KB2014-08-11 13:08:38
LCD1602_Cnt/db/LCD1602_Cnt.asm.rdb1KB2014-08-11 13:08:38
LCD1602_Cnt/db/LCD1602_Cnt.cbx.xml1KB2014-08-11 13:22:30
LCD1602_Cnt/db/LCD1602_Cnt.cmp.kpt1KB2014-08-11 13:08:34
LCD1602_Cnt/db/LCD1602_Cnt.cmp.rdb5KB2014-08-11 13:22:32
LCD1602_Cnt/db/LCD1602_Cnt.cmp_merge.kpt1KB2014-08-11 13:22:32
LCD1602_Cnt/db/LCD1602_Cnt.cycloneive_io_sim_cache.31um_ff_1200mv_0c_fast.hsd729KB2014-08-11 13:08:38
LCD1602_Cnt/db/LCD1602_Cnt.cycloneive_io_sim_cache.31um_ss_1200mv_0c_slow.hsd722KB2014-08-11 13:08:38
...

相 关 资 源