Can a dip switch be used as a configuration tool with the bs2sx?
beazleybub
Posts: 102
Hi everybody,
I am totally green here so please bear with me if I don't seem to make any sense.
I am developing a circuit that controlls two relays sequentially back and fourth and would really like to set up a dip switch that would allow different configurations of the relays firing order.
A·dip switch would determine if relay one would fire before relay two and if the dip switch was set to a different setting then relay two would fire before relay one.
What I am trying to accomplish is actually a bit more complex than the example I have provided but I hope that I can set up a dip switch that would determine what order the code is executed within my program.
Dip setting one "fire one, two, one, two"
Dip setting two "fire two, one, one, two"
Dip setting three "fire one, two, two, one"
Do I make any sense here? Thanks in advance for any help or direction.
Post Edited (beazleybub) : 2/28/2008 8:26:13 AM GMT
I am totally green here so please bear with me if I don't seem to make any sense.
I am developing a circuit that controlls two relays sequentially back and fourth and would really like to set up a dip switch that would allow different configurations of the relays firing order.
A·dip switch would determine if relay one would fire before relay two and if the dip switch was set to a different setting then relay two would fire before relay one.
What I am trying to accomplish is actually a bit more complex than the example I have provided but I hope that I can set up a dip switch that would determine what order the code is executed within my program.
Dip setting one "fire one, two, one, two"
Dip setting two "fire two, one, one, two"
Dip setting three "fire one, two, two, one"
Do I make any sense here? Thanks in advance for any help or direction.
Post Edited (beazleybub) : 2/28/2008 8:26:13 AM GMT
Comments
As you have it shown, there are four sets of two firing stations, will this always be the case?
If not, how many sets of how many firing stations can there be?
Although you may be able to use a DIP switch, that may not be the best answer to the problem. The answers you provide will help to determine that.
Regards,
Bruce Bates
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"Genius is one percent inspiration and ninety-nine percent perspiration."
Thomas Alva Edison
Thinking binary - 3 settings can be done with two pins and you have one left over state that is undefined.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
PLEASE CONSIDER the following:
Do you want a quickly operational black box solution or the knowledge included therein?······
In my example there are only two relays in which dip switches would determine the sequence that they would fire. I did not mean to be confusing about my question it was late and I was nearly passing out.
What I really meant to ask was just simply can a dip switch be used to control specific routines?
Kramer said...
There are even little rotary HEX switches that give you 16 choices from 4 pins of the BasicStamp.
Kramer,
Thanks for your input as well but if I used one of those HEX switches I would be creating a monster
If I connect one of the dip switches legs to ground and the other to an input leg of the interpreter and say I were to use three switches on three legs, how would I code the vars? Could you please give me a little example?
Thank you both very much for your help and time.
·
YES YOU CAN USE Dip Switches as confuguring input for any stamp.
hope to help
Amaral
I successfully set up my dip switches ond got them to do as I wanted but I am sure that my code is brutal being that I am new at basic. Outside of html I an a total novice on the basic language so I am working on projects found in the "what is a microcontroller manual"
I will be needing some coding help in the near future if you guys are willing to assist me.
I do however have a couple of questions regarding the schematic between bs2 and bs2sx.
I found the bs2 lite shematic showing the bare essentials for the eeprom and the interpreter showing how you can strip down some of the unnessessary components and can not seem to find the bs2sx lite schematic if one even exists for bs2sx. I found the standard bs2sx shematic and the pinouts look very similar if not the same so my question is·can I use the bs2 lite schematic to set up the bs2sx as a lite version and if so are there any differences? Thanks again! Your pal, Robert
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
What if there was nothing? Nothing is something!
Post Edited (beazleybub) : 3/3/2008 3:30:07 AM GMT
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
One way to get them into a group is to have an empty varable be a buffer that starts as %0000000. First. copy pin 1 to the buffer's bit.0, then copy pin 2 to buffer's bit.1, and finally copy pin 3 to buffer's bit.3. Then read the value of the buffer.
Each value would associate with a different choice. While you have 8 maximun, some could be empty.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
PLEASE CONSIDER the following:
Do you want a quickly operational black box solution or the knowledge included therein?······