Yes, as long as you insure that both I/O pins are left as INPUT. Note on RESET all I/O pins default to input. IF both pins were set to OUTPUT, and one pin drove HIGH, while the other pin OUTPUT LOW, then one of the pins would probably burn out. Now, that's quite a few IF's, of course. To make sure, you can put a 220 ohm resistor in series with the signal -- that will lower the current enough that even IF both pins were set to output, etc. they wouldn't hurt each other.
Thanks allanlane5.· This is the resulting picture.· By the way in my other thread you suggested putting a 120 Ohm resistor in series with the I/O pin, but here you suggest a 220 Ohm.· Just out of curiosity, is there any reason for the difference?
The issue is: When you tie an output to a 'hard ground' (ie a low-resistance path to ground), and then set that output high accidentally, the amount of current the BS2 will try to put out into what is essentiall a 'dead short' to ground will burn out the pin.
Similarly, if you tie an output to a 'hard +5' (ie a low-resistance path to +5 volts) and then set that output low accidentally, again, the amount of current can burn out the pin. Actually, the transistor drivers behind the pin, but you get the idea.
Now, to prevent damage you need a "current limiting" resistor. 220 ohms is the recommended "current limiting" resistor Parallax uses, and puts in their Homework board. I just figured about half that assigned to each BS2 would work if the BS2's are talking to each other. But, if the BS2's are reading a switch signal, then each one needs the full resistance.
Hi,
If the 2 Stamps are running on different +5 supplies or ontheir own internal regulators: ·The safest way would be to use a Doubel Pole Switch. This will supply the switch position· information and isolate the 2 Stamps completely. You could also use Opto-Isolators if a DP switch is not possible.
If both Stamps are running from the same 5volt supply: ·You could wire the switch to ground the input (Using a pullup resistor from the pin to +5). The draw back is if either Stamps pins get assigned as an Output you could get blown pins with the switch closed.
The double pole or Opto-Isolators idea is great. I didn't even think in those terms. As it happens, both Stamps share Vss and Vdd and are networked together using another pair of I/O pins anyway. I don't plan on allowing the pins in question to be anything but inputs but in a previous post allanlane5 supplied a tip using a protective resistor on each pin just in case of "accidents".
I will file away your idea though, in case I ever am dealing with isolated Stamps.
Comments
Similarly, if you tie an output to a 'hard +5' (ie a low-resistance path to +5 volts) and then set that output low accidentally, again, the amount of current can burn out the pin. Actually, the transistor drivers behind the pin, but you get the idea.
Now, to prevent damage you need a "current limiting" resistor. 220 ohms is the recommended "current limiting" resistor Parallax uses, and puts in their Homework board. I just figured about half that assigned to each BS2 would work if the BS2's are talking to each other. But, if the BS2's are reading a switch signal, then each one needs the full resistance.
If the 2 Stamps are running on different +5 supplies or ontheir own internal regulators:
·The safest way would be to use a Doubel Pole Switch. This will supply the switch position· information and isolate the 2 Stamps completely. You could also use Opto-Isolators if a DP switch is not possible.
If both Stamps are running from the same 5volt supply:
·You could wire the switch to ground the input (Using a pullup resistor from the pin to +5). The draw back is if either Stamps pins get assigned as an Output you could get blown pins with the switch closed.
Good Luck,
Alan Bradford
Plasma Technologies
www.plasmatechnologies.com
The double pole or Opto-Isolators idea is great. I didn't even think in those terms. As it happens, both Stamps share Vss and Vdd and are networked together using another pair of I/O pins anyway. I don't plan on allowing the pins in question to be anything but inputs but in a previous post allanlane5 supplied a tip using a protective resistor on each pin just in case of "accidents".
I will file away your idea though, in case I ever am dealing with isolated Stamps.