Atmega 32 Input Capture

Discussion in 'Embedded Systems and Microcontrollers' started by helloeveryone, Jan 1, 2014.

  1. helloeveryone

    Thread Starter Active Member

    Apr 8, 2011
    51
    0
    Hello. What is input capture? What would be the simplest way to demonstrate input capture and what would be the basic theory behind it(basic idea, pins used)? I have a development board and I can run cables from one pin to another. My understanding is that I can create a PWM signal with a certain frequency and duty cycle and then output it on pin OC1A or OC1B. I could run a wire to pin ICP1. But what then? How do I know I captured anything and what would be a good way to show that I captured it? How do I show I captured a signal with a 60Hz frequency or 50% duty cycle for example?
     
    Last edited: Jan 1, 2014
  2. Shagas

    Active Member

    May 13, 2013
    802
    74
  3. shteii01

    AAC Fanatic!

    Feb 19, 2010
    3,395
    497
    Wire led. If pin X receives voltage Y, then LED comes ON. If pin X receives voltage zero, the LED comes OFF.

    I don't know if Atmega32 can be programmed, but if it can, then you can assign a variable to the input, then display the content of the variable on computer or on lcd. There. You demonstrated that you captured input.
     
  4. kubeek

    AAC Fanatic!

    Sep 20, 2005
    4,670
    804
    Input capture in this context most likely involves the timer module of the ATmega.
    There it means that the timer is running at some frequency, and when an event happens on the input there is a mechanism that saves the value of the timer at that moment. The event is usually one of low level, high level, rising edge or falling edge on an input pin. Some micros like xmega series can trigger these by internal events as well, like end of ADC conversion or end of DMA transfer.
     
Loading...