Mail Archives: djgpp/2002/01/28/00:46:40
On Sat, 26 Jan 2002 18:26:48 +0000 (UTC), Tim Nicholson <djgpp AT gizzy DOT co DOT uk> 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
- Raw text -