|
|
The Home of Electronic Engineering and Embedded Systems Programming |
MicrocontrollersProjects & TutorialsSoftwareHardwareOther Resources |
Controlling the PC Parallel PortThe standard PC printer port is handy for testing and controlling devices. It provides an easy way to implement a small amount of digital I/O. I like to use to during initial development of a product -- before the "real" hardware is ready, I can dummy up a circuit using the printer port, and thus get started testing my software.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 following tables list the details of how the software interfaces to hardware port. Refer to the source code itself for more information, or check out one of the links at the end of this page.
Source Code Implementation Notes:
Other Parallel Port InformationParallel Port Books:
|
Product Search |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Home
T H E E E C O M P E N D I U M
|