Writing to the parallel port (Mem 0x378) when runnning WinXP or Mandrake 9.2

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Todd Gardner

    Writing to the parallel port (Mem 0x378) when runnning WinXP or Mandrake 9.2

    ---------------------------------------------------------------
    I would appreciate any ideas how to write to the parallel port (Mem
    0x378) when runnning WinXP or Mandrake 9.2.

    In C and LabVIEW I use the OutP command to write to directly to a
    memory address.

    Thank you
    --
    Todd
    piir@earthlink. net
    ---------------------------------------------------------------
  • Michael Geary

    #2
    Re: Writing to the parallel port (Mem 0x378) when runnning WinXP or Mandrake 9.2

    Todd Gardner wrote:[color=blue]
    > I would appreciate any ideas how to write to the parallel port
    > (Mem 0x378) when runnning WinXP or Mandrake 9.2.
    >
    > In C and LabVIEW I use the OutP command to write to
    > directly to a memory address.[/color]

    I don't know about Linux, but in Windows NT/2000/XP you need a kernel mode device driver.

    This Google search may help:

    windows xp parallel port i/o driver

    -Mike


    Comment

    • Gandalf

      #3
      Re: Writing to the parallel port (Mem 0x378) when runnning WinXPor Mandrake 9.2

      Use PySerial



      Laci

      Todd Gardner wrote:
      [color=blue]
      >---------------------------------------------------------------
      >I would appreciate any ideas how to write to the parallel port (Mem
      >0x378) when runnning WinXP or Mandrake 9.2.
      >
      >In C and LabVIEW I use the OutP command to write to directly to a
      >memory address.
      >
      >Thank you
      >--
      >Todd
      >piir@earthlink .net
      >---------------------------------------------------------------
      >
      >[/color]



      Comment

      • Gerhard Häring

        #4
        Re: Writing to the parallel port (Mem 0x378) when runnning WinXPor Mandrake 9.2

        Gandalf wrote:[color=blue]
        > Use PySerial
        >
        > http://pyserial.sourceforge.net/[/color]

        I'd recommend PyParallel instead:



        ;)

        -- Gerhard


        Comment

        • Gandalf

          #5
          Re: Writing to the parallel port (Mem 0x378) when runnning WinXPor Mandrake 9.2

          :-) Oh yeah.

          I'm sorry.

          Gerhard Ha"ring wrote:
          [color=blue]
          > Gandalf wrote:
          >[color=green]
          >> Use PySerial
          >>
          >> http://pyserial.sourceforge.net/[/color]
          >
          >
          > I'd recommend PyParallel instead:
          >
          > http://pyserial.sourceforge.net/pyparallel.html
          >
          > ;)[/color]




          Comment

          • Chris Liechti

            #6
            Re: Writing to the parallel port (Mem 0x378) when runnning WinXP or Mandrake 9.2

            Gandalf <gandalf@geoche msource.com> wrote in
            news:mailman.10 0.1070529056.16 879.python-list@python.org :
            [color=blue]
            > Use PySerial
            >
            > http://pyserial.sourceforge.net/[/color]

            thanks for recomending it :-) as a little clarification:
            the link to pyparallel is here:


            (its only a small note on the mainpage)

            currently i have only py2.2 versions available for download, but i can
            easily build the 2.3 version upon request, or you can build it on your own
            with mingw32 or cygwin installed: python setup.py build --compiler=mingw3 2
            install

            you will need giveio.sys, also available in the downloads section, that
            allows programs to access the io ports on Win NT/2k/XP

            chris
            [color=blue]
            > Laci
            >
            > Todd Gardner wrote:
            >[color=green]
            >>---------------------------------------------------------------
            >>I would appreciate any ideas how to write to the parallel port (Mem
            >>0x378) when runnning WinXP or Mandrake 9.2.
            >>
            >>In C and LabVIEW I use the OutP command to write to directly to a
            >>memory address.
            >>
            >>Thank you
            >>--
            >>Todd
            >>piir@earthlin k.net
            >>---------------------------------------------------------------[/color][/color]

            --
            Chris <cliechti@gmx.n et>

            Comment

            • Peter Hansen

              #7
              Re: Writing to the parallel port (Mem 0x378) when runnning WinXP orMandrake 9.2

              Dennis Lee Bieber wrote:[color=blue]
              >
              > W98 system. It works, but I've not been able to track down and prevent
              > some OS preemption problem that occurs between 200 and 250 milliseconds
              > into a stream of output data. This is with the process upped to
              > REALTIME class, and the port "driver" thread upped to TIME_CRITICAL (a
              > combination that should have the thread running at priority 31!)[/color]

              Win98 is not a realtime OS, and it's unlikely you'll ever be able
              to fix this sort of thing completely. There are no guarantees whatsoever
              that your code, even at so-called "REALTIME" level, will have any particular
              latency.

              If you really need that kind of critical timing, you should use
              another OS.

              -Peter

              Comment

              • Dennis Lee Bieber

                #8
                Re: Writing to the parallel port (Mem 0x378) when runnning WinXP or Mandrake 9.2

                Peter Hansen fed this fish to the penguins on Saturday 06 December 2003
                05:49 am:

                [color=blue]
                > If you really need that kind of critical timing, you should use
                > another OS.
                >[/color]
                Unfortunately the use of that antique (P-II, ~250MHz) laptop is
                mandated -- government furnished equipment.

                My current work-around is to use the high-performance counters at the
                start to determine the clock rate I'm seeing, then compute how many
                "segments" of data I can send in <200msec (since I've never seen the
                problem appear earlier than that). I then pop up an annoying message
                box that the user must "continue/cancel" between every /n/ segments
                (one of the three lines is an IDLE indicator, and the port will hold
                that through the interim). My current hopes are that the user
                interaction will "reset" whatever in the OS sucked up the time.

                --[color=blue]
                > =============== =============== =============== =============== == <
                > wlfraed@ix.netc om.com | Wulfraed Dennis Lee Bieber KD6MOG <
                > wulfraed@dm.net | Bestiaria Support Staff <
                > =============== =============== =============== =============== == <
                > Bestiaria Home Page: http://www.beastie.dm.net/ <
                > Home Page: http://www.dm.net/~wulfraed/ <[/color]

                Comment

                • Todd Gardner

                  #9
                  Re: Writing to the parallel port (Mem 0x378) when runnning WinXP or Mandrake 9.2

                  Chris Liechti <cliechti@gmx.n et> wrote in message news:<Xns94481C C1B3CFcliechtig mxnet@62.2.16.4 >...[color=blue]
                  > Gandalf <gandalf@geoche msource.com> wrote in
                  > news:mailman.10 0.1070529056.16 879.python-list@python.org :
                  >[color=green]
                  > > Use PySerial
                  > >
                  > > http://pyserial.sourceforge.net/[/color]
                  >
                  > thanks for recomending it :-) as a little clarification:
                  > the link to pyparallel is here:
                  > http://pyserial.sourceforge.net/pyparallel.html
                  >
                  > (its only a small note on the mainpage)
                  >
                  > currently i have only py2.2 versions available for download, but i can
                  > easily build the 2.3 version upon request, or you can build it on your own
                  > with mingw32 or cygwin installed: python setup.py build --compiler=mingw3 2
                  > install
                  >
                  > you will need giveio.sys, also available in the downloads section, that
                  > allows programs to access the io ports on Win NT/2k/XP
                  >
                  > chris
                  >[/color]
                  I think all I have to do is figure out how to use the outp(...)
                  command. Pardon my ignorance here but how do I figure out the syntax
                  of this command?

                  This is my first project in python and it seems a bit daunting. I am
                  trying to communicate to a custom device via the parallel port. At
                  this point I only want to write data to the data port. In my case the
                  memory address is x378.

                  I installed: Python 2.2, giveio_setup.ex e and
                  pyparallel-0.1.win32-py2.2.exe. I was running Python2.3 but I don't
                  think that it will matter for this newbie project.

                  Many thanks for all of your pointers!

                  Todd[color=blue]
                  >[color=green]
                  > > Laci
                  > >
                  > > Todd Gardner wrote:
                  > >[color=darkred]
                  > >>---------------------------------------------------------------
                  > >>I would appreciate any ideas how to write to the parallel port (Mem
                  > >>0x378) when runnning WinXP or Mandrake 9.2.
                  > >>
                  > >>In C and LabVIEW I use the OutP command to write to directly to a
                  > >>memory address.
                  > >>
                  > >>Thank you
                  > >>--
                  > >>Todd
                  > >>piir@earthlin k.net
                  > >>---------------------------------------------------------------[/color][/color][/color]

                  Comment

                  • Todd Gardner

                    #10
                    Re: Writing to the parallel port (Mem 0x378) when runnning WinXP or Mandrake 9.2

                    Chris Liechti <cliechti@gmx.n et> wrote in message news:<Xns94481C C1B3CFcliechtig mxnet@62.2.16.4 >...[color=blue]
                    > Gandalf <gandalf@geoche msource.com> wrote in
                    > news:mailman.10 0.1070529056.16 879.python-list@python.org :
                    >[color=green]
                    > > Use PySerial
                    > >
                    > > http://pyserial.sourceforge.net/[/color]
                    >
                    > thanks for recomending it :-) as a little clarification:
                    > the link to pyparallel is here:
                    > http://pyserial.sourceforge.net/pyparallel.html
                    >
                    > (its only a small note on the mainpage)
                    >
                    > currently i have only py2.2 versions available for download, but i can
                    > easily build the 2.3 version upon request,[/color]

                    I would like to request that you build a 2.3 version.
                    [color=blue]
                    > or you can build it on your own with mingw32 or cygwin installed: python
                    > setup.py build --compiler=mingw3 2
                    > install[/color]

                    I am quite the newbie so I would not even attempt to build it on my
                    own yet, soon maybe but...[color=blue]
                    >
                    > you will need giveio.sys, also available in the downloads section, that
                    > allows programs to access the io ports on Win NT/2k/XP
                    >
                    > chris[/color]

                    Thanks,

                    Todd

                    Comment

                    • Todd Gardner

                      #11
                      Re: Writing to the parallel port (Mem 0x378) when runnning WinXP or Mandrake 9.2

                      IT WORKS with version 2.2. ! Thank you Chris! I am not sure how I
                      can use version 2.3.

                      The code that I need to try it out was this... And I found it of all
                      places, in the docs... go figure :)
                      *************** *************** ********
                      import parallel
                      p = parallel.Parall el() #open LPT1
                      p.setData(0x55)
                      *************** *************** ********

                      Thank you,

                      Todd

                      Comment

                      • Chris Liechti

                        #12
                        Re: Writing to the parallel port (Mem 0x378) when runnning WinXP or Mandrake 9.2

                        piir@earthlink. net (Todd Gardner) wrote in
                        news:9b849915.0 312080136.867ba bc@posting.goog le.com:[color=blue]
                        > Chris Liechti <cliechti@gmx.n et> wrote in message
                        > news:<Xns94481C C1B3CFcliechtig mxnet@62.2.16.4 >...[/color]
                        [pyparallel][color=blue][color=green]
                        >> currently i have only py2.2 versions available for download, but i
                        >> can easily build the 2.3 version upon request,[/color]
                        >
                        > I would like to request that you build a 2.3 version.[/color]

                        at your wish (one line):

                        361

                        (thats the download section of pyserial.sf.net )

                        chris
                        --
                        Chris <cliechti@gmx.n et>

                        Comment

                        Working...