Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

external interrupt problem for rpm using8051

Status
Not open for further replies.

garg29

Advanced Member level 1
Advanced Member level 1
Joined
Nov 17, 2004
Messages
443
Helped
25
Reputation
50
Reaction score
10
Trophy points
1,298
Activity points
3,593
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

please help

with regards
amit
 

Hello!

Could you use Timer/Counter 0 to count external events and other timer interrupts and stores the value?

TeePee
 

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.

thanks once again,

with best regards,
Amit
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top