need c program code for tachometer project

Thread Starter

irin

Joined May 29, 2012
1
I need to make a tachometer displaying the speed of the motor in revolution per second on an LCD. I am using an atmega 32 microcontroller but I am having trouble with the program. My program is done on following basis.
Get the output of Opto coupler to the microcontroller through PO1.
Convert analog signal to digital by ADC and count the pulses using COUNTER 0.
Generate 1 second pulse duration using internal TIMER 1.
Perform AND logic between PO1 inputs counted by the COUNTER and the TIMER 1 output.
Count the no. of pulses present in the output of this operation.
Give the digital output to the 8 bit port for the LCD.
thanks
 
Top