1

Please see this circuit.

enter image description here

I'm trying to design a circuit that allows you to use a single button to increment a counter from 0 to 9 (then it will loop). Diode logic will convert the 10 logic outputs to BCD and a chip will then display the number on a 7 segment display.

The outputs from the decade counter will then be used to trigger an off board device with 10 decimal inputs, but only when the 'activate' button is pressed.

So in the circuit everything works. I can use the increment button to find the number I want, and then press the 'activate' button and that output will go high.

However I discover that the off board device has 'active low' inputs! As it is I'm going to need 3 quad AND gates which takes up a lot of space on the board. If I have to add two hex inverter IC's the board will become huge.

Can anyone suggest a way that I can make this design more efficient, such that I when I select the number I want and push the activate button, the appropriate output goes LOW?

EDIT: Following Tim's answer and by way of keeping a complete record here is a revised circuit.

enter image description here

Richard
  • 289
  • 1
  • 11

4 Answers4

7

Replace the AND gates with NAND gates.

CL.
  • 18,161
  • 5
  • 40
  • 67
  • Yes. That would seem to be the answer. I was hoping someone would say something like.. use a BCD counter, then some BCD to decimal chip that does active low outputs (that I've not heard of)... Or even, here's a circuit that does exactly what you want but designed by someone clever :) Thank you though :) – Richard Jul 25 '22 at 16:26
  • 6
    @Richard i think the space-saving answer nowadays would be use a microcontroller! all the digital logic you could ever want, packed into one chip – user253751 Jul 25 '22 at 16:50
  • Or possibly a FPGA. I haven't really had the need or desire to try them, but they are dirt cheap. Years ago I used Signetics PLDs (PLS153 and PLS173, IIRC). https://www.datasheetq.com/PLS153-doc-Philips. Here's a re-programmable 20 pin device for about a dollar: https://www.mouser.com/ProductDetail/Microchip-Technology-Atmel/ATF16V8B-15PU?qs=2mdvTlUeTfCsdBIzx6v3gA%3D%3D – PStechPaul Aug 06 '22 at 00:06
2

Well, the old fashioned way is a 74LS90 decade counter into a '47 display decoder/driver, and a '154 decoder for the one-of-N outputs (the outputs will be active-low, arrange your loads/switches accordingly).

The '154 has enable inputs so you don't need an array of ANDs.

Most of these are available in CMOS (74HC, etc.), though you may have trouble finding the '47, but that's fine, 74LS inputs are CMOS compatible.

In CD4000 family, consider 4510, 4511 and 4028 or 4067 (the latter is a bidirectional switch, not a decoder; if the common side is assigned logic-high, then one-of-N outputs goes logic-high and the rest are high-Z. Use pulldown resistors to get a logic low, then.)

Further reading:
https://en.wikipedia.org/wiki/List_of_7400-series_integrated_circuits
TTL Cookbook, Don Lancaster
https://en.wikipedia.org/wiki/List_of_4000-series_integrated_circuits
CMOS Cookbook, Don Lancaster
And, go shopping for parts to make sure they're available, and in the family you're looking for. Then look up individual datasheets.

Tim Williams
  • 22,874
  • 1
  • 20
  • 71
  • Thank you for this.. I'll look into it. – Richard Jul 25 '22 at 19:07
  • I think this works. Still having a few teething problems in LTSpice, but it's looking good. CD4510 BDC counter into both a CD4511 (display) and a 74HCT154 (do you know the CD prefixed chip?) to convert to decimal active low outs. On the 154 I can use the chip select pins to trigger the output.. When I have a working solution with this, I'll mark your answer as correct... thanks again. also have a small issue getting the CD4510 to go from 9 back to zero.. but the rst pin should somehow do this for me? – Richard Jul 25 '22 at 23:47
  • Ahhh :) The LS90 does cycling (mod 10).. very well recommended! I need the HCT version of it really (CD version).. But again, thanks that's great! – Richard Jul 26 '22 at 00:00
  • If you're using 5V supply at low frequencies, 74HC(T) and CD4000 are interchangeable. For the latter, check out 4028; and yup, 4510 and 4511 are the classics! – Tim Williams Jul 26 '22 at 01:53
  • The supply voltage will be 9V. So I can't use HC/CD (not HCT, sorry) However I'm beginning to think that just using some sort of quick and easy regulator to get 5V might be easier in the long run for various other reasons. Thank you I think I can work it all out from this.. Great advice, thanks. – Richard Jul 26 '22 at 08:53
  • If you could just cast your eye over the new circuit in the edit.. It works in LTSpice, but I'm not sure if I'll need a buffer on the BCD lines somewhere. And maybe schmitt triggers on the buttons? – Richard Jul 26 '22 at 14:32
  • @Richard You've got 9V to "vdd" but also ".param vcc=5", and HC(T) definitely doesn't run much more than 5V; diodes don't really do anything, but reduce R9, R11 to like 100R, that will debounce okay; yes, you need schmitt trigger; chips should be fine no buffering needed. – Tim Williams Jul 26 '22 at 17:55
  • Yes. I'm aware of the HC(T) issue. I've sourced some CD74HC154EN (still only about 6V max). Yes the diodes are a 'cargo cult' thing I know :) Thank you for the rest.. and thank you very much for your help! – Richard Jul 26 '22 at 22:23
2

Want a compact solution that's cheap to implement for a one-off? An Arduino Nano would do this in a smaller footprint than 2-3 DIP ICs. It could handle your switch debounce too, and give flexibility over the 'trigger' output pulse duration.

If you're determined to use MSI logic, a decade counter followed by a 1:16 demux (with enable) would make the gated 1-of-10, with the 7-segment readout driven from BCD using the CD4511 as shown. Yes, 3 ICs in all, but the benefit is that you can do away with the diode logic, which won't work without a pull-up anyway, at least for CMOS.

Smallest footprint and lowest possible cost if you're making a bunch of these? Try a Silego / Dialog / Renesas Greenpak. More here: https://www.renesas.com/us/en/products/programmable-mixed-signal-asic-ip-products/greenpak-programmable-mixed-signal-products

hacktastical
  • 49,832
  • 2
  • 47
  • 138
  • I am stuck on MSI Logic for reasons that are too long to explain, which is annoying because the off board unit is an arduino based daughter board. Thank you for the Demux idea.. this is exactly the sort of thing I'm looking for. – Richard Jul 25 '22 at 19:06
1

Instead of using three chips 74xx08 with four gates each, you may use only two chips 74xx04 with 6 inverters each.

Uwe
  • 2,783
  • 1
  • 11
  • 18