Connect with us

reading from printer port

Discussion in 'Electronic Basics' started by [email protected], Apr 9, 2006.

Scroll to continue with content
  1. Guest

    hello
    I'm student of mechanical engineering. In a project I subjected with
    this problem :
    I want the computer to show if the door-bell is ringing or not, but I
    know alittle about printer ports, only I want the computer to show an
    alarm that "the bell is ringing" when it's ringing.
    when I searched I faced with many graet information about "Use of a PC
    Printer Port for Control" but I want an easy method for my problem
    (they were too hard for me to understand).
    please help me. I use c, c++ for the programming
     
  2. Si Ballenger

    Si Ballenger Guest

    You will have to make a gizmo to pull the parallel port status
    pins low when the bell is rung and be able to read the status of
    the status pins while the bell is being rung. You might be able
    to do something similar with the serial port by putting something
    in the receive buffer when the bell is rung, and then checking
    the buffer content for input. Below is a link to some simple
    parallel port stuff I've tinkered with.

    http://www.geocities.com/zoomkat/status.htm
     
  3. Bob Masta

    Bob Masta Guest

    There's a lot of port info at
    www.lvr.com
    However, note that if you have anything later
    than Win9x, you will need a special ring 0 driver
    (GIVEIO and USERPORT are two options)
    in order to get direct access to the port. Win9x
    and earlier allow direct access, and they also
    allow real-mode DOS operation which NT, 2K, and XP
    don't.

    If you are using real-mode DOS you can have your
    doorbell trip the printer port interrupt, so the computer
    won't have to watch continuously in a loop. But it
    actually wouldn't be a big drag on the system to
    just check at every tmer tick (18.2 times per second.)
    In Windows, you could set a timer for 100 msec or
    so.

    Best regards,



    Bob Masta
    dqatechATdaqartaDOTcom

    D A Q A R T A
    Data AcQuisition And Real-Time Analysis
    www.daqarta.com
    Home of DaqGen, the FREEWARE signal generator
     
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day

-