Altera_Forum
Honored Contributor
14 years agoFPGA LCD Problem and Always Construct Problem
I am using the TerasIC DE2-115 with Cyclone IV with Quartus II 10.0 Web Edition and I have two problems:
problem a: lcd display My first problem occurs in the LCD display. I am currently using a slightly modified version of: (remove parenthesis and spaces from (http: )) (http: )//johnloomis.org/digitallab/lcdlab/lcdlab1/lcdlab1.html where I created several additional input wires containing data to be displayed. However, when run on the FPGA, the LCD Display only displays the first set of data, and does not change/refresh when new data is inputted. problem b: always construct I have this weird problem when running a module (shown below). Basically, I have an oracle, in which this module sets an LED to high when it detects that there is a solution to the oracle. I also have another signal (register) which increments for every solution, and displays that number on LEDs.module SolTest(clk, done, veri, Solvout, countOut);
input clk, veri, done;
output reg Solvout;
output reg countOut;
always@(negedge clk)
begin
if((done!==1)&&(veri==1))
begin
Solvout = 1; //1
countOut = countOut + 5'b00001; //2
//countOut = 5'b00001; //3
end
end
endmodule Note: I'm pretty sure that quartus sets an unknown value to 0. It did that for another module that I have. Does anyone know if this is true? A top module connects the outputs to LEDS. I'll list the problems I have here: - module as it is shown (line 1 and 2 un-comment, 3 comment): all LEDs are off (meaning countOut = 5'b00000 and Solvout = 1'b0)
- module with 2 commented out, 3 un-commented (1 unchanged): LED for Solvout is off, LEDs for countOut makes binary 1 (5'b00001)
- module with 2 and 3 commented out (1 unchanged): LED for Solvout is on