Forum Discussion
Altera_Forum
Honored Contributor
15 years agoSimple Key-Led design does not work
Hello Im using a EPM3064ATC CPLD. My design has 8 switches and two leds. If a button is pressed, then a led should be on. I already tested different variants of code but had no sucess. ...
Altera_Forum
Honored Contributor
15 years agoAlso check the logic levels your switches/leds are using. Often switches have pullups and pulls the signal to GND when pressed. The led could also be connected between VCC and the FPGA output - i.e. ligth when the output is 0. If this is the case you would see the behaviour you describe since you have implemented two "or" functions. Negating all inputs and outputs gives and "and" function instead. Easily tested by pushing all switches - your leds should ligth then.
Regards, Ove Brynestad