Connect with us

Programming Parallel Port

Discussion in 'Electronic Basics' started by Animesh Maurya, Jul 12, 2004.

Scroll to continue with content
  1. Hi all,

    I'm learning basics for parallel port interfacing.

    Please see this link (program and schematic on the same page)

    Here a program is written in C, which blinks the LED at Data 0 (Pin2),
    when Busy (Pin11) goes to logic zero.

    Port address is alright, but unfortunately when I switched on the
    supply LED started glowing irrespective to the logic level at pin11

    Please help me to figure out the fault.

  2. the Wiz

    the Wiz Guest

    Are you sure that you're looking at pin 2?

    The count is different depending on whether you're looking at the front or back
    side of the connector.

    Who, me? I would never make that mistake ;-)

    More about me:
    VB3/VB6/C/PowerBasic source code:
    Freeware for the Palm with NS Basic source code:
    Drivers for Pablo graphics tablet and JamCam cameras:
    Email here:
  3. I am sure that all connections are up to the mark.

    Now I am sure that WinXp do not support parallel port programming under dos mode.
    Program is tested to run under Win9x platform, and now winxp is making me ill..

    Did anybody notice it? Waiting for a response………..

  4. Rich Grise

    Rich Grise Guest

    It might seem obvious, but your schematic doesn't show anything
    in common between your external supply and the PC other than
    the LED and resistor. Have you connected their grounds together?
  5. KevinR

    KevinR Guest

    Win XP and win2K are likely to cause problems with this, as they will
    not release hardware to programs not running in ring 0.
    You might find this easier if you can use visual basic or visual C++
    and use the inpout32.dll file available from
  6. Si Ballenger

    Si Ballenger Guest

    You can run a program called userport on your NT/2K/XP machine to
    get user level access to the parallel port pins. Below are a
    couple of pages where I've done some simple parallel port stuff.
  7. Hi Rich,

    Yes I did connect it. Now all that i can do is to try it on win98 machine.

  8. wow you did it…., thanks a lot. It did what I expected!
    Anyone interested can download it from
    Thanks again

  9. Guest

    Further to my reply under messages "PC based Measurements"
    here is a sample of code to write to the P.Port using 'io.dll' and Purebasic.

    1 PortNum.l = $378 ; LPT1
    3;- (check library file open)
    4 LibOpen.l = OpenLibrary(1,"io.dll")
    5 If LibOpen = 0
    6 End
    7 EndIf
    9 CallFunction(1,"PortOut", PortNum,$080) ; write 80h to port 378h
    10 End
  10. Guest

    and I forgot to sign my msg
    Kevin T
  11. krishneo

    krishneo Guest

    Guys Anybody having idea about interfacing serial port in winxp
  12. Bob Masta

    Bob Masta Guest

    Haven't tried it, but if you don't want to use
    the Win32 API you will need to load a special
    kernel driver to gain access. The first place
    to check for any kind of port info is
    Lakeview Research <>
    That should at least get you started.

    Best regards,

    Bob Masta

    D A Q A R T A
    Data AcQuisition And Real-Time Analysis
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