Newsgroups: comp.robotics
Path: brunix!cat.cis.Brown.EDU!noc.near.net!paperboy.wellfleet.com!news-feed-1.peachnet.edu!news.duke.edu!MathWorks.Com!europa.eng.gtefsd.com!howland.reston.ans.net!math.ohio-state.edu!jussieu.fr!univ-lyon1.fr!swidir.switch.ch!newsfeed.ACO.net!Austria.EU.net!EU.net!uunet!hobbes!earth.armory.com!rstevew
From: rstevew@armory.com (Richard Steven Walz)
Subject: Re: C and the printer port?
Organization: The Armory
Date: Tue, 19 Jul 1994 18:24:19 GMT
Message-ID: <Ct79sL.zr@armory.com>
References: <1994Jul17.153810.18312@news.vanderbilt.edu>
Sender: news@armory.com (Usenet News)
Nntp-Posting-Host: deeptht.armory.com
Lines: 29

In article <1994Jul17.153810.18312@news.vanderbilt.edu>,
 <HEAGYWS@ctrvax.Vanderbilt.Edu> wrote:
>I am currently using QuickBasic and the OUT 888,xx command to control
>the parallel printer port of a PC.  The port is connected to a 
>stepper motor controller.  The whole setup is pretty simple...all I need
>to do is pulse one or two lines high and low to control the direction
>and stepping of the motor.  It works fairly well using QB, but I am sure
>the stepping speed is being limited by the language I am using.  I'm
>currently running the software on a 386sx, so I'm sure a faster machine
>would also improve the situation...the problem is that after the software
>is finished, it will most likely be run on 286 type machines.
>
>I was considering porting the software to C or assembly and was wondering
>if anyone is aware of the commands used to access the printer port (I
>am particularly interested in the C commands) for this type of work?
>Also, if you have any other ideas how I could increase the stepping speed,
>I would be glad to hear them.
>
>Thanks...Win
>heagyws@ctrvax.vanderbilt.edu
---------------------------------
The "portable" C has NO input/output ability, it is merely a program flow
control and math cruncher. Each C for each computer must have libraries for
I/O which contain the needed functions. Look through your compiler's
manual for same. Or hunt through the most fundamental libraries' source
code. The other alternative, which is often faster is the "asm" in-line
assembler command.
-Steve Walz

