|
Here's an example of a 16:4 encoder. Since there is no dedicated encoder chip, and I didn't want to use logic gates (because that's been done... https://everycircuit.com/circuit/6282185603547136 ), I decided to experiment a little.
An encoder is a device that takes a sequence of input lines and "encodes" each one to a corresponding digital number. This one takes 16 lines (each button on the hex pad) and encodes each one to a digital number, which is displayed on the 7-segment display. 16 different numbers can be represented by a 4-bit binary number, one number for each line / button, so a 16:4 works out fine.
To distinguish between the 0 button (encoded to binary 0000) and nothing (no button pressed), encoders often have a "Valid" or "Got Something" output, which goes high if there is a signal is present.
This encoder is also categorized as a "One Hot" or "Simple" encoder because only one input is allowed to be high at a given time.
My idea is to use a resistor array to assign a voltage weight to each button. The ADC will convert this analog voltage to the corresponding binary number. For instance, if the "A" button is pressed, the resistor divider of 1.5 / 2.4 = 0.625 is used to reduce 16V to 10V. 10V is converted / encoded to 1010 by the ADC.
The opamp comparator provides the valid signal and activates the 7-segment displays.
Check out the next one here: https://everycircuit.com/circuit/5670298518814720
|