Newbie: Logic gates are inverted once deployed to board
I'm new to FPGAs and just got Quartus installed and a dev board setup for the first time.
For my first test, I setup a schematic with a single two input AND gate. This is my hello world project attempt, just to see if everything is working. The two inputs to the AND gate are switches on the board and the output is a built-in LED. It works, but it's inverted. But it is not set to invert. What am I missing?
If both switches are high, the AND is low, if either switch is low, the AND is high. Seems inverted. Any idea why that would be? The properties on the AND gate do say that both the input and output inversion = false. So I don't see why the logic is inverted. I'm missing something here.
Could it be that the LED display is using common GND vs common VCC? What about the I/O Standard setting? How do you know what that needs to be?
Any help/suggestions are much appreciated.
Best regards,
Jon Rothlander
Many LED driver setups on development boards drive the LED active low, meaning you need to drive the output LOW to turn the LED ON, so a logic 1 is LED OFF, and a logic 0 is LED ON (ie, 'inverted' logic).
This is done because many (older, for the most part) FPGA outputs can sink a lot more current than they can source for driving a LED. Not so true any more with symmetrical high drive CMOS outputs, or usage of LEDs that are very efficient (ie, only require 2ma to light it up).
So the bottom line is you have to look at the schematic of your board to see how the LEDs are driven.