IO Question
electric550
Posts: 122
If a pin is set as an input and has no connection to anything, then the pin is read, can I assume that the value will be 1 in all cases. Or is it inconsistent. I appoligze for the simple question that has probably been answered already, but I was having difficulty finding the answer. Thanks for the help.
Comments
What if the input has such a high input impedance that a passing charged object (a finger) is capacitively coupled to the pin and flips it state?
What if you start using a new version of the chip whose technology inverts any "default" state.
Why do you need to do this?
If you must do this put a pull up (or down) resistor on the pin.
Don't forget there are 8 COGs sharing pins on the Prop so perhaps an input that is not connected to anything externally is driven by another COG internally.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
For me, the past is not over yet.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Timothy D. Swieter, E.I.
www.brilldea.com - Prop Blade, LED Painter, RGB LEDs, 3.0" LCD Composite video display, eProto for SunSPOT
www.tdswieter.com
The algorithm is just a simple bit bang which goes a bit like this:
1. PULSE HIGH (10us or so but time depends upon RC time constant)
2. TEST INPUT
3. IF LOW THEN INPUT IS BEING DRIVEN LOW
4. PULSE LOW & TEST
5. IF HIGH THEN INPUT IS BEING DRIVEN HIGH
6. OTHERWISE THE INPUT IS FLOATING
*Peter*
P.S. Of course with this configuration you could also use it as a analog output.
Post Edited (Peter Jakacki) : 7/10/2009 3:14:13 AM GMT
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Timothy D. Swieter, E.I.
www.brilldea.com - Prop Blade, LED Painter, RGB LEDs, 3.0" LCD Composite video display, eProto for SunSPOT
www.tdswieter.com
In my opinion all Yours BUTON and Transistor inputs to PROP have construction problem.
In normal circumstances it is not problem BUT in programing stage with posible fault programing on IO pin's.
It can be opposite Voltages on that IO pin's.
Recommendation's ........
For prevent that problems .... All pin's must have series (100R) resistor between BUTON/PULL-UP resistor and IO pin.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Nothing is impossible, there are only different degrees of difficulty.
For every stupid question there is at least one intelligent answer.
Don't guess - ask instead.
If you don't ask you won't know.
If your gonna construct something, make it·as simple as·possible yet as versatile as posible.
Sapieha
Post Edited (Sapieha) : 7/10/2009 2:05:10 PM GMT