Hello Grack,

I agree in full with all Edwin's suggestions.

Best regards,

Roberto Asquini

Edwin van den Oetelaar ha scritto:
>
> fox_grack wrote:
>
> >Hello
> >
> >I try to handle an interrupt with the fox board.
> >
> >Does anybody can tellme what i have to do?
> >
> >I have an I/O Port at the FoxBoard.
> >If this Port is Low Voltage i whant to run a programm.
> >First i thought i will write a programm that listen every 10 sec. on
> >the port.
> >But is it possible to handle this with an interrupt?
> >So if the Port is low an programm will start?
> >
> >best regards
> >grack
> >
> If you want to use a REAL interrupt you can write a device driver to
> handle this.
> Not very simple, writing it, a kernelmodule I must say.
> If you have it then you read from a device and use 'select()' to block
> on input until the interrupt arrives, then you fork or exec
> the process you want.
> Very difficult.
> What I would do is write a script that loops, checks the input pin you
> need, starts the program if needed and sleeps a second.
> You will not be loading the cpu for more then about 0.1 % using this
> approach.
> This is the way I would do it if I was focussed on the result not on the
> technical fun of writing a device driver.
> check out the command setbits and readbits!
> also read http://www.acmesystems.it/?id=17 
> <http://www.acmesystems.it/?id=17>
> If your input pulses are very short you can use a JK-FlipFlop circuit
> to clock your pulse in and use another pin to reset your flipflop after
> you have read the input pin. (I did it and it worked for me)
>
> Best regards,
> Edwin van den Oetelaar
>
>  


-- 
Roberto Asquini
Acme Systems srl
[EMAIL PROTECTED]
http://www.acmesystems.it

Reply via email to