Disconnecting Pin?
This is probably a really numb question...
For a program, I need to set a pin HIGH then disconnect it from HIGH a short time later. I've looked through the index of PBASIC syntax, no luck there.
More specifically, there are 6 pins grouped in this circuit, leading to an array of switches. I need to set each pin HIGH individually then disconnect it again before the next pin is set to HIGH. That way I can tell which switches are closed and the program knows which pin the HIGH originated from. Since the pins are linked, if one is set LOW it would take a full 5V short circuit with no resistors. Not okay. If the pin stays HIGH, I can't read the switches properly.
I might be able to rewire this to separate them so they don't mix or go back, but a way to do this in the software would be better than messing with hardware.
I just need a DISCONNECT Pin15 sort of thing, they start off disconnected, so there should be a way to set it?
For a program, I need to set a pin HIGH then disconnect it from HIGH a short time later. I've looked through the index of PBASIC syntax, no luck there.
More specifically, there are 6 pins grouped in this circuit, leading to an array of switches. I need to set each pin HIGH individually then disconnect it again before the next pin is set to HIGH. That way I can tell which switches are closed and the program knows which pin the HIGH originated from. Since the pins are linked, if one is set LOW it would take a full 5V short circuit with no resistors. Not okay. If the pin stays HIGH, I can't read the switches properly.
I might be able to rewire this to separate them so they don't mix or go back, but a way to do this in the software would be better than messing with hardware.
I just need a DISCONNECT Pin15 sort of thing, they start off disconnected, so there should be a way to set it?
Comments
INPUT 0 will then make the pin an INPUT, effectively disconnecting its output driver. Is this what you needed?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
I think I might have some "legacy wiring" that is unnecessary and causing this issue as well, but that's good to know.