Email Address:

Lost your password?

This is the legacy website; please use the new website.

Circuit Notebook

Interesting circuit ideas which we have checked but not built and tested. Contributions from readers are welcome and will be paid for at standard rates.

PICAXE-based dual frequency counter

Click for larger image

This circuit uses a PICAXE microcontroller to measure the frequency of two different signals and displays both on an LCD panel. It has no controls since it uses auto-ranging for the two counters. The circuit was designed to be combined with a function generator based on a pair of XR2206 ICs but it can be built as a stand-alone device or as part of a different project.

Its two inputs accept TTL signals and should work with signals of around 3-6V peak-to-peak. As presented, it will measure frequencies up to 100kHz but the software can be modified to work up to at least 350kHz.

The frequencies of the two signals are alternately measured by the PICAXE 20X2 microcontroller (IC1), which runs at either 16MHz or 32MHz, as needed. The signals are AC-coupled via 100nF capacitors and then applied to inputs C2 and C1 of the micro via 3.3kΩ current-limiting resistors. Diodes D2 & D3 help clamp the signal so that their troughs are no lower than -0.7V.

Bi-colour LED1 indicates which input is currently being sampled. It turns green for input CH1 and red for input CH2.

The frequency readings (Hz, kHz, MHz, etc) are displayed separately on the two lines of an AXE033 16x2 serial LCD module. This module is available from Revolution Education, the same company that developed the PICAXE microcontroller range (

S1 and S2 were originally switches to control the function generator modulation mode so IC1 monitors their position and shows information about the mode on the LCD. If the switches are left out (but the 10kΩ pull-up resistors left in) then this feature is disabled. Otherwise, the software can be changed to monitor switches on these inputs for some other purpose.

The circuit includes a programming header for the PICAXE. Both the microcontroller and LCD module run from a 5V rail which is derived from a 6.2-7V supply using zener diode (ZD1) and a 22Ω current limiting resistor. A linear regulator (eg, 7805) or a 5V regulated supply could be used instead and would allow a wider range of supply voltages (say, 7-15V).

The PICAXE program, DualFrequencyCounter_v1.6.bas, is available for download from the SILICON CHIP website.

Brett Cupitt,
Port Macquarie, NSW. ($50)

Share this Article: 

Privacy Policy  |  Advertise  |  Contact Us

Copyright © 1996-2021 Silicon Chip Publications Pty Ltd All Rights Reserved