On Fri, 9 Apr 1999 18:38:25 -0600 adastra writes: >I am constructing a PIC based system to display speed in MPH as a >function >of the Doppler frequency from an X band radar antenna. >The conversion factor is 31.398 Hz per MPH. I plan to measure the >period >over a few cycles and, either by implementing an inverse math >function, or >some clever lookup scheme, derive the BCD data for the display. >Resolution >needed is 1 MPH. This seems too obvious, but if you count how many cycles occur in 31.8492 ms (1/31.398), the count will be directly in mph. Probably you want to count for a multiple of this period, then divide the result by the number of periods counted. This will reduce the +- 1 mph uncertainty that would otherwise be present. If you synchronize the start of counting to a cycle of the output, then the count will jitter less. At these low frequencies it may also be practical to use a combined frequency/period measurement. But for now just to get something on the display, count for 31.84 ms and display. To display in BCD, for small numbers (<255), it's practical to use repeated subtraction of 10, 100, etc. Or count in BCD in the first place, though that makes averaging, division, etc. more complicated. > >I would appreciate any insights, shortcuts or alternatives to this >plan, but >even more so, some ideas on dealing with the following complication: > (The background signal is also of a >somewhat smaller amplitude than the signal of interest.) That's probably the key to it, if the signal of interest is larger than the background it will dominate the counting. It will be very hard to extract anything useful if the interference is comparable in level and frequency to the desired signal. I think that many implementations use an analog PLL to lock on to the signal of interest, then count with a digital counter. If the output of the PLL is changing rapidly, it is likely to be noise and should be ignored. (About the simplest way would be to look at the counts and only display after 2 or 3 close to the same count have occurred) Once locked, the PLL could also serve as a tracking filter, though that may not be practical since the signal is of such short duration. ___________________________________________________________________ You don't need to buy Internet access to use free Internet e-mail. Get completely free e-mail from Juno at http://www.juno.com/getjuno.html or call Juno at (800) 654-JUNO [654-5866]