Converting frequency to time (SOLVED)

@regected

Working in integers - with a result in microseconds - will be a sensible representation for the precision of the input.
You will still need to scale the result unless the input value (400 - 1024) REALLY DOES represent an input frequency of 400 - 1024Hz.