jesslyn993
Newbie level 5
![Newbie level 5](/styles/images/ranks/blevel2.gif)
- Joined
- Jan 21, 2015
- Messages
- 9
- Helped
- 0
- Reputation
- 0
- Reaction score
- 0
- Trophy points
- 1
- Activity points
- 76
Hi, this is my mini project which i will use expansion header of DE2 board as my input.
![1.JPG 1.JPG](https://www.edaboard.com/data/attachments/55/55440-583ae6f6a48da1027e32eaafc44cb4b5.jpg)
I am using the VCC and ground from the GPO1 (expansion header block) where the signal input also at the same expansion header block. With only one input, it shows no error.
However, when i needed to use two input and i used the same power pin and ground pin, it doesn't work. When i pressed on one button, the other one will automatically light up as well.
The following is the simple code i use to test the input. I wish anyone could tell me what should i do as i need more inputs.
![1.JPG 1.JPG](https://www.edaboard.com/data/attachments/55/55440-583ae6f6a48da1027e32eaafc44cb4b5.jpg)
I am using the VCC and ground from the GPO1 (expansion header block) where the signal input also at the same expansion header block. With only one input, it shows no error.
However, when i needed to use two input and i used the same power pin and ground pin, it doesn't work. When i pressed on one button, the other one will automatically light up as well.
The following is the simple code i use to test the input. I wish anyone could tell me what should i do as i need more inputs.
module test (out1,out2,in1,in2,yup,no,clk);
input in1,in2,yup,no,clk;
output reg out1=0,out2=0;
always@(posedge clk)
begin
if (in1)
out1<=1;
else
out1<=0;
if (in2)
out2<=1;
else
out2<=0;
end
endmodule