Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Valued Contributor III
695 Views

simple push button app

Hello, 

 

I'm trying to develop a simple application using the push buttons on the Cyclone iii development board.  

 

The project cycloneIII_3c120_dev_my_first_fpga 

compiles and works correctly. However in that project the push button signal is processed by a megafunction.  

 

I have modified that project by adding the following module to try to  

access the push buttons directly. 

 

module push_button1(megaf_in, user_pb, user_led, user_led7); 

input [7:0] megaf_in; 

input [2:0] user_pb; 

output reg [6:0] user_led; 

output reg user_led7; 

always  

begin 

user_led[6:0] <= megaf_in[6:0]; // This is passing through data from the megafunction and is working. 

user_led7 <= user_pb[2]; // This is passing through a pushbutton state and is not working. 

end 

endmodule 

 

Can anyone tell me why the 7th led doesn't respond to the push button.  

(The pin assignments have been confirmed using the original project.) 

Thanks in advance! 

 

Monte
0 Kudos
1 Reply
Highlighted
Valued Contributor III
4 Views

i am also try to do

0 Kudos