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

Transistor Pin Identifier
IR Remote Control Transmitter ATtiny28
Logic probe
High-voltage-ac-switcher
Temperature-controuer
Mobile Bug Detector
theremin as a capacitive sensing device
Mcu Reset And Oscillator Circuits Applicationnote
211 SET amp built
Spark Transmitter Circuit
Speed-limit Alert
Two-phase stepper motor drive system circuit
Musical doorbell circuit with two trigger modes
Low-noise amplifier



Top