State of logic in the propeller pins.
SONIC the Hedgehog
Posts: 321
Earlier today I was reading about tristate logic gates and found what I thought might be a great use in making effective use of four-push button switches and a DTDP switch. Basically I was thinking this, I wanted the propeller to recognize and respond correctly when the pins went low, and when they went high. The four switches I am using have two pins, and one goes to a pin on the propeller, while the other goes to the DTDP which can be moved to change the switches from low to high, and basically I was curious. Does the propeller have tristate logic, or does it just go high and low?
Comments
Hi Sonic,
Can you sketch this circuit out?
The description sounds a bit odd and it might help clarify things if you could draw what you are thinking...
A DPDT switch is basically two switches in physical parallel.
But DPDT has more that two pins.
Two pins only would more likely be a SPST
Richard
I recreated this circuit on the Propeller with limited success; 10ohms was the largest value of current-limiting resistor that still allowed the program to work. 3.3V through 10ohms = 330ma, quite a bit more than the 40ma that the pins are rated for. An alternative would use two IO pins, one to bias the line high and low and the other to read the level.
What I was going for was to switch between high and low, using the third state so that when I switch the state of my buttons, the pins would recognize the third state and do nothing so no inputs are misread. But I might also have to try the circuit you depicted. I'll draw up the circuit when I get home.
If you were going to use 2 pins then go with the more traditional approach...
Both will show HI wne the switch is centered and the softeware is a lot simpler...