One other problem using the Phidgets USB interface is that it simply doesn’t not have enough outputs to control all the devices I want to control. We could simply use a second USB interface, but in the interest of minimizing cost I’m trying a different method. Instead I will use the following circuit to control 8 devices using only 4 outputs of the USB interface. It is a relatively simple circuit that can be built with 6 off the shelf 7400 series TTL ICs. It also could easily be expanded so that 5 USB interface outputs control 16 separate devices. (and theoretically up to 128 devices using all 8 outputs of the USB interface) The D-type flip flops are positive edge devices.
One Input to this circuit determines what state the selected output should be in, and the 3 selector inputs determine which of the outputs should be set. In operation the state should be selected first, then the selector inputs should be sent. One significant outstanding issue is if the outputs from the USB interface change simultaneously or not. If they do not then the circuit may inadvertantly change the state of other outputs on the way to changing the desired out. If this turns out to be the case then an input latch and delay will be required to ensure the inputs arrive at the same time. I won’t be able to determine which case is true until I can breadboard and test the circuit.
Another inherent limitation of this circuit is that the 8 outputs can only be changed one at a time and could effect timeing. In most cases this isn’t a problem, but for the solenoids and other devices that need to be more responsive I’ll use one of the remaining 4 outputs of the USB interface.
I should note, that after working out the above, I ran into the specs for the 74LS259 8-bit addressable latch and it appears that it could replace the entire circuit above. It may however suffer from the same problem as the above cicuit and may require the inputs be latched and timed so the output is as expected.