Using the IN and PULSIN commands
Help me out to better understand how the IN and PULSIN work with the Basic Stamp. These comands are used to detect the state of· a pin, 1, or 0. Is there any current flow thru the pin when it detects a signal? Can a signal be sent and detected by·the pin from another circuit that is powered by separate 3V source other than the 5V to the BS2? I am assuming you would have to have a common ground between the BS2 and the other circuit. If this is true, how high·can the voltage be that is to the BS2?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
······ Joe Fishback
-Robots are my friends-
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
······ Joe Fishback
-Robots are my friends-
Comments
2. I believe the decision point is like 1.4 volts, so a 3-volt signal SHOULD read as a '1'.
3. Yes, you MUST have a common ground.
4. If you put a 22 Kohm resistor in series with the signal, the BS2 has 'protection diodes' on its I/O pins which will 'clip' a +- 12 volts signal to 0 and +5. As long as the current is low enough, which the 22 Kohm resistor takes care of.