??? 03/01/12 03:12 Read: times |
#186309 - Yes ... but ... Responding to: ???'s previous message |
He said "... frequency input 1Hz to 70Hz frequency output 10Hz to 700Hz..." with no indication of why a multiplication by 10 is needed for his task of displaying the frequency. He did indicate that the input is AC, but that he can convert it to pulse format.
Now, I'm not clear as to why he needs the frequency multiplier. 10 Hz is quick enough that, when divided by 10 it will give meaningful and readable information. Since the input is in the range 10 to 70 Hz, he could easily detect zero crossings, or peaks in the AC waveform, very possibly a sinusoid, and time the interval between them. That would provide good data as to the frequency. Accumulating phase error between a local VCO and an input waveform would take quite a bit of time and to acquire lock would require probably on the order of 32 cycles, but because it's such a slow rate, doing it in firmware would be easy enough. That, again, requires timers, but you have them in an 805x, and extending them in firmware is straightforward. I'd recommend he examine various PLL options, e.g. the all-digital PLL application of the 74HC297. Those two clocks used by that device can be generated in firmware and don't even have to leave the MCU, yet can be applied in the exact way the '297 does it. Then, if he decided he needs to use a multiplier to update his display, he can do that. I'd guess that he can divide his input clock by 10 and still arrive at a useful speed indicator. RE |