X-Authentication-Warning: delorie.com: mailnull set sender to djgpp-bounces using -f From: kala AT sankya DOT com (Babu Kalakrishnan) Newsgroups: comp.os.msdos.djgpp Subject: Re: DPMI Interrupt latency ? Date: Mon, 28 Jan 2002 11:09:31 +0530 Lines: 38 Message-ID: References: NNTP-Posting-Host: ppp-200-1-253.bng.vsnl.net.in (203.200.1.253) X-Trace: fu-berlin.de 1012196385 38992961 203.200.1.253 (16 [76750]) X-Orig-Path: kala User-Agent: slrn/0.9.6.2 (Linux) To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com On Sat, 26 Jan 2002 18:26:48 +0000 (UTC), Tim Nicholson wrote: >If it helps, I wrote an ISR for the parallel port using just DJGPP and I >found that it worked in DOS mode up to a frequency of about 200Khz. After >with it just failed to keep up. I make that 5000 clocks per iteration. 200KHz is actually excellent. My tests showed that 5 microsecs would easily be eaten up by executing a few I/O instructions (See my response to Charles' msg.) I'm sure your ISR code would at least have 2 or 3 of these for polling/writing from/to the parallel port and servicing the Interrupt. In my application the frequency isn't all that high (1 KHz or less), but the criticality is in the latency. I have to output 1024 words of data to a custom hardware card - the first one of which has to go out within 5 microseconds of getting the interrupt. I was initially planning to use DMA for this, but since my observations showed that reprogramming the DMA controller itself takes 10+ microsecs, I'm now working on outputting the first few samples (I have to output 1 sample every 10 microsecs) using programmed IO and at the same time programming a few registers of the DMA controller each output cycle. Once the DMA controller is fully setup, I leave the rest of the transfer to DMA controller.. >In Windows, the DOS box caused a protection fault at frequencies above >100Khz, I put that down the virtual machine going t*ts up! Luckily, I don't need my app to work under Windoze :-) >Let me know if you get a really fast routine running as I need to clock in >EPP data using an ISR as fast as possible - 200 kHz is OK but if I can >better it then great! :-) Judging from my tests, 200 KHz is pretty good as such. To better this you'd have to do something about improving I/O speeds. Regards, BK