Microprocessor based scheme for measurement and display speed of a motor