Can you connect a BS2 output pin directly to a CMOS or TTL pin? If not how do you translate the voltage. Does it make a difference if the BS2 pin is an input or output? Thanks.
The I/O pins on the BASIC Stamps are TTL/CMOS comaptible 0-5V output. If they're feeding into a non-pulled up input then there shouldn't be any problem regardless of the device voltage. If the device is 0-5V it wouldn't matter anyway. Is there a particular device you're interested in connecting?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔ Chris Savage Parallax Tech Support
Okay, that is the opposite of your original post where the direction was an output of the BASIC Stamp going to an input of another device, but either way, the 74xx devices are 5V logic, so there's no problem. You also do not need a resistor unless you're worried about protecting the I/O pin from a possible programming mistake where you accidentally make the input pin an output.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔ Chris Savage Parallax Tech Support
Actually I will be going both ways- from the output pin of the flip-flop to the BS2 input pin (to receive the state) and from another BS2 output pin to the flip flop pin to clear it.
I've noticed a value of 220ohms for resistors placed on the pins of the BS2 for protection. Would that work here, or should I use a different value?
220 ohms is a good safe value to use. It was actually derived from a formula to limit the current on the pin in the case of an output short condition. In this situation the maximum current would be ~23 mA max. Of course, you want to avoid having this happen, but should a programming error cause it, the resistor acts as a failsafe. It is also a low enough value to allow the pin to toggle lines with stiff pull-up/down resistors. I hope this helps. Take care.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔ Chris Savage Parallax Tech Support
Comments
The I/O pins on the BASIC Stamps are TTL/CMOS comaptible 0-5V output. If they're feeding into a non-pulled up input then there shouldn't be any problem regardless of the device voltage. If the device is 0-5V it wouldn't matter anyway. Is there a particular device you're interested in connecting?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
Also, do I need to insert any current limiting resistors, if somthing goes wrong with the flip-flop?
Thanks
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
Actually I will be going both ways- from the output pin of the flip-flop to the BS2 input pin (to receive the state) and from another BS2 output pin to the flip flop pin to clear it.
I've noticed a value of 220ohms for resistors placed on the pins of the BS2 for protection. Would that work here, or should I use a different value?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support