Basic Stamp sending RS232 Commands
I am fairly new to the Stamp.· I have used it before to just do logic switching and time delay applications but now I am looking to make it do a few more things.· Also, I am not sure if I can use a Basic stamp or if now would be a good time to start looking at the Propeller chips.
I am looking for a way to take a push button input (when a input pin goes high or low) and output a line of preset data in the form of RS232 or RS485.· I also would like to be able to program an imput to the chip that would accept RS232 and just pass that data to the output RS232 connection, thus allowing me to keep 'stacking' Basic Stamps in a row allowing me to have several more input pins that are on one chip.
The overall goal that I am trying to accomplish is to change video sources on a video switcher that I have.· The video switcher has 128 video inputs and changed the input based on a RS232 command.· If I open hyber-terminal I can type a command that will change the video source.· I am looking to make a circuit that will look at 40 to 50 buttons and output a different line of code depending on what buttons is pressed.
I have also thought about using a matrix input (10 input pins giving me around 100 combinations depending on what pins are used in combination) so I would only need to use one chip.
Also, do you think I could use a second Stamp doing this reverse operation?· Turning RS232 commands into an output, making a pin either go high or low.
Any information you can provide would be great.· Eventually I will need some help with the code as I am fairly knowledgable with the hardware part of the circuit.· Thank You in advance for any help you might have...
I am looking for a way to take a push button input (when a input pin goes high or low) and output a line of preset data in the form of RS232 or RS485.· I also would like to be able to program an imput to the chip that would accept RS232 and just pass that data to the output RS232 connection, thus allowing me to keep 'stacking' Basic Stamps in a row allowing me to have several more input pins that are on one chip.
The overall goal that I am trying to accomplish is to change video sources on a video switcher that I have.· The video switcher has 128 video inputs and changed the input based on a RS232 command.· If I open hyber-terminal I can type a command that will change the video source.· I am looking to make a circuit that will look at 40 to 50 buttons and output a different line of code depending on what buttons is pressed.
I have also thought about using a matrix input (10 input pins giving me around 100 combinations depending on what pins are used in combination) so I would only need to use one chip.
Also, do you think I could use a second Stamp doing this reverse operation?· Turning RS232 commands into an output, making a pin either go high or low.
Any information you can provide would be great.· Eventually I will need some help with the code as I am fairly knowledgable with the hardware part of the circuit.· Thank You in advance for any help you might have...
Comments
This is just a thought, but with 14 I/O lines in one Stamp and14 switches, you could send out 49 unique multi-charactermessages. Set the switches up in a cross-point matrix and read pairs of inputs.
That's just the first thought; with a little doodling, you can probably build a tree and get the switch count down and the number of combinations up...
The number of character strings that you can store has a finite limit, but I wouldn't expect it to be a problem unless you have long character strings.
Regards,
Terry
A second idea; set the switches up to represent binary and various combinations of 6 switches gets you 63 (plus 0) unque inputs, and still leaves 10 I/O pins for output.
Terry
Last idea, and also addressing another part of your original question...
6 inputs lines and 9 switches (an inexpensive keypad) give you 9 unique signals. Save the result and push another key. You now have up to 99 unique results.
In response to the question about a Stamp outputting a high or low (or multi-pin combinations of high and low) in response to "an RS232 command": Yes, that is fairly easy to do. Most input commands sent via RS232 are one-letter commands, but there is no reason why they couldn't be multi-letter.
Terry