Re: printer port

In reply to my old question:

I'm told that the printer port of a PC clone is popular for interfacing > experiments. I have a cheap laptop I'd like to use for this purpose. > I don't know beans about the printer port, neither its pinout nor > how to read from it or write to it (this would be under Linux).

Tomi Holger Engdahl write:

For the output side I have writen a document on that to >
formatting link
>There are examples/information for DOS, Windows and Linux.

I was just now following up on this and looked at the website. At the beginning is a warning that the parallel port is easily damaged and that might make it necessary to replace the mother board. Accordingly, the message recommends that one consider getting a second io card with its own parallel port.

I'm not sure, but I think the website is written under the assumption that the reader did not take this advice. If I'm right about that, what I would like to know is how the information at the site needs to be modified to use a second parallel port on an extra io card. Under Linux, one has to be able to explain the second io card, etc., to the operating system, and I haven't so far learned how to explain to myself how to explain things to the operating system. I'm slowly reading Linux Device Drivers but I'm still far from understanding anything.

--
Ignorantly,
Allan Adler 
* Disclaimer: I am a guest and *not* a member of the MIT CSAIL. My actions and
* comments do not reflect in any way on MIT. Also, I am nowhere near Boston.
Reply to
Allan Adler
Loading thread data ...

Hmm, the original message isn't on my server, so I'll reply here.

Yes, it is a very useful interface. I've used it many times. Even remotely modern parallel ports can easily go beyond 8MB/s (ie 1MHz clock rate), without using any of the fancy ECP or EPP modes.

This is a very good website. I learned all my interfacing stuff from it:

formatting link

It depends on what you want to do. Raw bit twiddling is the same as under any OS, you use the out, inb instructions. There are C library wrappers for these. You need the program to be run as root, though, or you'll need to write an suid wrapper to gain access to those instructions. Be warned about bit-twiddling: Linux is not a real-time OS, (though there are extensions for that and aparently 2.6 makes life a lot better), so if you need precise timings, you will have to be a bit careful. For non raw bit twiddling, I've no idea, sorry.

Most these days seem pretty well protected for shorts to 0 or 5 volts (from experience :-). But I wouldn't reccoment relying on this. Yiu can always rig up a simple cable with 5K resistors on every wire to protect yourself.

If the parallel port obeys the same interface as a standard one (they often do), you can do the same inb/outb twiddling from a userspace program, just at a different port number instead.

-Ed

--
(You can't go wrong with psycho-rats.)       (er258)(@)(eng.cam)(.ac.uk)

/d{def}def/f{/Times findfont s scalefont setfont}d/s{10}d/r{roll}d f 5/m
{moveto}d -1 r 230 350 m 0 1 179{1 index show 88 rotate 4 mul 0 rmoveto}
for /s 15 d f pop 240 420 m 0 1 3 { 4 2 1 r sub -1 r show } for showpage
Reply to
E. Rosten

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.