We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Can anyone please send me the code for counting pulses using timer 0 as counter in 'C'language.
That is not equivalent to the assembly code. For starters, you are not configuring the timer. Look back at your assembly code for TMOD.
No i have configured the timer as TMOD=0x25;
I forgot to write it. In main(), my first instruction is TMOD=0x25;
Are you saying that you typed in the code when posting?
Are you one of the few who have managed to get a computer without any copy/paste function?
How will we know what other information you forgot to write when "duplicating" the code?
"In main(), my first instruction is TMOD=0x25;"
OK then, we'll just assume that's true. If you want the counter registers to count, why do you continually zero them?