Controlling the PC Parallel Port


Posted on Jun 2, 2012

This source code module provides the low-level control of the port, implementing code to control 12 outputs and read 5 inputs. This code was written for Borland C/C++ v3.1, but you should be able to adapt it for other compilers. You can view the source code online, or download an archive (prn_io.zip) that contains PRN_IO.C and PRN_IO.H. To use the module in your program, simply #include PRN_IO.H from wherever you need to call the functions, and compile and link PRN_IO.C into your program.



The code is written to use LPT1 at 0x0378; change it if you need to The code doesn't attempt to use interrupts The parallel port is also capable of enhanced modes (see the links below), but this code doesn't attempt to use them This code assumes that the port is configured as a "standard" or "normal" port; configuring the port for EPP or ECP modes may or may not work




Leave Comment

characters left:

New Circuits

.

 


Popular Circuits

Touch Switch Circuit with explnation
high current mosfet toggle switch
mp3 mode circuit wtv020sd 16p tutoria
LM1830 low level detector schematic circuit design
Xbee doorbell project
Phantom and T powering for condenser microphones
20W bus circuit radio and megaphone
OCL AC negative feedback amplifier analysis



Top