News 8051 Projects
- ajay_bhargav
- Wed Oct 28 2009, 02:57 am
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
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)
Submit comment
Downloads
- Automatic Railway Gate Control by: Sharanjit Singh in: 8051 Projects
Tue Oct 15 2019, 12:47 pm - Yet Another DTMF Controlled Robot by: Er. Sharanjit Singh in: 8051 Projects
Tue May 07 2019, 02:45 pm - Simple 3 Digit Temperature Meter by: Rakesh Suthar in: PIC Projects
Sat Jul 05 2014, 11:45 am - Electronic Voting machine with Managed Control Unit (Project Report Included) by: Shivani, Geetika Gupta, Vibhore Aggarwal, Megha Singh in: 8051 Projects
Sat May 17 2014, 07:46 pm - LED Scrolling message Display using 8051 by: Pratik Suthar in: 8051 Projects
Thu May 08 2014, 04:28 pm
Comments
- Pure Sine Wave Inverter Using Atmel 89S2051 by: Charlestehed
Thu Aug 29 2024, 11:49 pm - Pure Sine Wave Inverter Using Atmel 89S2051 by: Davidrap
Thu Aug 29 2024, 11:35 pm - Pure Sine Wave Inverter Using Atmel 89S2051 by: Charlestehed
Thu Aug 29 2024, 08:24 am - Pure Sine Wave Inverter Using Atmel 89S2051 by: Davidrap
Sat Aug 24 2024, 09:16 pm - Pure Sine Wave Inverter Using Atmel 89S2051 by: Francisspams
Fri Aug 23 2024, 05:22 am
Ubrat_qwmr
Wed Sep 11 2024, 04:50 am
Raymondelunk
Tue Sep 10 2024, 09:29 pm
WilliamChisk
Tue Sep 10 2024, 08:45 pm
JessePsync
Tue Sep 10 2024, 04:32 pm
Waltergop
Tue Sep 10 2024, 10:24 am
Donnyrap
Tue Sep 10 2024, 06:23 am
kompleksna_qnMt
Mon Sep 09 2024, 10:40 pm
Alcredasem
Mon Sep 09 2024, 09:40 pm
Trending Topics
variables LCD simulation Keil Hands-On ZigBee Radio Basics UHF RFID 8051 serial port uart BJT based H-bridge behavior-based systems sample and hold fundamental Brain as a neural network pwm sound 8051 happy diwali LCD simulation in Keil romanblack shift1 system AVR assembly instructions time delay calculation keil idata region 8051 C programming wave generator scrolling dot matrix display code nokia 3310 lcd for pic