One of the challenges in the circuit design that I was worried about was obtaining the additional outputs I expect to need for the honey stick machine. The Phidgets USB controller only has 8 outputs and while I could simply add a 2nd Phidgets module, I’d really rather avoid the extra expense in the final model. I had proposed using a 4 to 8 decoder previously to add the extra outputs. The good news is that the 74259 addressable 8 bit latch works quite well and replaces the entire circuit proposed. The bad news is that the 4 outputs from the USB controller aren’t guaranteed to update at the same time. This means that random signals can be generated on the output. Not a good thing.
The solution? An edge detection circuit on all 4 inputs to generate a pulse any time the input changes, a delay timer to debounce the multiple pulses sent when the inputs change at different times and a 2nd timer to send the all clear to the 8 bit latch signaling that it’s ok to look at the input signals now that they are stable. The Phidgets controller updates the output signals approximately every 8mS, so it’s quite possible that when multiple inputs are changed that the change will occur over two consecutive updates. So if you wait and look at what signals changed over 12mS (1 1/2 update cycles), you should catch any output that occurs over two cycles. Or at least that is the theory.
It’s been about 12 years since college and since I’ve done any circuit design and I really don’t have access to the oscilloscopes , etc. needed to see really what is happening with the signals in the circuit. Though I’m happy to say that something must have stuck after 4 years of college, the circuit works flawlessly. As long as I limit the software to sending out signals every 16mS , I can selectively turn on and off each individual output using just 4 outputs from the Phidgets controller. This does have the downside that it will be slower and only one output can be addressed at a time, but many of the outputs needed are not so time sensitive so this should work well for them. Those that are time sensitive can be driven by the remaining 4 outputs of the Phidgets controller directly.