Interrupts in MSP430

Поділитися
Вставка

КОМЕНТАРІ • 12

  • @jmachorrov
    @jmachorrov Рік тому +1

    very good job i have seen many of them

  • @m.albert482
    @m.albert482 2 роки тому +4

    I am interested in using an interrupt to define intervals to do two actions, like measure an ADC value, or change the duty cycle of a PWM(to ramp motor speed). I'd like to do each action at separate frequencies. It seems like using a timer interrupt and using the compare mode may be appropriate. For example if I wanted to do action1 every 7ms and action2 every 13ms can I do this within one timer?

    • @drselim
      @drselim  2 роки тому +2

      Hi, I’ m not sure if you can read the adc value in an interrupt since adcmem value is read while adc10 is not busy (pls check the adc video and code: while(ADC10CTL1 & ADC10BUSY);)
      Regarding generating two interrupts with a timer it should be possible. If you select your clock speed and taccr0 and taccr1 values accordingly. You should also be careful with the mode you’re using (up, up down, continuous) . I had tried to give information on those (timers) in the hcsr04 video.

  • @dsvignesh1523
    @dsvignesh1523 Рік тому

    how the interrupt is called?
    what is the purpose of the function _enable_interrupt?

    • @drselim
      @drselim  Рік тому +1

      Your questions are already answered in the video.

  • @temmuzboyraz3086
    @temmuzboyraz3086 Рік тому

    Hocam merhaba msp430f5529 kartını kullanıyorum. Pinlerden birindeki voltaj seviyesine göre interrupt almak istiyorum .İnterrupt dışında ise işlemciyi uyutmak istiyorum teknik olarak bu mümkün müdür? Pin üzerinde yeterli voltaj sağlandığında interrupt üreten bir kod örneği mümkünse paylaşabilir misiniz?

    • @drselim
      @drselim  Рік тому +1

      Merhaba, pil ile olan uygulamalarda (özellikle coin cell) bahsettiginiz sekilde kullanım yaygın. Asagidaki linkteki dokumani inceleyebilirsiniz. Gayet duzgun bir sekilde anlatilmis. While(1) loop icerisinde islemciyi ihtiyaciniza gore bir low power mode'a sokacaksiniz, ardindan ISR icerisinde dilediginiz islemi yaptirip low power mode'dan cikarip yine loop'ta low power mode'dan sonraki satirlara gideceksiniz. Dokumanda ornekler mevcut. Kolay gelsin.
      www.ee.hacettepe.edu.tr/~alkar/ELE417/Week7_lpm.pdf

    • @temmuzboyraz3086
      @temmuzboyraz3086 Рік тому

      @@drselim ilginiz için teşekkür ederim.

    • @drselim
      @drselim  Рік тому

      @@temmuzboyraz3086 Rica ederim, iyi calismalar.

    • @serifekucukkosker9435
      @serifekucukkosker9435 Рік тому

      @@drselim teşekkürler hocam

    • @drselim
      @drselim  Рік тому

      @@serifekucukkosker9435 rica ederim