Program needed for parallel port pushbutton

Discussion in 'The Projects Forum' started by jmiller29, Mar 17, 2009.

  1. jmiller29

    Thread Starter New Member

    Mar 17, 2009
    I have a pushbutton wired to my parallel port pin 11.
    I am looking for some Windows software that will constantly monitor the pin and execute a program when the button is pressed.

    Anyone know of something like this? I am not a programmer and don't want to write one myself.

  2. t_n_k

    AAC Fanatic!

    Mar 6, 2009
    If you are not interested in doing any programming it will be difficult.

    Can probably be done in visual basic - read the parallel port data as a background task - since you probably want to do other stuff on the PC as well. On detecting the port line data change execute the external application using the Shell command....

    X = Shell("My_app_path\My_app.exe", vbMaximizedFocus)

    It's a bit of work for someone - but "do-able".
  3. jmiller29

    Thread Starter New Member

    Mar 17, 2009
    I was hoping to find something already written.
    Seems like someone would have already done this by now.
    I wrote some visual basic many many years ago but now I installed Visual Basic express 2008 and it is all foreign. I can't even figure out how to get started now.

    Tried it in Turbo Basic using x=inp(888) and x=inp(889) but nothing changes as I press the button.

    I verified that the button is working using Lalim Paralel Port Control diagnostic.

    Anyone have a simple solution?
  4. jmiller29

    Thread Starter New Member

    Mar 17, 2009
    I went with an alternative method using a keyboard controller.
    I was really into the parallel port thing but it was taking WAY too much time.
    The keyboard controller project is up and running.
    Thanks for your help anyway. If anyone is interested please keep discussing this. Surely someone else is interested in the same thing.
  5. thatoneguy


    Feb 19, 2009
    Writing to / Reading from the parallel port is relatively easy, once you know the address, usually 0x278 or 0x378. I have seen odd addresses used though, such as 0x2F8, 0x3E8, even though only one port is installed.

    Once you know the correct address, the basic program you posted above would work.
  6. beenthere

    Retired Moderator

    Apr 20, 2004
    It is usually 378h, but there are multiple registers associated with that address, depending on the port setup. The Beyondlogic link should make this clear.