Issue with Seven Segment
Hello, i have the max10 de-10 lite and im having a small issue with the seven segments.
My code is below, so when given input the board works fine, just like expected but when it has no input the seven segment displays 63.null 7 (null, doesnt display anything). Is my default wrong on the case? I tried this 7'b000_000; but it displays 63.87, basically the same instead of the null, do u have some ideas maybe what is happening?
Thank you for your time.
If the inputs are unconnected and there's no pull-down resistors or other physical means to pull them down to the a low state, then you have no reason to expect that they would default to a low state. The state of a floating input should be regarded as unpredictable. In fact, with some devices, floating inputs can float to the transition region and/or oscillate, which can cause all kinds of problems including excessive power consumption and noise. Letting inputs float without some physical means to pull them definitively in one direction or the other is generally bad practice that should be avoided.
Fortunately for you, the FPGA's I/O cells have a build-in means to do this, including internal weak pull-ups that can be optionally enabled. The fact that your inputs seem to be defaulting to the high state when unconnected suggests that you might already be enabling these pull-ups, whether you knew it or not.
If I may make a suggestion about how to handle this in your design, you should make sure to enable these pull-ups, first and foremost. But then, also, you can actually take advantage of the fact that they pull your input vector to this numerically invalid state of all high. You can have your logic detect this as a way to determine that your inputs are unconnected, in which case you could put up an appropriate indication on the 7-seg displays, like "----" or "Err" or some such thing.