Forum Home
Press F1
 
Thread ID: 61034 2005-08-22 11:31:00 enhanced parallel port interfacing amad (8764) Press F1
Post ID Timestamp Content User
383059 2005-08-22 11:31:00 hello:
does any body know how to interface the enhanced parallel port. if so then kindly let me know how to write to the port and similarly how to read.
also tell wht will be the problems i will be facing.
thanks.
amad (8764)
383060 2005-08-22 11:33:00 from dos its easy, under XP/2000 you dont have direct hardware access and so you will have to write a driver. robsonde (120)
383061 2005-08-23 03:39:00 It's a doddle. As long as you don't use later Windows versions. I beleive there's a thing provided called GIVEIO.SYS which can be installed (with Administrator privilege) to allow access to the IO port. I haven't used this; I discovered it today, with Google ("giveio.sys xp"). For people using VB, I think I've seen references to programmes for W2k (and probably XP, too) which allow access to the serial ports. They might work for the parallel port too. Some issues of the EPE magazine in the last few years have had articles about this.

With DOS, and early Windows versions no problems. Turbo Pascal makes it easy:
program parport;
var inp, ii : byte;
begin
for ii := 0 to 6 do { will read and print out the register contents }
begin
inp := Port[$378+ii];
write(ii, ' ', inp);
end;
writeln;
Port[$378] := 24; { will write 24 to the data register }
end.Tp has the IO ports as a predeclared array. (I'm not sure how this works with the "new" longnumbered ports. But it works great with the traditional ports). Assembly code is not much harder.

Linux, being a real OS has restricted access to IO ports. There is a C function which when called as root will allow a user programme access. I've used it, but I don't like C, so have forgotten what its called.

"parallel port tutorial site:edu" to Google will find you some good links : the one headed "Interfacing the IBM PC Parallel Port..." looks to have most of what you need.

The same, changed to "site:ac.uk" might get some more good ones ... I'm pretty sure I've seen some such things on UK university sites too.

Just be aware that some laptops don't have full swing "5V". The pins can only source a few mA ... I've used things like the TLC548 A-D converter powered (through diodes) from a couple of the data pins.

It's safest to use an old computer with an ISA bus, with a printer port on a plugin board which is built with TTL chips (look for 74xx374 etc) . They are rugged. It is possible to zap the centipede IO packages mounted on motherboards. But care is always repaid. ;)

Remember to connect a wire to one of the earth pins. ;)
Graham L (2)
1