CMOS Frequency Counter – 7400 Contest Entry

I’ve wanted to create a frequency counter using logic chips for some time, but I never really got the chance to do it, mainly because nowadays there are micro-controllers that one can use in replacement of all these old chips. I heard of the 7400 Contest only 2 weeks ago and thought that it was the perfect excuse for me do build this machine!

The project consists of a frequency counter that uses only old-school CMOS chips: 4511 display drivers, 4029 decade counters a 4521 24-stage frequency divider and a 4011 chip with 4 NAND gates. The frequency counter counts from 1 Hz to 1 MHz (999.999 KHz)


CMOS Frequency Counter

CMOS Frequency Counter


This circuit can be understood by thinking about two separate blocks: the counting block, and the control block. The counting block consists of 6 4029 counters and 4511 display drivers. The terminal count pin of each counter is the clock input of the next counter. Each counter counts to 10 and as there are 6 counters, we can get a maxim count of  1.000.000 Hz, or 1 MHz. The control block takes care of the signals to control the chips in the counting block. Frequency is by definition “cycles per second”. In order to count a frequency, we must count during one second, latch the count to the displays and reset the counter to start counting again. The 4521 chip is dividing a frequency of 4.194304 MHz in order to get a frequency of 0.5 Hz (with a 50% duty cycle). During the first second the clock is HIGH and the counters are counting. As soon as the clock goes down, the RC circuit used together with the 4011 with the NAND gates triggers a quick signal that will latch the displays, and after that happened it triggers another very quick signal do reset the counters (as 4029 chips don’t have a master reset pin, I’m using a parallel load of 0 as an asynchronous reset). In the next second, the counters start counting again. I’d like to thank timescope for helping me out with this solution in the controlling signals.

This circuit was designed to be flexible, so the signal input is directly connected to the clock input pin of the first counter. This allows this circuit to be extended. If you want it to count frequencies of non-CMOS logic level signals, you can use external circuitry to convert the levels. You also can (or should) use a small transistor so that the input signal current is not drawn from the signal itself. If you want to turn this counter into a 1 KHz – 1 GHz counter, you can design a prescaler to divide the frequency by 1000 and then feed the output to the input of this circuit.


CMOS Frequency Counter Schematics

CMOS Frequency Counter Schematics



  • In the schematics, where it says “Carry in”, it’s actually “Count Enable”. This is a bug from gschem!
  • If you want to build this circuit in a breadboard, be careful with the 4521 part of the circuit. In order to start the oscillator, the 2 capacitors must have different capacitance. Now, the breadboard as a lot of capacitance (and even inductance) between its tracks – this is why breadboards are awful in high-frequency applications. So you need to try different solution in order to get the circuit to oscillate. Sometimes it will oscillate in a breadboard even without any capacitor!
  • Even if it’s not featured in the schematic diagram, you should add a weak pull-down resistor in the external singal input that you want to measure in order to keep a logic LOW even when there is nothing connected. If you don’t do this, the screens will show random values because the clock pin of the first counter is floating. I used a 1 MegaOhm resistor.
  • Do not forget to add a 100nF capacitor between the supply pin of every chip and ground. This is very important to mantain stability (and not only in this circuit, but in every circuit you may build that uses these “logi” chips).
  • The resistors used in the displays are all 330R resistors. There are people who insist to use only a common resistor per display – this works, but will significantly reduce the life of the display, and may overheat the board because sometimes there will pass more current through one of the LED’s (for example, there will be more current passing through the lit LEDs when a display shows the number 1 then when it shows the number 8. In order to have a good design, you need to use a resistor for each segment, or a total of 42 resistors.
  • Even though CMOS chips are a bit more flexible with the supplied voltage than the older TTL ones, this circuit was created to work with a stable 5V supply, sou you can use a 7805 voltage regulator in order to create the right voltage output.
  • All the tones in the video used to test my frequency counter were generated by the Arduino’s tone() function.

I hope you like it! If you have any questions, be sure to contact me or leave a comment! 🙂


More photos:

Frequency counter

Frequency counter

Frequency Counter

Frequency Counter

Online Poker

With the rise of the World Wide Web we now have the possibility of doing a lot of things in the comfort of our homes, and one of those things is online gaming. Probably the most interesting, and the most played online game, is poker. The online poker is perhaps the best way to start playing real poker. This is mainly because most of online poker websites host tournaments with no entering fees, and also allow cheaper venues than the casinos. This flexibility not only is extremely attractive to the new players, but also to the most professional and wealthier players.

The most important decision you must make, as a beginner, is the online poker website you will be playing in. Probably one of the most safe and interesting websites is partypoker. They promote a safe and responsible gaming, and also have a very good privacy policy. PartyPoker has lots of attractive monthly promotions that you can choose from (including freeroll promotions). They also host several online tournaments of different kinds and you may choose the one you are attracted the most.

Partypoker is a safe, licensed, regulated and responsible operator (certified by GameCare). It features more than 50 payment methods and allows you to choose more than fifty types of poker games to play. They also guarantee prompt payments and will give you a welcome bonus when you join them.

If you never played poker before, PartyPoker also teaches you all the basic poker rules. It is a great opportunity to give it a try and start playing. You should definitely check the site out.

MPSokoban for Android

MPSokoban for Android is a version of the classic 2D puzzle game, sokoban, that you can now play in your mobile phone and take it everywhere with you. It’s great fun! It features 25 levels and new content will be added soon! In Sokoban you need to move boxes from one place to another, but be careful to where you move them, because if you do it wrong, you may never complete the level again.

Android app on Google Play


Game of Life

The Game of Life is a cellular automata created by the english mathematician John Conway. This program here is my own multi-platform implementation of this automata. It is pretty fast, has multiple modes and comes with predefined forms (right click the “universe” area). To learn how the Game of Life works check out the Wikipedia Article.

Download for Windows (8, 7, Vista)

Download for All Windows | Download for Mac and Linux



Game Of Life