yamcake01096
Newbie level 2
Hi, im new in verilog coding, i need help for the 2-line LCD display in Altera DE2 board
I want to write a coding when switch 1 on, it will change the text in display and address value, and for the switch 2
I have compiled the coding and found some error, so someone help me solve the problem?
FAILED-cannot resolve multiple constant driver for net addr
or
I want to write a coding when switch 1 on, it will change the text in display and address value, and for the switch 2
I have compiled the coding and found some error, so someone help me solve the problem?
Code:
always @(posedge CLOCK_50 or negedge SW[1])
begin
lcd_stat<=0;
addr <=23'h000000;
max_addr<=23'h050000;
end
always @(posedge CLOCK_50 or negedge SW[2])
begin
lcd_stat<=1;
addr <=23'h100000;
max_addr<=23'h150000;
end
or
Code:
always @(posedge CLOCK_50)
begin
if(SW[1])
begin
lcd_stat<=0;
addr <=23'h000000;
max_addr<=23'h050000;
end
else if(SW[2])
begin
lcd_stat<=1;
addr <=23'h100000;
max_addr<=23'h150000;
end
end