Question: Can floating inputs cause wierd things to happen?
I have a system which I have already built and supplied several units, all of which work fine, but the last one I have just built, does uncommanded things.
Everything is fine until button1 is pressed, then the chip takes it apon itself to loop and execute loops for other inputs which ARE NOT active.
The used inputs are tied to ground via 1k/10k resistors, and active-high operation.(with no 5v input, the input pin is tied to deck via the 1k/10k - this is the idle state)
I'm just curious if unterminated(floating) inputs can cause this kind of thing.
My logic says NO, simply because you are using if/then on the required input, and so the code totally ignores unuses inputs, and thus they should have no bearing on the outcome of the code anyway - perhaps this is false logic?
EDIT: Oh yes, it really DOES matter - even if the input is not referenced in the code...
I pulled the misbehaving one to bits, and put a 10k to deck on the only unused(floating) input pin, and the problem has VANISHED - it works just like all the others now. Resistor not put on by defualt, as it was going to be a pain to fit it into the PCB layout, as things are a bit "Tight" component layout wise - guess I will do it now - where there is a will, there is a way.
Would not have thought that would be an issue though, if you are not addressing that input pin in the code; IE: the "floating" inputs can do whatever they like, as they are not being referenced in the code, so I did not think it would matter - live and learn. Only about 6 units in place so far, so will arm myself with some 10k's and a soldering iron, and modify the others, I think, just to be safe(as they are all still floating on that pin).
I have a system which I have already built and supplied several units, all of which work fine, but the last one I have just built, does uncommanded things.
Everything is fine until button1 is pressed, then the chip takes it apon itself to loop and execute loops for other inputs which ARE NOT active.
The used inputs are tied to ground via 1k/10k resistors, and active-high operation.(with no 5v input, the input pin is tied to deck via the 1k/10k - this is the idle state)
I'm just curious if unterminated(floating) inputs can cause this kind of thing.
My logic says NO, simply because you are using if/then on the required input, and so the code totally ignores unuses inputs, and thus they should have no bearing on the outcome of the code anyway - perhaps this is false logic?
EDIT: Oh yes, it really DOES matter - even if the input is not referenced in the code...
I pulled the misbehaving one to bits, and put a 10k to deck on the only unused(floating) input pin, and the problem has VANISHED - it works just like all the others now. Resistor not put on by defualt, as it was going to be a pain to fit it into the PCB layout, as things are a bit "Tight" component layout wise - guess I will do it now - where there is a will, there is a way.
Would not have thought that would be an issue though, if you are not addressing that input pin in the code; IE: the "floating" inputs can do whatever they like, as they are not being referenced in the code, so I did not think it would matter - live and learn. Only about 6 units in place so far, so will arm myself with some 10k's and a soldering iron, and modify the others, I think, just to be safe(as they are all still floating on that pin).
Last edited: