need c program code for tachometer project

Discussion in 'Embedded Systems and Microcontrollers' started by irin, Jun 24, 2012.

  1. irin

    Thread Starter New Member

    May 29, 2012
    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.
  2. hgmjr

    Retired Moderator

    Jan 28, 2005
    Post your circuit and your code so that we may see the details of your design.