Hai friends,
I need an urgent help.
Pl help me.
Actually, i gave a sensor output pulse to a single IO pin.
I want to count how many pulses entered within a single second without using couner.
Is it possible in AT89c51 microcontroller or AT89c55wd microcontroller.
Pl help me...
Thanks in advance...
Re: counting pulses without using counters in 89c51 microcon
Hai friend,
Actually, i try to write the code for counting pulses without using timers.
The code is shown below.
Pl check it.
sbit x=P1^5; //the pulse is given to this pin
void sensor()
{
unsigned char i=1275,j=1000,k=0;
x=0;
delay();
while(j)
{
while(i)
{
if(x==1)
{
k=k+1; //k has the no of pulses
x=0;
}
i--;
}
j--;
}