A very simple easy to make Frequency counter project. This project is powered with small AT89C2051 microcontroller with LCD. Block Diagram of circuit is shown below. It can support a wide range of frequency input starting from 1Hz to ~16.5Mhz, rest depends on pin characteristics.

Theory of Operation
As we all know frequency of a signal is number of cycles per second. I made use of this logic to calculate frequency of the input signal.

8051 has two timers, Timer 0 is configured for 1 second delay to sample the input signal and Timer 1 is used as a counter to calculate number of cycles in that 1 second. If timer1 overflows then the overflow is counter in another register which is considered as the high byte of Frequency. Input signal is provided at P3.5/T1 which is input for Timer 1 in counter mode. LCD is connected to microcontroller port 1 in 4-bit mode. Currently program is using 2 Line LCD but it can be used for 1 line LCD too.

Program initializes the Timer0 in 16-bit mode with 50mS delay value, a tick value of 20 is loaded to have total delay of 1s (50 x 20 = 1000 mS). Timer 1 is configured in 16-bit counter mode. After a sample of 1 sec, we get the number of cycles hence the frequency of input signal from timer1 registers (TH1:TL1) and high byte of Frequency. So total 3 byte value is then converted to a decimal equivalent represented in hex. This decimal value is then updated to LCD. The whole process repeats again.



For any doubts and suggestions please use forum

Download: Frequency Counter using AT89C2051 and LCD (Assembly)
Tags Frequency Counter using AT89C2051 and LCD8051 projectsFrequency counter project
printer friendly create pdf of this news item

Submit comment

(Required; Min length 5)
(Required; will not be displayed)

Downloads

Comments

Lewisuhakeply
Thu Apr 18 2024, 06:00 pm
Darrellciz
Thu Apr 18 2024, 11:07 am
Charlessber
Thu Apr 18 2024, 09:29 am
BartonSem
Thu Apr 18 2024, 04:56 am
DonaldKnown
Thu Apr 18 2024, 12:24 am
utaletxcyw
Wed Apr 17 2024, 10:21 am
Anthonyvab
Wed Apr 17 2024, 08:48 am
RobertCix
Wed Apr 17 2024, 06:46 am