lpcware

Help me decide on impulse counting

Discussion created by lpcware Employee on Jun 15, 2016
Latest reply on Jun 18, 2016 by lpcware
Content originally posted in LPCWare by karpis on Tue Mar 22 05:31:59 MST 2016
Hello everybody,
I using LPC1549 100 pin MCU and trying to decide the best way to measure fan RPM. Fan has simple feedback with square impulse for rotation.
Now I'm in doubt should I use :
1. RIT with GPIO interrupt. On rising edge on GPIO it would generate interrupt and increment rpm_count value. Then RIT periodically counts by known formula actual RPM and resets  rmp_count value on its own interrupt.
2. SCT. I would assign input to SCT_IN, event on SCT_IN rising edge and event on count down. On rising edge event I would increment rpm_count value and on count down I would use formula, reset rpm_count and restart SCT timer. I still have not found yet if it is possible to increment rpm counter without interrupts - that would be a huge improvement on 1st choice, which will load MCU with interrupts.

Has anyone did this before and how did you do it?

Outcomes