# How can I trigger other circuits based on specific values of a 12 bit ripple counter?

I've built quite a few circuits but I've never really designed anything from a "schematics first" approach. Mostly just tinkered with designed and code until I got it right.

Now, I want to build a horizontal timer circuit for an NTSC computer project I am working on.

Anyway, assuming I have a 74xx4040 12-bit ripple counter that is clocked at 7MHz I want to enable other circuits when the master counter (the 74xx4040) reaches certain values. The counter would count from 0 to 447 and on the 448th value reset to 0.

During those 448 counts, I have identified the following bit values as my "trigger" points. These are the 4 MSB's.

0001 00000  (32)
0010 00000  (64)
0011 00000  (96)
0100 00000  (128)
1100 00000  (384)
1110 00000  (448) -- RESET


Other than putting a crazy amount of AND/NAND/NOR/etc. gates connected to the 4 MSB's, is there a simpler way? I only have 2-input gates available (AND/NAND/NOR/XOR/etc.).

My thinking is that each area of the circuit would be clocked by the same 7MHz clock. And as the master counter reached, say 96 for example, the first 4 bits (0011) would turn on the CE pins of all of the other IC's for that section. And when the master counter reaches 128 (0100) then only that section would be enabled and the CE of the previous would be disabled.

Hope that makes sense.

Is this a practical/sane way of approaching this?

Thanks

• So you want to generate a reset signal (HIGH) when 3 bits are high, using only 2-input gates? two inputs into AND gate 1, its output and the third bit into AND gate 2. – gbulmer Sep 8 '14 at 21:00
• Using a ripple-carry counter like the 4040 will result in glitches in the decoded outputs, so you should latch the decoded output on a following clock edge if you're using it for something like an asynchronous reset. – Spehro Pefhany Sep 8 '14 at 21:07
• @SpehroPefhany - ah! So it needs the top 4 bits to be latched before they are used. – gbulmer Sep 8 '14 at 21:12
• You can latch the bits, or latch the decoded outputs, whatever you like. – Spehro Pefhany Sep 8 '14 at 21:15