From: backhus on
Hi Laura,
FPGAs can do what you want, though it might be simpler do solve with a
microcontroller.

The tricky thing is to define "in the same moment" more technically.
If the switches are operated manually it is virtually impossible to have
two switches changing their state "in the same moment", even if they are
mechanically coupled. The mechanical parts have their tolerances and
that leads to some micro-nano-whatsoever seconds of difference. The
question is: How precise do you want to detect the states of the
switches and determine changes. Furthermore, even if you choose a low
time resolution the asynchronous incoming events of 2 switches may
happen around the moment of sampling the states of the switches. So you
get two events instead of the expected/desired single one.

The rest is a simple act of storing, and transmitting/displaying the
information. That's just depends on your hardware.

In general: Your requirements are too loose. Be more specific.
What means "must be simple to read" A bunch of lamps would do it,
but then: "by a human, computer, etc"
Humans and computers barely read the same things easily (e.g printout
vs. RS232). And who is etc? ET's-Companion? :-)

Anyway, wether you choose FPGAs or microcontroller to solve the problem
you have to make a decision about the way the device shall interact with
the rest of the world, and then just do it. (Which means write some code
to describe the hardware or program a processor or both )

Have a nice synthesis
Eilert


laura schrieb:
> Hi all,
>
>
> I have an array of N switches . Initially all are OFF.
>
>
> Somebody turns them ON in some order. It is possible that more
> switches are turned ON in the same moment.
>
>
> I need a device which shows me the order in which the switches were
> turned ON. For instance the device should give me: 4,3,1,5,2 (this is
> the order in which the switches were turned ON).
>
>
> The way in which the output is shown in not important. It must be
> simple to read (by a human, computer, etc).
>
>
> It is important that the device is able to handle the turned ON (in
> the same moment) of the multiple switches.
>
>
> thanks,
> Laura
>
From: jkljljklk on
On Apr 23, 1:21 am, laura <laura.brandu...(a)gmail.com> wrote:
> Hi all,
>
> I have an array of N switches . Initially all are OFF.
>
> Somebody turns them ON in some order. It is possible that more
> switches are turned ON in the same moment.
>
> I need a device which shows me the order in which the switches were
> turned ON. For instance the device should give me: 4,3,1,5,2 (this is
> the order in which the switches were turned ON).
>
> The way in which the output is shown in not important. It must be
> simple to read (by a human, computer, etc).
>
> It is important that the device is able to handle the turned ON (in
> the same moment) of the multiple switches.
>
> thanks,
> Laura

You can create a process that will be triggered by a clock. The faster
this clock is, more accurate your timing will be - ie not more then
one switch will be turned on for one clock cycle. At every clock event
all the switches are read, and if one of them is turned on, its value
is written by this process to some array that will give you the order
of the switches. Hope this help.
Dan