i'am doing tachometer using microcontroller AT89s52 in this i'am using sensor to detect the pulses of motor and i want display the speed in lcd that is for below 100 rpm i want to display two decimal point and below 1000 rpm i have to display one decimal point and above 1000 rpm their won't be any decimal point please some one give me a code or else suggest me how to do that one.....!