Forum Discussion
Altera_Forum
Honored Contributor
14 years agoDE1 Board Read KEY
I need to press and hold key 1 and than press key 2 to increase value. How to Read keys only if both keys are pressed. This is what is have which is not working correct. (programming languages vhdl)....
Altera_Forum
Honored Contributor
14 years agoA is a vector. It will have the value "00" when no key is pressed, and the value "11" when both are. So you can simply have:
if (A = "11") then Your process' sensitivity list should have all your inputs, in that case A,B and C. I'm almost sure that if you simulate this, the process would be triggered on a KEY change but would still see the previous values of A, B and C because of the delta delay. It wouldn't change anything for Quartus synthesis though. Ps: your component has no output