All the formula does is convert the ADC result into a value ranging from 0-1 then multiply that by the maximum RPM. When ADC reads 0 you get 0 RPM when the ADC reads 1023 you get max rpm, whatever that is. The formula is great - on paper....

There are several ways of doing it with PBP, the best/easiest way depends on
A) What's the maximum RPM of your motor
B) What's the ADC Reading (back EMF) at that speed?

Example:
If the maximum speed is 5000rpm and the ADC returns 1023 (full scale) at that speed then RPM = ADC_Reading */ 1251 should work. So, what's that */ 1251 I hear you ask.....

We want to scale the ADC value (1023) to 5000, to do that we need to multiply the ADC value by 4.8876. We can think of the */ operator as multiplying by units of 1/256 and 4.8876 * 256 = 1251.

/Henrik.