??? 02/29/12 21:45 Read: times |
#186300 - answers Responding to: ???'s previous message |
Richard Erlacher said:
What, exactly, is it that you find boring about using a simple, though long-established method for solving this relatively trivial problem? A PLL with wide capture range can easily deal with this problem, and, as others have already stated, it only takes a coupld of IC's and a few cheap passives requiring perhaps 3 square centimeters of PCB space. It can even be done with one CMOS IC, e.g. one of the MC14515x or 14517x series frequency synthesizers. You are right, Maybe that is the classical approach, but it is interesting doing it with MCU. I did it in a simple way to use a timer with 16x prescale to count input frequency, once finished this value is transferred to 1x prescale timer to count down, this way I get o/p frequency 16* input frequency. I previously mentioned rate multipliers, e.g. 7497 or 74167, or CD4089. If they are too costly (the CD4089 costs $0.52US, IIRC) you can probably replicate all their functions in firmware, since you're operating at a snail's pace frequency. You haven't really stated what your ultimate goal is. Do you wish to control/adjust the operating speed of the motor, or just display its rate? no it is just for monitoring rpm of engine. Mahmood |