my question is if we have configured our gpio pins in input mode and one of the input pin is kept floation g then what value will be appear on the corresponding data data register bit .
The I/O pin has both an input and an output connection.
If the output connection is not in high impedance state, it will interfere with the input signal. So if the pin is configured as input-only, the output connection will be in high impedance state.
With the output connection in high impedance state, if the input is unconnected, it can be sensitive to noise sources (for example, RFI and EMI).
firstival it is not good practice to have floating pins. Even if pin is not connected it does not garantee what level at the coresponding output you will have.
High immpidance control throught the separate control line of the output buffer.
my simple question is if i have configured gpio pi as input and that pin is floating then what vale i will read in the data register corresponding to that pin.
I am really thankful to for your answer but if you explain me why It will be great and my confusion will be clear.Please elaborate it for more understanding.
Hi,
For all CMOS pads, it will be undefined, can be 0 can be 1(but definitely not high impdence, because you have configured this pad as input, i.e you have enabled the transistor producing a high impedence), and may fluctuate between 0 and 1. This is because, the CMOS gate has a capability to pick up charge from air, and this charge is sometimes enough to trigger the gate. So it is really undefined, and it is definitely NOT recommended to keep any pin afloat.
However if the pad is made with TTL logic, then open input always produces an '1' at the TTL gate output. I.e you will latch a logic '1' at your corresponding register. This is because: In order to drive a TTL input to a '0', you must sink current from the transistor into ground. Leaving it open won't sink the current to ground, and so, the input transistor remains OFF, and if you look at TTL circuit, if the input transisotr is OFF, then the output '1'.
Hope it helps,
Kr,
Avi http://www.vlsiip.com