3
\$\begingroup\$

I have to light up 3 digit 7 segment displays using Arduino Uno R3. I have got myself 3 BCD-to-7 segment display decoders. I figured I need a 4-to-16 Decoder, so I bought one and it turned out that it is actually a 4-to-16 "line" Decoder, or precisely, a 4-to-16 Demux. The Demux has output with only one is HIGH at one time...which I can't use with the BCD-to-7 segment display decoders (some combination of input into them cannot be created).

Is there any workaround on this?


the circuit diagram. If you have time, do clarify these configuration is correct? Thanks

enter image description here

\$\endgroup\$

1 Answer 1

5
\$\begingroup\$

I think you are making your problem a bit too complicated. You do not need the 4-16 decoder at all.

Simply deliver four output lines from the MCU board to all three of the BCD-Seven segment decoders digit input pins in common. Then wire three more signals from the MCU with one going to the enable pin on each of the BCD-Seven segment decoders. The software that you need to create with this type of display hookup will sequentially output the four bit code for each display digit in turn while activating just one of the three decoder enable signals corresponding to the digit being displayed just now.

If the display decoders that you have selected are the type without any data latch in them then you need to run this this display algorithm in a fast repeating loop. The resulting display will only have each digit actually ON 33% of the time but if you run the update fast enough the three digits will all appear to be on steady.

If the display decoders that you are using are the type that have an internal latch to hold the digit data then those three lines that go to each decoder want to be connected to the pins that cause the digit input data to be captured into the latch. Any additional enable pins on the display decoder chips can be simply pulled op or down as appropriate to keep the decoder active all the time. With this scheme the software would just do its output process three times at the time it was necessary to change the display content.

Using these schemes you have consumed a total of 4 + 3 for a total of 7 I/O lines to run your display. The use of the 4-16 decoder chip could come into play if you were to try to build a display with more digits. Say you made a 16 digit display, the same four digit data pins would be used to all 16 display decoders but unstead of 16 separate decoder enable signals from the MCU the decoder could be used to accept a separate 4-bit code that selects one of the 16 digits to update at a particular time. You could actually use this scheme for your three digit display too and only use three outputs of the 4-16 decoder. If done this way two of the 4 inputs to the 4-16 decoder would be connected to GND and then the other two inputs would come from the MCU. This would reduce your total I/O usage from the MCU to 4 + 2 = 6 lines. Above I suggested not doing this because it is probably simpler to just use the one additional I/O signal rather than wiring up a whole extra chip.

If the decode output from the 4-16 decoder is the wrong polarity to properly connect into the enable or latch control inputs of the BCD decoders then it would be necessary to wire up inverters between the 4-16 decoders and the BCD decoders. The possible need for inverters is another reason that I suggested not even using the 4-16 decoders for your three digit display. Your software can take care of the correct enable / latch polarity for the BCD decoders without having to add additional chips.

\$\endgroup\$
1
  • \$\begingroup\$ I am going with the 2nd method - using 3 of the demux output for each of the BCD decoder enabled pin. so, I set up 2 of the demux input into ground and the other two to the Mcu. now, with that and the "ON 33% of the time" method (which I found it is the common way to do this), I will try to make it work. Your answer sir, is much appreciated. :) \$\endgroup\$
    – Raf
    Commented Jan 20, 2013 at 2:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.