Help me decide on impulse counting

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Help me decide on impulse counting

396 Views
lpcware
NXP Employee
NXP Employee
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?
Labels (1)
0 Kudos
3 Replies

317 Views
lpcware
NXP Employee
NXP Employee
bump
0 Kudos

317 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by karpis on Wed Mar 23 01:12:45 MST 2016
Thanks for pinpointing to frequency measurement. I don't know how I skipped that, but first results are highly encouraging.
0 Kudos

317 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by R2D2 on Tue Mar 22 06:44:18 MST 2016
... or
3. Use 'Frequency measure function' of LPC15xx  :D

So obviously I used SCT (as described in #7 of https://www.lpcware.com/content/forum/decoding-pwm-input)  :O

And of course you can also use SCT without SCT interrupt...

0 Kudos