26- Interrupts, part 1: External Interrupt | mikroC Pro for PIC Tutorial

Поділитися
Вставка
  • Опубліковано 16 гру 2024

КОМЕНТАРІ • 33

  • @fouzaialaa7962
    @fouzaialaa7962 7 років тому +5

    very informative and easy Thank you very much.

  • @keshenanaidu7160
    @keshenanaidu7160 7 років тому +5

    Wow! Wonderful video. Clear and easy to understand. Thank you very.

  • @StudentCompanion
    @StudentCompanion  7 років тому +1

    We appreciate all your feedback guys. Keep commenting with your suggestions for future tutorials. Thank you!

    • @envisionelectronics
      @envisionelectronics 6 років тому

      Student Companion Please check the audio at 7:45. It stops and does not return.

  • @tota896
    @tota896 7 років тому +3

    Great tutorial. Thank you

  • @ggxhard2779
    @ggxhard2779 7 місяців тому

    in 11:43 couldn't you just wrote the code of when the interrupt happens inside the void interrupt() ? or you have to make it like this to work ?

  • @hashirali9272
    @hashirali9272 5 років тому +1

    THANKS

  • @keepcool5945
    @keepcool5945 7 років тому +1

    Thanks a lot, but no sound after 7:45 ??

    • @StudentCompanion
      @StudentCompanion  7 років тому +1

      There is sound. They must be something wrong on your side. We have checked again.

  • @recklessanil
    @recklessanil 6 років тому +1

    Sir I'd like to ask you some. I want to use an interrupt, but instead using a switch, a condition will decide if the interrupts come or not. The code would be like when "a

    • @StudentCompanion
      @StudentCompanion  6 років тому +2

      It means you didn't understand what interrupts are, an interrupt is triggered by an event. For external interrupts as the name suggests must be triggered by an external stimulus on PORTB. a condition can't trigger an interrupt.
      There are other types of interrupts like timer interrupts triggered when timer overflow, ADC interrupts, USART interrupts....

    • @recklessanil
      @recklessanil 6 років тому +1

      Thank you I got it! And do you have any suggestion of optimal interrupt types for my situation as well, sir? I think the timer interrupt doesen't work for me because the period of interrupts depends on the user's control.

    • @StudentCompanion
      @StudentCompanion  6 років тому +2

      What do you want to achieve with the interrupt? What action will the interrupt service routine handle? Maybe you won't even need an interrupt in your scenario.
      Why do you need an interrupt?
      Did you watch to the end this video to understand why we need interrupts?

    • @recklessanil
      @recklessanil 6 років тому +1

      Sir, first I need to indicate that use of interrupt is a must for me unfertunately in my scenario. I'm making an rc controlled car, with an ultrasonic range finder on it measuring the distance. And when the rc car come across an obstacle at a predetermined distance (so the interrupt depends on the "distance" variable in scenario), the interrupt will be invoked and the rc car will stop itself, or you could say it'll cancel the user control.
      I need that kind of interrupt which can be triggered by a value in the scenario.
      I'll be so thankful if you can help me about it sir.

    • @StudentCompanion
      @StudentCompanion  6 років тому +2

      How is your ultrasound connected to your PIC? Or your RC control how is connected? You can raise a peripheral interrupts then in the interrupt service routine you can check your distance and do what you want to do.
      Watch this peripheral interrupt video to learn more: ua-cam.com/video/Q8K_kK4cS1o/v-deo.html

  • @binaryprotrader3871
    @binaryprotrader3871 6 років тому +1

    This is good , please how do I used interrupt to control automatic change over switch, I am trying to write the code but is hard for me, I need your help. thanks

    • @StudentCompanion
      @StudentCompanion  6 років тому +1

      What do you mean by automatic change over switch?

    • @binaryprotrader3871
      @binaryprotrader3871 6 років тому +1

      @@StudentCompanion Automatic changeover control system whereby if there is NEPA light then it Will change over automatically and once generator is ON then it change over automatically, while the generator is still working maybe NEPA light came it change over automatically to NEPA light. How can I used interrupt to write the code.

    • @StudentCompanion
      @StudentCompanion  6 років тому +1

      When you explain something to people always try to minimise the use of abbreviations unless they are widely used and understood by everybody. What is NEPA light?

    • @binaryprotrader3871
      @binaryprotrader3871 6 років тому +1

      @@StudentCompanion NEPA light is Electricity but do you understand my question? Thanks

    • @StudentCompanion
      @StudentCompanion  6 років тому +1

      No. I don't understand your question.

  • @envisionelectronics
    @envisionelectronics 6 років тому +1

    The audio stops at 7:45

    • @StudentCompanion
      @StudentCompanion  6 років тому +1

      I also checked with mobile phone, the audio stops at 7:45 but when checked on UA-cam with a computer, the sound was fine throughout the whole video. The problem seems form UA-cam and not form the video itself. We will try to find out from their support. Thanks for letting us know.

    • @StudentCompanion
      @StudentCompanion  6 років тому +1

      Where you watching on mobile phone as well or on computer? If mobile phone, is it android or IOS?

  • @hashirali9272
    @hashirali9272 5 років тому +1

    THANKS

    • @StudentCompanion
      @StudentCompanion  5 років тому +2

      You are welcome! Thanks for watching our videos