Results 1 to 5 of 5

Thread: Comm Port pin manipulation

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Mar 2000
    Posts
    16
    To control an external device I need to set certain serial port pins high and low and connect some together.
    Can this be done in VB5.0?

  2. #2
    Hyperactive Member
    Join Date
    Sep 1999
    Posts
    305
    yes indeed. go to http://www.lvr.com/parport.htm You can use what they have there to output a signal. It might also interest you to know that in QBasic, to output a signal to the printer port, simply type "Out *PORT ADDRESS*, *NUMBER BETWEEN 1 and 256*" and it will output to pins 2 through 9. Ground is pins 17-25, so you only need to connect ground to one of them. I'm confusing. Go to the place above.

    bob

    Edited by Bob Baddeley on 03-17-2000 at 12:42 AM

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Mar 2000
    Posts
    16
    Bob, Thanks for the prompt response.
    I checked out http://www.lvr.com/parport.htm. It's a great site with lots of drivers and a good xplanation of the various kinds of drivers. I downloaded most of the recommended drivers and looked at the help files (where they existed) and the sample code. There seems to be no obvious way of directly linking the serial pins, and connecting pins to ground.
    Ideally there would be a function:

    VBConnectPins(PortID as Int, ConnectThisPin as int, ToThisPin as int)

    Existing VB5.0 commport drivers (MS and third party) do not seem to have this low a level interfacing. They simply send and recieve characters via the ports.

    I guess I should start considering teaching myself QBasic or C so that I can write a dll. This could take a while though. I was hoping for a more rapid VB solution.

  4. #4
    Hyperactive Member
    Join Date
    Sep 1999
    Posts
    305
    Whoa! Did you want to do serial cable only? That's tough, and frankly, I don't know how to do it. But what you mentioned about what you want scares me. What do you mean by connecting one pin to another? What are you trying to do, other than destroy the board by connecting ground to positive and shorting everything? And yes, that site did have what you need. The readme's of the .dlls have it; especially inpout32, which is what I use. Perhaps you should tell me what you're trying to do and I could help you.

    bob

  5. #5

    Thread Starter
    Junior Member
    Join Date
    Mar 2000
    Posts
    16

    G856 proton precession magnetometer manipulation

    I'm a geophysicist. The program I am writing will monitor the earths' magnetic field via a G856 proton precession magnetometer and warn us of geomagnetic storms.
    The Geometrics G856 (www.geometrics.com) can be made to output readings via RS-232 by a "pulse (pull line low) on
    "sync" pin S (or connect pin S to pin D). The data will be sent RS-232 (d = ground, T = transmit (from g-856), G = clear to send,)". This is a quote from the manual.

    I have wiring and pin diagrams of the RS-232 interface with the G856. So I need RS-232 pin manipulation controls, of the kind described in previous postings.

    So I guess I don't have to use the serial port, just RS-232 ports of any description.

    I'll check out Inpout32 once more to see if it's applicable.

    Justin.

    I just checked out Inpout32. Seems it's only for Win95/98. I would like to use NT, but if it comes to the crunch and this can only be done (easily) with 95/98 so be it, we'll install 98.

    [Edited by Justin Ward on 03-22-2000 at 02:16 AM]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width