device for converting binary strings into states for switches

May 16, 2006 2 Replies

Hi,



I need to buid a device connected to a computer. The computer will generate binary strings (each position will be either 0 or 1) of length N. Based on this string my device has to set the state (on/off) of N switches.



Example:



The computer generates the string 00110. I also have 5 switches which must be set by my device as follows: first



2 switches and the last switch must be turned OFF and the 3rd and the
4th must be turned ON.

I have a hard constrain for this problem: the operation described above must be performed in O(1) steps. This means that it should be INDEPENDENT of the value of N. All switches must be set in the same moment.



I DONT want to check the value of each position and to set the state of the corresponding switch accordingly. This will means O(N) steps and I want only O(1) steps.



How can I make such device? I should use some properties of the computer ports, but I dont know how.



Even some small values for N (16 or 32) are of interest for me.



Thanks. Laura



Is this a homework assignment or a real device you need to build?

[sounds like serial to parallel conversion]

With an allowable skew of how many picoseconds?

If N was 8 you could easily use a parallel port or RS-232 device, for larger numbers you are going to need to set some latches and transfer the output data on a common strobe.

I have device that is connected to serial port or USB port. See my page :

formatting link
If you need more information send me mail.

Fero

formatting link

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required