Newsgroups: comp.robotics
Path: cantaloupe.srv.cs.cmu.edu!das-news.harvard.edu!news2.near.net!MathWorks.Com!europa.eng.gtefsd.com!howland.reston.ans.net!vixen.cso.uiuc.edu!newsfeed.ksu.ksu.edu!moe.ksu.ksu.edu!osuunx.ucc.okstate.edu!master.ceat.okstate.edu!gcouger
From: gcouger@master.ceat.okstate.edu (COUGER GORDON)
Subject: Re: Parallel Port Transfer Speed?
Message-ID: <CvMDps.F0w@osuunx.ucc.okstate.edu>
Sender: news@osuunx.ucc.okstate.edu (USENET News System)
Nntp-Posting-Host: master.ceat.okstate.edu
Organization: CEAT at Oklahoma State University, Stillwater
References: <3490v9$ob6@news.doit.wisc.edu>
Distribution: na
Date: Sun, 4 Sep 1994 19:20:15 GMT
Lines: 27

In article <3490v9$ob6@news.doit.wisc.edu>,
Jim Vannes <jvannes@vms.macc.wisc.edu> wrote:
>I am interested in using the parallel port for digital input, and 
>have been trying to maximize the transfer rate.  I have an old 
>discrete logic Serial/Parallel card in a DX2/66 PC with an 8.25 
>MHz. AT bus clock.  Using QuickC with full optimizations and 286 
>language extensions on, this code loads the array at about 400 
>KHz.
>
>	int x;
>	int sweep[640];
>
>	for ( x = 0; x < 640 ; x++ )
>		sweep[x] = inp( 0x379 );
>
   char buffer[BUFFER_SIZE]
   int i = BUFFER_SIZE;
   int printer_address = 0x379;
   while(i--)
     sweep[i]= inp(printer_address);
 
  This is faster on some compilers you would need to test several methods. But
  in most cases while(i--) wills save one machine cycle over a compairson. 
 Pointers may or may not be faster.

Good luck 
Gordon
