Is there a way to know if an ADC Pin is "null" or if something is
connected to it sending data? I've used GetADC(13) with nothing connected to it and still read a result of ~300-350ish Those could be values sent to it from the analog input, so I'm at a loss :( Any suggestions or is what I'm asking not possible? Leddy |
|
Test for something connected to ADC Pin
Started by ●July 12, 2004
Reply by ●July 12, 20042004-07-12
It is reading those values bacause the pin is floating... nothing to sink or supply current. Are you asking if there is a way to test if something is attached ?? On a recently related topic, I am thinking that setting your pin to "Pull-up". If it reads 1023, then either nothing is attached or 5 volts is applied. If you set your pin to "High Impedance" and it drops down to the 300-500 range, then nothing was attached. If, per chance, your pin is set to "pull-up" and something is attached, the attached circuit should sink the current enough to drop your voltage below 1023. Provided that you aren't measuring from a very high resistance. You may also notice that a floating pin will have varying results... Hope that answers your question, Thad --- Leddy <> wrote: > Is there a way to know if an ADC Pin is "null" or if > something is connected to it sending data? > I've used GetADC(13) with nothing connected to it > and still read a result of ~300-350ish > Those could be values sent to it from the analog > input, so I'm at a loss :( > > Any suggestions or is what I'm asking not possible? > > Leddy __________________________________ |