Lecture 14. Timer Input Capture

แชร์
ฝัง
  • เผยแพร่เมื่อ 15 ต.ค. 2024

ความคิดเห็น • 21

  • @Sencires
    @Sencires 2 ปีที่แล้ว +3

    Dr. Yifeng Zhu, thank you very much for your content!!! Our Professor does his class accordingly to your Books and your Videos are extremely helpful!

  • @mohaarhly2950
    @mohaarhly2950 ปีที่แล้ว

    Dr. Yifeng Zhu i thank you from all my soul

  • @skyhackerfpv7104
    @skyhackerfpv7104 2 ปีที่แล้ว

    Is this much quicker or more accurate than just using micros() at the start of a regular interrupt and comparing it to the previous micros()? I'm trying to compare signals that are up to 100 micros apart which is working about 95% of the time. Wondering if using the input capture interrupt would help or if I should try moving my project from and Uno to a Due. Thank you!

  • @MahdiMohammadi0
    @MahdiMohammadi0 3 ปีที่แล้ว +1

    Thank you for the lecture,
    Is there a mode, in which the timer starts counting as soon as an external event happens, and interrupts when the counter is overflowed? For example in order to acquire N data samples from ADC after the rising edge of a trigger signal occurred?

    • @embeddedsystemswitharmcort9051
      @embeddedsystemswitharmcort9051  3 ปีที่แล้ว +1

      Hi, Mahdi, you can use EXTI to detect the tiger signal. In the EXTI interrupt handler, you can enable a timer. You can use the timer interrupt handler to perform ADC sampling. More efficiently, you can directly use the timer trigger output as the trigger input of ADC (so that there is no software involved for triggering ADC.)

  • @tanyagachovska9982
    @tanyagachovska9982 3 ปีที่แล้ว +2

    Thank you for the lecture!!! It is better with your voice.

  • @coderhex1675
    @coderhex1675 4 ปีที่แล้ว +3

    it would be awesome next video about watch dog timer implementation. You are my time savior. By the way, ı am translating your some videos into Turkish text to refer to when i forget the some points. :-)

    • @embeddedsystemswitharmcort9051
      @embeddedsystemswitharmcort9051  4 ปีที่แล้ว +1

      Did you post your Turkish text anywhere online? It will be great if you can share!

    • @coderhex1675
      @coderhex1675 4 ปีที่แล้ว

      @@embeddedsystemswitharmcort9051 I didn't post them anywhere online. I translated 16_Volatile Variables.odt, 12_System Timer.docx, 11_External Interrupts (EXTI).docx, 10_Interrupt Enable & Interrupt Priority.docx, 9_Interrupts.docx into Turkish as sentence by sentence. If you would like to see them ı can share with you.

    • @embeddedsystemswitharmcort9051
      @embeddedsystemswitharmcort9051  3 ปีที่แล้ว

      @@coderhex1675 I would love to see them. Could you please share?

    • @coderhex1675
      @coderhex1675 3 ปีที่แล้ว

      @@embeddedsystemswitharmcort9051 share your email address with me

  • @switcher3545
    @switcher3545 ปีที่แล้ว

    Hello doctor, does ARR affect the timer resolution?

    • @embeddedsystemswitharmcort9051
      @embeddedsystemswitharmcort9051  ปีที่แล้ว

      Timer's resolution or accuracy is determined by the oscillator's accuracy. ARR will impact the period of a timer's output signal.

  • @Dragonwrath0712
    @Dragonwrath0712 4 ปีที่แล้ว

    What is the external signal here? GPIO input capture? If so which particular pins I/P?

    • @embeddedsystemswitharmcort9051
      @embeddedsystemswitharmcort9051  4 ปีที่แล้ว +1

      Signal external to the microcontroller, such as the output from a sensor

    • @Dragonwrath0712
      @Dragonwrath0712 4 ปีที่แล้ว

      @@embeddedsystemswitharmcort9051 yeah but what if there are multiple input pins which pins edge will the timer read?

    • @embeddedsystemswitharmcort9051
      @embeddedsystemswitharmcort9051  4 ปีที่แล้ว +2

      If a timer is enabled to capture multiple external inputs (we need to use multiple pins, with an input signal on one input pin), the timer interrupt is triggered whenever an event takes place on any input pin. In the timer interrupt handler, software should check the event status register to find which channel (or i.e., which input pin) captures an external event.

  • @HansBaier
    @HansBaier 2 ปีที่แล้ว

    Very well explained 👍🏻