Tachometer code

Hi All I need to change over an analog frequency from a magnetic sensor to a PWM to drive an analog meter. I am smart enough to change around the language to make it work if nessasary. just not smart enough to write the language. my input frequency is from 0 to 2300 HZ output to the gauge is 250 UA has someone all ready written a similar code that is posted somewhere. I have done a little searching but have not found anything close.can someone steer me in the right direction.

why not use a TC9400 from Microchip? You can order some as samples, even! That should easily drive your analog meter. May need to use an op amp to condition the signal for your meter, though.