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)
    http://www.geocities.com/animesh_m/led_flash.jpg

    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
    (Busy).

    Please help me to figure out the fault.

    Thanks
     
  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: http://www.jecarter.com/
    VB3/VB6/C/PowerBasic source code: http://www.jecarter.com/programs.html
    Freeware for the Palm with NS Basic source code: http://nsb.jecarter.com
    Drivers for Pablo graphics tablet and JamCam cameras: http://home.earthlink.net/~mwbt/
    Email here: http://www.jecarter.com/contactme.htm
     
  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………..

    Thanks
     
  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
    http://www.logix4u.cjb.net/
     
  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.

    http://www.geocities.com/zoomkat/ppswitcher.htm
    http://www.geocities.com/zoomkat/output.htm
    http://www.geocities.com/zoomkat/status.htm
     
  7. Hi Rich,

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

    Thanks
     
  8. wow you did it…., thanks a lot. It did what I expected!
    Anyone interested can download it from
    http://www.embeddedtronics.com/public/Electronics/minidaq/userport/UserPort.zip
    Thanks again

    AM
     
  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
    2
    3;- (check library file open)
    4 LibOpen.l = OpenLibrary(1,"io.dll")
    5 If LibOpen = 0
    6 End
    7 EndIf
    8
    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 <www.lvr.com>
    That should at least get you started.

    Best regards,


    Bob Masta
    dqatechATdaqartaDOTcom

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

-