how can I analyse a 40khz pulse by input capture in atmega16

Discussion in 'Embedded Systems and Microcontrollers' started by electronical soccer, Jun 7, 2011.

  1. electronical soccer

    Thread Starter New Member

    Jun 7, 2011
    hello.I want to find a 40khz pulse by using the input capture in atmega16.I mean after the ICP pin receives the input,how can I achieve the frequncy of it? and is it possible to calculate the frequency?
    thanks alot:(
  2. beenthere

    Retired Moderator

    Apr 20, 2004
    Do you know how a frequency counter works? -

    You will need a very accurate timing signal to be able to define a period in which to count that 40 KHz pulse. You may easily need external conditioning circuitry to make the pulse into a signal that can be used as an input to the Atmega.

    Notice that the method is to count pulses over a defined time. You seem to wish to be able to get the frequency from one pulse.