Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
14 years ago

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