There is some fizz around this event counter. You cannot use this event counter for counting events faster than 1/12th of clock for the microcontroller. I suggest using some external counter & read the value from it periodically. Connect the external interrupt to the carry of the external counter.
Let me look at my back up, somewhere I have some old project I did for frequency measurement. If I find it, I'll upload complete project with source code, schematics too.
Hi
Tell me what language yoy use in your applications
C, ASM ,BASIC ...;
therefor u most change 50hz AC to square wave
( by a simple Transistor SW ) and connect it to EX0 or EX1 sources of 8051.
you must enable external intrrupt and set mode to
edge trigger .
better Idea is use of captuer mod of timer2 in 8052.
i have only an idea,
u can use a timer as external clock, and load it with a prescaller. when it overflow, it will rise an interrupt flag
then u can handel it in the interrupt servise routin