Signal Monitoring

"Jonathan Sharret" <j.sharret-vt2K7lilQm9Wk0Htik3J/[email protected]>
Newsgroups gmane.comp.hardware.microcontrollers.tini
Message-ID <[email protected]>
Hi,

I'm using TINIs400 rev B socket board with the TINIm400 verification
module with TINIOS 1.12.  I am writing code that will allow the TINI to
serve as an SNMP agent.  The TINI will be connected to 3 devices which
each have 4 status signals to be read and 4 control signals to be
written.  Writing and checking the control signals is not an issue since
it is done "slowly" by user input.  My question is how can I monitor the
12 different status signals without overloading the TINI?

Right now I'm creating a demo unit which will simulate monitoring and
controlling just 1 device.  I've made a separate board which has 4 LEDs
(to simulate the 4 control signals) and 4 switches (to simulate the 4
status signals).  This board is connected to the TINI's RS-232
driver/receiver chip (U7 MAX560CAI) through both serial ports (NOTE: I
am NOT using the serial port, just the RS-232 chip).  The TINI will thus
read/write port pins P.14, P1.5, P1.6, P3.0, P3.1 and P3.3.  Three of
these signals are on driver pins and 3 are on receiver pins.  In each
set of three, 2 signals will be used to address the 4 switches/LEDs and
1 signal will be used as a status bit.  To issue a control signal (turn
on/off a LED) the TINI sets the address lines for that LED and changes
the status bit to turn the LED on or off.  When a switch is thrown, the
board I've developed changes the address lines to that switch and
changes the status bit to the current position of the switch.  My
question is how can I detect a change in these 3 status signals
efficiently?

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?

Thanks in advance,
Jonathan Sharret

TELEGRID Technologies, Inc.

_______________________________________________
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.