i need to acess parallel port though c for interfacing my project

hi, i m just a beginner in c language, and i m making a logic controlled project, i m making a gaming machine using AND and OR gate, and i want to create user interface by connecting the hardware to computer via parallel port and like for instance, tht a question will be displayed on computer's screen like for instance " what is the capital of norway"
b- sydney
c- oslo
d- bombay
so if user selects a then the message " sorry your answe is wrong"
and if user selects c logic 1 shoulg be transferred to pin 1 of AND gate to which we already have provided logic 1 so output will be 1 and then the questio will be displayed on screen " your gender"
ii- female
and if its male then send logic 1 to another circuitry and a gift will slide and if its female then some other gift will slide.
i m a beginner in c language and my teahcer told me tht outport function is used to acess parallel port, but i m not able to make a program , can u guyz help or refer a site or book considering i m just a beginner in programming


  • "outport" is an old obsolete non-standard function that won't work on Windows computers. So this program is not a task for a beginner.

    For info about the parallel port, check legacy ports at this site:

  • cant i use windows98????
    and thnx for the link
  • Yes, Windows 98 will still allow access to the parallel port using either a console or Win32 interface. You will probably need to make sure the parallel port is set to bi-directional (standard) in the BIOS. Also, there are only five input lines (pins 15, 13, 12, 11, 10) and the last one is inverted. The output lines are pins 2 through 9. I always use a buffer IC to deal with the parallel port outputs when experimenting - the pins can only sink or source a small amount of current.

    To signal a particular pin simply change that bit within an eight bit number and send it to the port. Then clear the port when desired. Note that if you send two numbers sequentially to the port, there will be a clear in between, so a pin you have set with the first number and that will be set with the second number, will clear momentarily between the two numbers. For example, to set pin 5, with all others cleared, send the value 8 (00001000 binary) to the port using outport. When ready to clear, send 0.

    To read from the port, use inport.

    I can provide more info later, but I might be slow to respond. The best thing to do is research parallel port interfacing on the web.

    Take Care,

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!