Shop OBEX P1 Docs P2 Docs Learn Events
easy to make a BASIC Stamp project that controls a serial device? — Parallax Forums

easy to make a BASIC Stamp project that controls a serial device?

NCTV17NCTV17 Posts: 2
edited 2010-04-29 00:37 in BASIC Stamp
Hi everyone, I work for Community Television station here in Naperville, Illinois and want to pose a question to you:

I am new to the BASIC Stamp world and wanted to know if it would be possible to program one of these stamps to at a push of a wired button send out a serial command. I am looking to build a device that at a push of a button or switch can send a data string. It also has to have a pass through because this device is normally controlled by a computer. here is a excerpt on what is needed to control the video switcher.

3.4 CONTROL VIA THE RS232 INPUT
A simple protocol allows all crosspoints to be set through the RS232 port. The
RS232 port will accept inputs from a terminal, computer, or other software-driven
control device. No handshaking is required. The RS16x16HB RS232 Port is configured
as a DCE. The pin-out of this port allows connection to an PC or compatible 9 pin
serial COM Port with a 1:1 cable. (Data is sent from the router as pin 2. Data is
received by the router as pin 3. Pin 5 is ground.)
Note: in the following commands the letters may be upper or lower case; (ENTER)
is the same as Carriage Return (in hex, a 0D). Do not add a Line Feed (in hex, 0A).
3.4.1 ROUTING AUDIO AND VIDEO
To route video and audio send a six-byte command in the form:
Bxxyy(ENTER)
where xx is an output number (01-16) and yy is an input number (01-16).

what supplies would I need to complete this project and is this a simple thing for a novice to do? Thanks a million! - Jay

Post Edited (NCTV17) : 4/28/2010 11:02:48 PM GMT

Comments

  • NCTV17NCTV17 Posts: 2
    edited 2010-04-29 00:07
    So basically I want to be able to push a button and have the Basic stamp send: B0101 (Enter) is this doable?
  • Mike GreenMike Green Posts: 23,101
    edited 2010-04-29 00:37
    Yes, this is doable. Read the sections of the Basic Stamp Syntax and Reference Manual on the SERIN and SEROUT statements. If you don't have this, see the help files of the Stamp Editor for the same information. The "What's a Microcontroller?" tutorial shows how to handle pushbuttons.

    The Stamp's outputs (0V / 5V) should work for most RS232 inputs and, with a 22K series resistor as shown in the Manual, the Stamp's inputs should work with RS232 outputs.
Sign In or Register to comment.