Shop OBEX P1 Docs P2 Docs Learn Events
COM3 Modem Interface — Parallax Forums

COM3 Modem Interface

Aaron193Aaron193 Posts: 27
edited 2007-01-08 22:29 in BASIC Stamp
Hi
I'm Aaron. I have been trying to figure out how to use COM3 Modem control to interface with a Basic Stamp 2. The program is just a simple Serout command, but my real question lies in the circuitry. How would I connect the I/O pin (any one) to·a two pin phone connecter which is connected to the computer's modem port? If anyone can post a picture to better illustrate this, please do.

Post Edited (Aaron193) : 1/7/2007 11:40:39 PM GMT

Comments

  • allanlane5allanlane5 Posts: 3,815
    edited 2007-01-08 13:09
    Tricky. It sounds like you're trying to wire a BS2 pin directly to an RJ-11 phone connector, and plug that into the "Phone" connection of a Modem board.

    If that's true, it's not going to work. A telephone signal is a 24 volts AC signal (with Ring voltage of -48 volts DC). There's NO way a BS2 can generate that without external circuitry. Nor do most people really want or need to do this -- what are you trying to do?

    You can purchase a USB to serial adapter for $30 or so which will directly connect to the BOE and work fine as COM 4 through 16.
  • Aaron193Aaron193 Posts: 27
    edited 2007-01-08 22:12
    I'm trying to use Visual Basic 2005, which has Serial Port Support. I've tried to get it to work with USB but I gave up.
  • allanlane5allanlane5 Posts: 3,815
    edited 2007-01-08 22:25
    A properly installed USB to Serial adapter looks (to VB) exactly like a 'native' serial port. Your PC simply 'magically' gets another COM4, or COM5, or whatever through the USB driver. When you open COM5 (for example) in VB, the DB-9 on the 'other' end of the USB adapter is made 'live'.

    You simply can't use the RJ-11 connector on your Modem card with the BS2 -- that's a "Phone" connector, intended to be connected to your house's phone line.
  • allanlane5allanlane5 Posts: 3,815
    edited 2007-01-08 22:29
    Another idea -- If you can program your BS2, you can use the same serial port to communicate with your BS2. On the BS2 side, try:

    MAIN:
    SEROUT 16, 16468, [noparse][[/noparse]"Hi there", 13]
    PAUSE 1000
    GOTO MAIN

    This should send the "Hi there" message once a second to your PC's serial port. You can see this from the Parallax IDE by opening a "DEBUG" terminal to make sure it works. Then, disconnect the Debug terminal, and bring up your VB program which should try to 'listen' to the same COM port you used to program the BS2.

    If the VB program says the port is "Busy", you may have to bring down the Parallax IDE to free up the port. As long as you've turned off your Debug Terminal, this shouldn't happen.
Sign In or Register to comment.