Programming parallel port registers

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • David Wigg

    Programming parallel port registers

    I am trying to use a dll to control a parallel port. The instructions tell
    me what to do to output data to the data lines and how to read them by
    making the port bidirectional via the control register commands. However, I
    want to know what bits of the control register do what so that I can toggle
    the strobe for example.
    Can anyone point me to the right place to find out please?.


  • R.Wieser

    #2
    Re: Programming parallel port registers

    David Wigg <dnwigg@blueyon der.co.uk> schreef in berichtnieuws
    0UvSa.5486$Df6. 5139@news-binary.blueyond er.co.uk...

    Hello David,
    [color=blue]
    > I am trying to use a dll to control a parallel port. The instructions tell
    > me what to do to output data to the data lines and how to read them by
    > making the port bidirectional via the control register commands. However,[/color]
    I[color=blue]
    > want to know what bits of the control register do what so that I can[/color]
    toggle[color=blue]
    > the strobe for example.
    > Can anyone point me to the right place to find out please?.[/color]

    I'm not sure it's the "right" place, but you could take a peek at :


    Regards,
    Rudy Wieser



    Comment

    • Raoul Watson

      #3
      Re: Programming parallel port registers


      "David Wigg" <dnwigg@blueyon der.co.uk> wrote in message
      news:0UvSa.5486 $Df6.5139@news-binary.blueyond er.co.uk...[color=blue]
      > I am trying to use a dll to control a parallel port. The instructions tell
      > me what to do to output data to the data lines and how to read them by
      > making the port bidirectional via the control register commands. However,[/color]
      I[color=blue]
      > want to know what bits of the control register do what so that I can[/color]
      toggle[color=blue]
      > the strobe for example.
      > Can anyone point me to the right place to find out please?.
      >[/color]

      The strobe (pin 1) doesn't do anything but serves as a flag. When there is
      no data the signal is high and brought low when data is present.

      This inverted logic is true for pin 1, 11, 14, and 17. A high is zero and a
      low is 1.

      If you're writing a device driver for let's say an external disk drive or
      something like that, just keep a couple of things in mind.

      Don't hard code base addresses, inquire addresses H408, H40A, H40C at
      segment 0.
      Remember that they're stored lobyte first than high byte.

      The Registers can be found by adding to the offset of the base address.

      For example, if LPT1 is at H3BC, the data is at H3BC, the status is at 3BD
      and control is at 3BE.

      You can find a good refrence at



      Comment

      • David Wigg

        #4
        Re: Programming parallel port registers


        "Raoul Watson" <WatsonR@Intell igenCIA.com> wrote in message
        news:EDySa.6304 $634.591@nwrdny 03.gnilink.net. ..[color=blue]
        >
        > "David Wigg" <dnwigg@blueyon der.co.uk> wrote in message
        > news:0UvSa.5486 $Df6.5139@news-binary.blueyond er.co.uk...[color=green]
        > > I am trying to use a dll to control a parallel port. The instructions[/color][/color]
        tell[color=blue][color=green]
        > > me what to do to output data to the data lines and how to read them by
        > > making the port bidirectional via the control register commands.[/color][/color]
        However,[color=blue]
        > I[color=green]
        > > want to know what bits of the control register do what so that I can[/color]
        > toggle[color=green]
        > > the strobe for example.
        > > Can anyone point me to the right place to find out please?.
        > >[/color]
        >
        > The strobe (pin 1) doesn't do anything but serves as a flag. When there is
        > no data the signal is high and brought low when data is present.
        >
        > This inverted logic is true for pin 1, 11, 14, and 17. A high is zero and[/color]
        a[color=blue]
        > low is 1.
        >
        > If you're writing a device driver for let's say an external disk drive or
        > something like that, just keep a couple of things in mind.
        >
        > Don't hard code base addresses, inquire addresses H408, H40A, H40C at
        > segment 0.
        > Remember that they're stored lobyte first than high byte.
        >
        > The Registers can be found by adding to the offset of the base address.
        >
        > For example, if LPT1 is at H3BC, the data is at H3BC, the status is at 3BD
        > and control is at 3BE.
        >
        > You can find a good refrence at
        > http://et.nmsu.edu/~etti/fall96/comp...r/printer.html
        >
        >[/color]
        This looks like a good place with lots of useful stuff. Thanks for the tip!


        Comment

        • David Wigg

          #5
          Re: Programming parallel port registers


          "R.Wieser" <rwieser-killthis-@xs4all.nl> wrote in message
          news:3f1a98da$0 $61662$e4fe514c @dreader3.news. xs4all.nl...[color=blue]
          > David Wigg <dnwigg@blueyon der.co.uk> schreef in berichtnieuws
          > 0UvSa.5486$Df6. 5139@news-binary.blueyond er.co.uk...
          >
          > Hello David,
          >[color=green]
          > > I am trying to use a dll to control a parallel port. The instructions[/color][/color]
          tell[color=blue][color=green]
          > > me what to do to output data to the data lines and how to read them by
          > > making the port bidirectional via the control register commands.[/color][/color]
          However,[color=blue]
          > I[color=green]
          > > want to know what bits of the control register do what so that I can[/color]
          > toggle[color=green]
          > > the strobe for example.
          > > Can anyone point me to the right place to find out please?.[/color]
          >
          > I'm not sure it's the "right" place, but you could take a peek at :
          > http://www.lvr.com/parport.htm
          >
          > Regards,
          > Rudy Wieser
          >
          >
          >[/color]
          Looks a useful resource, though I haven't found what I wanted here. Thanks


          Comment

          Working...