Well, actually the 3 chip design I proposed you it's very simple, much simpler and easy to understand IMO.
Let's reason a bit on what you're trying to accomplish: I think you want to have something like 10 latched relays that should be active only one at a time and it should keep the state until a new one is selected. Also, you probably want to eject invalid combinations, like two or more switches being pressed simultaneously.
OK, not let's look at my proposal and split it in parts:
- The input block, 10 inputs to BCD, based on the CD40147 (datasheet here:
http://www.ti.com/lit/ds/symlink/cd40147b.pdf, 50c at mouser
https://www.mouser.de/Semiconductors/Logic-ICs/Encoders-Decoders-Multiplexers-Demultiplexers/_/N-4s67o?P=1z0z44d&Keyword=CD40147B&FS=True), this chip has, well, 9 inputs (0 is default on if none of the others are pressed), it only needs the pull-ups at the inputs and it produces nicely 4 BCD outputs, all nice and dandy but if you lift your finger from the button, the value is gone
, so we have to store it. This brings us to the...
- Storage block and hey, let's make it simpler and use a latching decoder, MC14514, (
https://www.onsemi.com/pub/Collateral/MC14514B-D.PDF, 1,32EUR amouser
https://www.mouser.de/ProductDetail/ON-Semiconductor/MC14514BDWR2G) this guy will store AND decode the whole 16 bits, it just needs to be toled when his inputs are stable to memorize them, ain't that cool
?
So we have to connect the outputs of the first one with the inputs of the second one and we are (almost) done. What is left is to look on the 4 bits and detect a state change and generate a load pulse for the MC14514B, this can be simply done, but if I'll tell you this as well, it will take all the fun from the experimentation
.
For the decoupling capacitors, solder in parallel a 10uF elco and 0.1 to 0.047uF ceramic close to the pins of each chip, this should be enough protection if the power supply is not absolute crap or the interference doesn't come via inputs (remember to lower a bit the pull-up values).
Cheers,
DC1MC