940775
asked on
BASIC STAMP : How to input bits into an accumilator
Lets say I have two push button switches connected to the input port of a basic stamp. What I want to know is how to write a simple program to input a "1" when the 1st button is press and a "0" when the sexond button is pressed. I'll have the the 5v connected to both switches and a not gate connected to the second.
ASKER
OK LRHGuy, lets use two input ports. How would you write the code (just an example)?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
You'd need a tri-state input for that...which would be "seen" as a 1 a 0 or "not a 1 or 0" as the third state. I don't believe the stamp can do that.
Now it you're using two input ports, no problem!