I want to create a tachometer in VHDL. What possibilities of programming
I want only ideas , no code.
Martin Kokelmann wrote:
> I want to create a tachometer in VHDL. What possibilities of
> are given?
> I want only ideas , no code.
This is a "pulses per unit time" problem. You will be getting N pulses
per revolution from a sensor. Your problem (simplified) is to count
these pulses for a measured time period. You can then transfer this
count to a register that feeds a display and begin the count again. So
you will need a clock signal to determine the time that the counter is
enabled. A simple state machine can determine the enable time and then
load the display register, reset the counter to 0 and restart the
measurement cycle--you don't really need to use a state machine for
this purpose; this is my personal preference, but you will probably end
up with the same logic with or without the state machine and I think a
state machine makes for easier understanding of the logic. Since the
pulse input is not synchronous with the clock, you should use a 2-D
flip flop synchronizer on the pulse input (this of course assumes that
the sensor pulses are compatible with the logic family you are using).
Another issue is converting the displayed count to RPM. The conversion
factor depends on the number of pulses per revolution and the enable
time of the counter.