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.
You need to say what make and type of chip you are using, which compiler and post your code and circuit so we can see whats happening.
Its more normal to measure rpm via the Capture function as explained here
This uses a timer to count the pulses, whereas your INT0 method will be interrupting every pulse so its likely your interrupts may overtake each other and so give incorrect readings.
what is you expected RPM and how long a time period are you measuring over?
e.g. if the RPM is low (say a few revs a second) and you measure over a too short time period (say half a second) the counted revs will vary in RPM value depending on the number of counts in the time slot
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.