dear friends
i am trying to design a rpm meter using 8051.i am using two interrupts one is the external interrupt (pin 3.3) for the external pulse and another is the timer interrupt for timer to start counting the pulses. now suppose external interrupt routine is going on ,then timer interrupt occurs and starts its routine and before this routine ends up the external interrupt occurs again , then the rpm generates error in count . in IP i have given external interrupt highest priority .and if the case is visa versa then also error generates.
in either of the cases one or other interrupt is missed.
what should i do
You should not allow this situation to happen. What you can do is to count pulses only for the period of time P3.3 is low (I assume you have a square wave on this input) ..
Thanks for replying. "Ianp", yes i'm having square wave at input. actually i was planning to do the same thing as you told but as this would involve 32-bit calculations so i rejected this method. still i'll try it out.