Re: [uCsimm] pulse detect

From: Tom Walsh (tom@openhardware.net)
Date: Fri Nov 03 2000 - 06:22:57 EST


James Wilson wrote:
>
> I want to detect a 0.5micro second pulse (STROBE) on
> the ucsimm?s PD0 port and, when this occurs, set a pin
> low (BUSY), then read 8 data pins on another port .
> At first I thought I could loop and wait for the pulse
> but the latency for the small bit of code I wrote was
> around 80microsecons way tooooo long for my
> application. Could anyone suggest a better way to
> do this? I have the following ideas but I'm not
> sure which one would be the easiest to implement.
>
> 1. Use a machine language subroutine to monitor the
> port
> 2. Use interrupt INT0 .
> 3. Use interrupt INT0 as in (2) but mask the interrupt
> and loop checking the interrupt pending register for
> any change.
> This message resent by the ucsimm@uclinux.com list server http://www.uClinux.com/

Write an interrupt handler & tie it into the system interrupt table.
Forget about looping and waiting for the event to happen, go thru the
trouble to learn how to make an interrupt work under linux.

TomW

-- 
Tom Walsh - WN3L - Embedded Systems Consultant
'www.openhardware.net', 'www.cyberiansoftware.com'
"Windows? No thanks, I have work to do..."
This message resent by the ucsimm@uclinux.com list server http://www.uClinux.com/



This archive was generated by hypermail 2b30 : Sun Apr 07 2002 - 00:01:38 EST