Path: utzoo!attcan!uunet!lll-winken!ames!xanth!hoptoad!cas From: cas@hoptoad.uucp (Curtis Spangler) Newsgroups: comp.sys.ibm.pc Subject: Re: Using the printer port for input Summary: Perhaps it can be used Message-ID: <6316@hoptoad.uucp> Date: 15 Jan 89 15:05:47 GMT References: <704@krafla.rhi.hi.is> <816@Hrde.UUCP> Reply-To: cas@hoptoad.UUCP (Curtis Spangler) Organization: Nebula Consultants in San Francisco Lines: 30 > In article <704@krafla.rhi.hi.is>, frisk@rhi.hi.is (Fridrik Skulason) writes: >> In article <816@ttrde.UUCP>, pfales@ttrde.UUCP (Peter Fales) writes: > [ text elided ] > My question is: Does anyone have a code fragment (in C, assembler or > whatever) for changing the port into an input port? >> Sorry, the standard PC parallel port hardware is not capable of being >> used as an input port no matter how clever your code is. >> [ text elided ] Reference: The C Users Journal, Dec./Jan. 1989, Volume 7, Number 1 Address: 2120 W. 25th Street Suite B, Lawrence, KS 66046-9972 Telephone: (913) 841-1631 Article: High Speed, Real Time Data Acquisition In C By: J.F. Vibert & B. Cointot, page 39 Quoted without permission from page 48 of the above article: " Unfortunately, it appears from the available manuals that the printer parallel interface is limited to solely output data. When we checked the ROM BIOS listing in the IBM PC/XT Technical Reference Manual we found that the PPI chip which controls this port "can be read as well as written." This led us to think that it was possible to use it as input, too. This proved to be true when we tested it (see Listing 8). " "Listing 8" is a fragment in C titled sic "Function to demonstrate acquisition with the parallele printer interface." -- Curtis Spangler {sun,pacbell,uunet,pyramid,amdahl}!hoptoad!cas cas@toad.com