469,360 Members | 1,608 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,360 developers. It's quick & easy.

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?.
Jul 17 '05 #1
4 6617
David Wigg <dn****@blueyonder.co.uk> schreef in berichtnieuws
0U*****************@news-binary.blueyonder.co.uk...

Hello David,
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?.


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

Jul 17 '05 #2

"David Wigg" <dn****@blueyonder.co.uk> wrote in message
news:0U*****************@news-binary.blueyonder.co.uk...
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?.


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
http://et.nmsu.edu/~etti/fall96/comp...r/printer.html
Jul 17 '05 #3

"Raoul Watson" <Wa*****@IntelligenCIA.com> wrote in message
news:ED****************@nwrdny03.gnilink.net...

"David Wigg" <dn****@blueyonder.co.uk> wrote in message
news:0U*****************@news-binary.blueyonder.co.uk...
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?.


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
http://et.nmsu.edu/~etti/fall96/comp...r/printer.html

This looks like a good place with lots of useful stuff. Thanks for the tip!
Jul 17 '05 #4

"R.Wieser" <rw***************@xs4all.nl> wrote in message
news:3f***********************@dreader3.news.xs4al l.nl...
David Wigg <dn****@blueyonder.co.uk> schreef in berichtnieuws
0U*****************@news-binary.blueyonder.co.uk...

Hello David,
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?.


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

Looks a useful resource, though I haven't found what I wanted here. Thanks
Jul 17 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

6 posts views Thread by Novice Experl | last post: by
11 posts views Thread by karan | last post: by
12 posts views Thread by david.brown.0 | last post: by
3 posts views Thread by nik | last post: by
23 posts views Thread by Marco | last post: by
6 posts views Thread by cnb | last post: by
reply views Thread by suresh191 | last post: by
1 post views Thread by Marylou17 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.