Hello, I have wired up a frequency meter using 89C4051.The signal is connected to P3.4/T0 pin.The circuit runs on 24MHz crystal.Can anyone give me the code of a frequency counter?Thanks in advance...
because the isr you objected to is correct, has nothing to do with T0's maximum clock rate.
It sure does, others have tried to apply multiMegaHertz to a clock input and asked "why does it not work" I posted "do read the maximun clock rate for the T0 input"
hope that put it in the right perspective for you.
BTW Jack Sprat, it is nice you came out of the closet.
Erik
BTW It is, by now, in my opinion proven that Jack/Ashley is a professional nitpicker
because the isr you objected to is correct, no, it is not, the name is "freq" not "MSB_of_freq"
now nitpick about variable names
"no, it is not, the name is "freq" not "MSB_of_freq""
so if your objection were about the name of that variable, why did you object to the isr or ask him to look at T0's maximum clock rate? how are they related?
"now nitpick about variable names"
whenever you see people picking on trivial things like this, you know that they have run out of legit arguments.
except that your mistakes aren't trivial: you insisted that a correct piece of code is wrong, and you ask him looking into T0's maximum clock rate when it has nothing to do with what he is trying to do.
in the end, you "justified" all of this on him not naming the variable in a way that you can understand.
you will get more respect if you simply admit to your errors. trying to justify your way out of an obvious mistake is just silly.
you insisted that a correct piece of code is wrong
And you've demonstrated several times over since you popped in here that you don't know a thing about distinguishing a correct piece of code from a bad one.
you will get more respect if
You're grossly mistaken if you think that you, of all people, are the person who should be giving others advice about how to gain respect. If you knew how to do that, you'ld have at least managed to gain some yourself. Guess what: you didn't.
so to prove erik is right, I went ahead and wrote a minimum frequency meter (15 minutes of work) on a 24Mhz 89c51, using the same isr that erik criticized to be wrong.
my count on 100Khz pulse train is 99999; my count on 1Mhz pulse train is 999999.
it counts 10hz pulse train as 10.
not bad, for an isr that doesn't work and doesn't observe T0's maximum clock rate as erik suggested.
Where is Jack Sprat to "gloat" or join Ashely's _respect_ based gang/mafia (being able to nag is a prerequisite to join). And where is Miss Embedded? It has been so long love! :-)
Hmm, I should have posted:
"It has been so long, luv!"
"Hmm, I should have posted:"
Michael: don't worry about it.
your impotence is legendary and well documented.
hmm, I should have posted:
"your incompetence is legendary and well documented."
Keep up the documentation work, Ashely. It looks like your best (well documented) gift!
Another great gift (and a truly fun propensity of yours), Ashely, seems to have the skill to get bashed my individuals that tend to dwarf you (professionally of course). There were at least 3 on this thread...But rest assured: your aggressive posture will help boost your self-esteem long enough until the next down. I hope.
erik:
again, would you please point out for us why T0's maximum clock rate matters when T1's counting the pulses?
please?
Yes?
This forum is funny. There are people who post good questions. There are people who post dumb questions. There are people who just can't resist and have to respond to everything. There are people who post nonsense. There are people who like to argue. There are people who like to agree with the crowd. There are even a few people who sometimes post with good answers. There are so few people and such clear categories. Fascinating.
Magnus Tucker.
BEng (Hons).