Re: Signal Monitoring

Bryan Armstrong <bryan.armstrong-6tN4nzCoH/[email protected]>
Newsgroups gmane.comp.hardware.microcontrollers.tini
Message-ID <[email protected]>
Jonathan Sharret wrote:
> My initial idea was to have a separate thread simply poll these signals
> every XXX milliseconds.  This might work for this demo, but when I scale
> this up to monitoring several devices at once I think it would fail.
> Also, I worry that the CPU would be overloaded with the constant
> checking.  I don't need that great time resolution, checking every 500
> milliseconds would probably be enough.  What I'd like to know is what is
> the proper way to do event handling, event listening and event firing.
> I find it hard to believe that my PC's CPU polls my mouse or keyboard
> constantly to determine whether I'm moving the mouse or typing.  Or when
> I issue a read() on the Ethernet port and it blocks until a packet is
> available, how does it wake up?  Is the Ethernet port polled constantly?
> Is this what an external interrupt is?  If so, how do I use this on the
> TINI?

Everything on TINI is interrupt driven.  Most things on your PC are 
interrupt driven.  You could OR the input signals together and hook the 
output of that gate to an interrupt on the 400 CPU.  Then, your program 
code could check the state of these signals when it receives the interrupt.

-- 
--
Bryan Armstrong
bryan.armstrong-6tN4nzCoH/[email protected]


_______________________________________________
TINI mailing list
TINI-6tN4nzCoH/[email protected]
To UNSUBSCRIBE, edit your profile, or see list archives:
http://lists.dalsemi.com/mailman/listinfo/tini
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.