Forum Discussion
Hi FvM,
Yes that is correct. When the switch is being depressed, it is grounding the the input, or active low.
Does this mean I would need to introduce some further conditions so the AND logic responds to active low signals?
Hi @Danlar81 ,
If the switches are active low but the LED is active high, then to achieve your intended "and" logic you need to just negate the switch values:
(not sw1) and (not sw2)
which is equivalent to:
sw1 nor sw2
And if the LED is also active low, which is likely (check your hardware!), then you also need another negation on the above result. Which would be:
not ( (not sw1) and (not sw2) )
which is equivalent to:
not (sw1 nor sw2)
which is equivalent to:
sw1 or sw2
You didn't say what the intended scope was of your online course, but it sounds like you're unfamiliar with the basic properties of boolean algebra? If that's the case, you have homework to do.
https://en.wikipedia.org/wiki/Boolean_algebra
A common pitfall with these kinds of online courses is the false promise of instant gratification -- introducing you to advanced topics without requiring that you first learn the necessary foundational knowledge, telling you that you can run without first learning to crawl. If it sounds too good to be true... Buyer beware.
- Danlar812 years ago
New Contributor
Hi,
I have it all working now which is good news.
I am familiar with boolean, however I was trying a lot of new concepts for the first time. I was also performing the logic in Simulink and downloading to the FPGA. I think I was a little blinded by trying to ensure the many settings that were necessary between Quartus and Simulink were ok, I just didn't pay enough attention to the hardware side of things.
As soon as I looked at the schematic again after FvM's comments it was very obvious what what the problem was.
Thank you for your response.