10A. Arduino Interrupt Processing Part I

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

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

  • @michituurbentaler1378
    @michituurbentaler1378 8 ปีที่แล้ว

    First i hesitated to watch an one hour video about this topic but afterwards, i have to commit i'm grateful to got such a detailed introdutction in interrupts.
    Top Job! Keep going!

  • @boualemkalai3216
    @boualemkalai3216 7 ปีที่แล้ว +1

    Many Thanks Mr Paz for these lessons. I learned a lot of information.

  • @kadenzxc
    @kadenzxc 9 ปีที่แล้ว +2

    Great lecture, I love the detail you go into. I'll definitely be returning for more in the future. Too much eye contact though.

  • @antonispap4006
    @antonispap4006 10 ปีที่แล้ว

    Thank you for posting these videos.
    At the PC-interrupt code example, although the main concept is clear, inside the loop() function the interrupts are disabled but serial.print() is used.

    • @DrZAP42
      @DrZAP42  10 ปีที่แล้ว

      Thanks for mentioning that. I'll take a closer look.

  • @rikschoonbeek
    @rikschoonbeek 8 ปีที่แล้ว

    Hi Robert, I'm totally new to this stuff that's why I am watching your videos, thanks!
    Watching another video yesterday I read a few lines of the ATmega48A/PA/88A/PA/168A/PA/328/P manual, which says the following in the first paragraph of chapter 13:
    "Observe that, if enabled, the interrupts will trigger even if the INT0 and INT1 or PC INT23...0 pins are configured as outputs."
    I just want to point out that you mention that the pins need to be set up as inputs for them the be able to handle interrupts (after 5:00), which doesn't seem to be correct for the above ATmega chips.
    I appreciate your work though, ciao!

  • @alfonsolarcinese8926
    @alfonsolarcinese8926 10 ปีที่แล้ว

    Dr. Paz, excellent lectures.
    It would be excellent and helpful to have the lab assignments so I could apply the material from class. It would also be very helpful if we could have the homework assignments (without solutions) to work them out as well as reading assignments from the book. There is a lot of material in the classes and it is difficult to figure out how to make use of it without these complements. I have bought the EduBoard but without the labs It is difficult to make use of it.
    Thank you.

    • @DrZAP42
      @DrZAP42  10 ปีที่แล้ว

      Thanks for asking. I've been asked before, but there is not a convenient way to do this. For now I think I will simply add more videos with problems that are like the ones I assign for homework or for lab.

  • @CShand
    @CShand 5 ปีที่แล้ว

    Great video, code works wonders however i am having trouble detecting a low or high state of that particular pin is this possible? i am only able to detect that a interrupt was triggered by pin 3 (in my case) but instead i get results for both low and high states.

  • @joesmith9330
    @joesmith9330 7 ปีที่แล้ว

    WHAT I DO IS A JUST SAY " WELLLLL EXCUSSSSSSSSE MEEEEEEEEEE" AND THEN INTERRUPT ! GREAT VID ! THANKS.

  • @NivagSwerdna
    @NivagSwerdna 9 ปีที่แล้ว

    Nice video.
    Given that you shouldn't Serial.print inside the interrupt how would you send a stream of information (e.g. the time between interrupts) from the interrupt to the main loop? Some kind of circular buffer?

  • @RyanInFocus
    @RyanInFocus 9 ปีที่แล้ว

    Hi Dr. Paz.. can you apply interrupts to an ultrasonic sensor even if the output signal of the sensor is not a square wave? Will it go to the interrupt function once the input gets small enough?

  • @sb-rj6yb
    @sb-rj6yb 7 ปีที่แล้ว

    can i use obstacle detector as an interrupt...i want two arduinos to turn on or off one after other with obstacle sensor attached to each arduino uno...when one arduino is working the devices connected to it should operate and other arduino should stop working..and vice versa

  • @abdurrahmandogan621
    @abdurrahmandogan621 5 ปีที่แล้ว

    in one word, awesome...

  • @gaiifafa1306
    @gaiifafa1306 10 ปีที่แล้ว +1

    I'm learning a lot from your videos. I was wondering if you have any resources, projects, IC's I can buy or any practical work that I can do to hammer in these concepts. I understand by doing. There are are resources online on interrupts but they don't give it the same detailed/thorough approach as you do on ANY TOPIC, be it I2C, SPI or whatever. I can write an essay on how interrupts work, but I can't for the life of me program it onto an Arduino, I want that ability. Do you give your students labs based on these topics?

    • @DrZAP42
      @DrZAP42  10 ปีที่แล้ว +1

      Yes, a Lab accompanies this course as well as homework. While I wouldn't post all of those things here (so that my students don't have the answers), I can see from your post that it might be good to include a hands-on component with each lecture video. Hmm. I'll have to think about that....

    • @DrZAP42
      @DrZAP42  10 ปีที่แล้ว +1

      If you look at Lecture 16 H, you'll find an example worked from start to finish!

  • @LuckyX0182
    @LuckyX0182 9 ปีที่แล้ว

    Hello Mr. Paz I love you lectures but could you do lecture about Arduino Processing?

  • @fnjyusername
    @fnjyusername 10 ปีที่แล้ว

    Hi, I have tried interrupt to capture the width of a pulse of a PWM input (say set to 1100us @ 400hz), My reading is getting a variance +/- 4us meaning a random value of 1104 ,1100, 1096. I use micros() to get time change between HIGH and LOW of the pulse Question: Is it something to do with resolution of timer that used by micros(() or the resolution of the interrupt timer? Is there a work around to increase the resolution of the micros()? or the interrupt in the UNO/Mega? On DUE i got descent +/- 1us Thanks.

    • @DrZAP42
      @DrZAP42  10 ปีที่แล้ว

      On the Uno, Duemilanove, and Nano (16MHz) arduinos, the micros() command has a resolution of 4us (it always returns a value that is divisible by 4). It sounds like what you are trying to do is on the boundary of that resolution. A better way to do this capture is to use the Timer 1 Input Capture capability. This has uses an analog comparator and a noise canceler before the edge detector. The output of the edge detector can be used to set the ICF1 (input capture flag) which can be set to trigger an interrupt. I've seen a lot of garbage on the net about this. I recommend you go directly to the source: www.atmel.com/Images/doc8161.pdf

    • @fnjyusername
      @fnjyusername 10 ปีที่แล้ว

      Thanks,

  • @ChaplainDaveSparks
    @ChaplainDaveSparks 7 ปีที่แล้ว

    Was that an error to set Portcpast = Portcstate BEFORE comparing them with an XOR?

  • @adilmachrouki4173
    @adilmachrouki4173 8 ปีที่แล้ว

    hello
    i work for long time to understand pin change int but it doesn't work
    i want to have code wich use pin 7 (on arduino uno ) as pin change int to turn on and off led on pin 13

  • @theodorebagwell3967
    @theodorebagwell3967 10 ปีที่แล้ว

    I use timer two and the OC2B and OC2A registers (pin 3 and 11). Both pins generate the same output except one is an inverted output. How do i make a dead time between these outputs to make sure both are never on at the same time?

    • @DrZAP42
      @DrZAP42  10 ปีที่แล้ว +2

      If I understand you correctly, you want two signals with the same frequency, but different phase. To do this, set up a timer to have twice the frequency as the desired frequency. Toggle the first signal on the rising edge of the timer, and the other signal on the falling edge of the timer. This will create two signals in "quadrature."

  • @fnjyusername
    @fnjyusername 10 ปีที่แล้ว

    Very informative!

  • @Hamoudi_23
    @Hamoudi_23 8 ปีที่แล้ว

    hello Robert what worke Arduino witch PLC

  • @raccoonnyc
    @raccoonnyc 9 ปีที่แล้ว

    Thanks, that was a big help.

  • @alfonsolarcinese8926
    @alfonsolarcinese8926 10 ปีที่แล้ว

    That would be great!
    Thank you.

  • @Kennethshuv
    @Kennethshuv 10 ปีที่แล้ว

    hi is this usable for arduino uno? to set 1 khz freq

    • @DrZAP42
      @DrZAP42  10 ปีที่แล้ว

      Yes. You can do this using a timer with a Compare Match Interrupt. See how this works in Part II.

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

    The updated code.google (referenced 58:08) may be found on GitHub github.com/GreyGnome/EnableInterrupt

  • @khantarsidahmed3002
    @khantarsidahmed3002 6 ปีที่แล้ว

    tnx master but how to do this code with matlab

  • @toroviejo226
    @toroviejo226 8 ปีที่แล้ว

    Don´t interrupt while I´m interrupting you :-)