XPost: rec.crafts.metalworking, alt.comp.os.windows-xp   
   From: muratlanne@gmail.com   
      
   "Lloyd E. Sponenburgh" wrote in message   
   news:XnsA0835AC0F11B2lloydspmindspringcom@216.168.3.70...   
   >   
   >>> My interest is a laptop-based data acquisition system which   
   >>> requires   
   >>> low-level I/O hardware drivers I can only run from DOS, since   
   >>> Windows   
   >>> interferes by polling them and has too much overhead for accurate   
   >>> timing.   
   >   
   > I have a Windows-based data acquisition system that will do   
   > 14.1KS/s, at   
   > ten bits per sample. It's dead-to-nuts accurate.   
   >   
   > The simple reality is that even older DOS-based systems had some   
   > interrupt-service timing jitter visible even in tight hardware   
   > polling   
   > loops.   
   >   
   > The secret to doing accurate DAQ, even with dedicated hardware doing   
   > the   
   > computing, is to do some local buffering of the samples in the DAQ   
   > hardware, so that retrieving them doesn't have to be in "real time",   
   > so   
   > long as the computer can retrieve them faster than the sampling   
   > rate.   
   >   
   > LLoyd   
      
   The parallel port registers are hardware-limited to ~ 1uS cycle time,   
   regardless of CPU or memory bus speed. I had no problem running them   
   at 300 - 500 KB/S, the limit of our external device, by compiling   
   instead of interpreting the code. I dodged the clock interrupt by   
   waiting for system time to change before running a burst of   
   operations, which ended before the next tick about 55ms later. In DOS7   
   (Win98) that was the only cause of jitter.   
      
   I calibrated the program's timing with a servo loop that adjusted a   
   (nested) FOR loop to run for half a second. It worked pretty well as   
   long as the CPU didn't speed-step during the program. The CPU speed it   
   reported was usually 1/2 of maximum, ie an AMD 1700+ ran at   
   ~700,000,000 instructions per second. That's still a whole lot of code   
   per microsecond. On single-speed CPUs the compiled integer FOR loop   
   took two clock cycles.   
      
   jsw   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   
|