Shop OBEX P1 Docs P2 Docs Learn Events
stamp to control three serial ports? — Parallax Forums

stamp to control three serial ports?

ddoudddoud Posts: 10
edited 2006-03-16 14:09 in BASIC Stamp
I'm still building my weather balloon, and I need to set up a parallax based flight computer to do the following:

1. take serial output data from another basic stamp setup (on the board of education)
2. take GPS serial data (std OEM garmin GPS 35)
3. process data, and output it through another serial port to a ham radio modem.
4. push some of that data to some sort of flash or non volatile memory.

So basically, I think I need the following:
BS2, or perhaps the BS2P40 (the app mod docs seems to say i need 4 pins per serial port, and maybe some chip, its not clear)
Board of Education Board or BS2p24/40 Demo Board
2 or 3 RS-232 ApMods depending if I can use the onboard serial port for one of the above tasks
some flash or non volatile memory something... and it looks like I'm on my own for that as P-lax doesnt sell anything (why not!!!)

Is this the right track? Will I be able to stack three serial adapters on top of one another to do independent things?

Has anyone done anything related to this?

Thanks.

Comments

  • PJAllenPJAllen Banned Posts: 5,065
    edited 2006-03-16 03:58
    · Parallax sells I2C EEPROMS for your non-volatile memory.· The BS2P40 has special I2C-commands to utilize these easily.
    · If you are going to use the programming ("on-board") serial port for one of your devices, then you can't use it for DEBUGging.
    · It's possible you only need two I/O pins per device (Transmit Data and Receive Data), unless your devices require hand-shaking.·
  • Mike GreenMike Green Posts: 23,101
    edited 2006-03-16 04:17
    You shouldn't need all those AppMods. You can do serial I/O with the SERIN and SEROUT commands using TTL signal levels and just a wire connecting the two Stamps. Depending on the circuitry of the modem, you may be able to use TTL levels again. Often the 5V level of the Stamp outputs is enough to reliably connect to a physically close RS232 input and a series resistor (22K) to limit the current through the protective diodes is enough to connect an RS232 output to a Stamp input. The Basic Stamp Manual has examples in the sections on the SERIN and SEROUT commands. There are articles in Nuts and Volts on networking two (or more) Stamps together. In any event, keep in mind that any I/O pin can serve as a serial input or output and, depending on how the two devices talk to each other, you may not need handshaking lines. For some devices, XOFF (a control character - look at an ASCII chart) can be used to signal the other device to pause until an XON is sent to it later.
  • Mike GreenMike Green Posts: 23,101
    edited 2006-03-16 04:27
    Glancing quickly at the Garmin GPS35 OEM specs, it looks like you should do just fine with just the series resistor between the GPS transmit pin and a Stamp input (and just a wire between the GPS receive pin and a Stamp output). One of the models actually is intended to connect to logic levels (TTL/CMOS) rather than RS232 signal levels.
  • BeanBean Posts: 8,129
    edited 2006-03-16 12:11
    ddoud,
    Don't forget that the basic stamp cannot receive and transmit at the same time. IOW if you are sending data via the radio, any data that comes in will be lost.

    Bean.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "SX-Video·Module" Now available from Parallax for only $28.95

    http://www.parallax.com/detail.asp?product_id=30012

    "SX-Video OSD module" Now available from Parallax for only·$49.95
    http://www.parallax.com/detail.asp?product_id=30015

    Product web site: www.sxvm.com

    "Wise men know when they're right. The wisest also·know when they're wrong."
    ·
  • allanlane5allanlane5 Posts: 3,815
    edited 2006-03-16 14:09
    ddoud:

    It sounds like you need some simple, small co-processor like the http://www.rhombus-tek.com/co-processors.html. This will provide you with a buffered RS-232 input port, which the BS2 accesses through SHIFTIN/SHIFTOUT instructions. You can easily interface two of these for your inputs, using a 22 Kohm resistor to drop the RS-232 voltage levels (if you need to).

    You can connect the "Ham Radio Modem" to the programming port.

    Then you sample the input chips for data, and when you get some copy it to eeprom and send it out the Modem port. Meanwhile, the input chips can be taking more data to be sent the next time around.

    In any event, the BS2 can recieve "true" +-12 volt RS-232 merely by putting a 22 Kohm resistor in series with the signal pin.· For transmitting true RS-232, you would need· the app-mod (or the programming port).
    ·
Sign In or Register to comment.