hall effect sensor as a rpm mesauerment device

Thats one way.

Another way which is better if your doing other things on the chip at the same time:

  1. When a interrupt fires, revolutions++;
  2. Every X ms (however fine you want it) get the number of revolutions and reset the variable to 0
  3. Compare the previous number to the current number. The change is acceleration while the number is absolute speed.