- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have been trying to program the lcd on the cyclone iii but i don;t get any respone...i even probed the pins to check if what the pins were what they should be and most of the data pins just stay on high.........The program i wrote is shown below: and i assign the pinouts according to the reference manual.....help is urgently needed............
............................................. module lcd_display (clk,user_dipswitch2,user_dipswitch3,mydata,lcd_rs, lcd_rw, lcd_e, lcd_code); input clk; input user_dipswitch2; input user_dipswitch3; input [7:0] mydata; integer count; reg busy_flag; //reg [6:0] lcd_code output reg lcd_rs ; output reg lcd_rw ; output reg [7:0]lcd_code; output reg lcd_e; initial begin busy_flag <= lcd_code[7]; lcd_rs <= 0; lcd_rw <= 0; lcd_e <= 0; count <= 0; end always @ (posedge clk ) begin lcd_rs <= 0; lcd_rw <= 1; if (user_dipswitch2 && !busy_flag) //initialize lcd begin lcd_rs <= 0; lcd_rw <= 0; lcd_e <= 1; case (count) 0: begin //function set lcd_code <= 8'b00111100; count <= 1; end 1: begin // Display on lcd_code <= 8'b00001111; count <= 2; end 2: begin // Display clear lcd_code <= 8'b00000001; count <= 3; end 3: begin // Entry mode set lcd_code <= 8'b00000111; count <= 4; end 4: lcd_e <= 0; endcase end else if (!user_dipswitch2 && !busy_flag && user_dipswitch3) begin lcd_rs<= 1; lcd_rw <= 0; lcd_e <= 1; lcd_code = 8'b11100011; end end endmoduleLink Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This kind of LCD is extremely slow, what is your clock frequency?
commands like "clear screen", take to execute even 40 ms. Did you simulate this module?- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
thanks for the reply....am fairly new to verilog...am not familliar about how to introduce the timing into the hardware......am using 50MHz
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page