21- Interrupts, part 1: External Interrupt | Flowcode Beginners Tutorial

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

КОМЕНТАРІ • 24

  • @StudentCompanion
    @StudentCompanion  3 роки тому +1

    Get 20% OFF when you buy or upgrade Flowcode (any Packs) by using this discount code: SComp20
    at Checkout: www.flowcode.co.uk/buy/?
    Contact us for more information

  • @fouzaialaa7962
    @fouzaialaa7962 6 років тому +4

    excellent as always .....im very happy to see your videos again ....very informative

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

      Thank you for your feedback. Much appreciated.

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

    Great! Easy, wonderful demonstrations. Thank you very much

  • @santanugoswami5531
    @santanugoswami5531 6 років тому +4

    Great video

  • @Steve_be
    @Steve_be 6 років тому +4

    Thanks for making the time to share your know how, with us, I appreciate it. Steve

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

      You are welcome. Your feedback is highly appreciated. Thanks a lot.

  • @segarlinktech
    @segarlinktech 6 років тому +4

    Dear Sir ,Student Companion this video you made really very helpful and understand of function interrupt. My request to you if possible can you make one more video for the Calculation and Simulation function is will helpful to new programmer . Thank you Very Much

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

      Thank. Your feedback is always appreciated. Can you clarify more about your request. What do you mean by calculation and simulation? We always simulate in Flowcode. And use the calculation icon like in the digital thermometer tutorial.
      Thanks

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

    Thank you.

  • @kennany8
    @kennany8 6 років тому +4

    good day
    so I have question
    +can use your interruption {input------->B0} for do mute(Silence) for Buzzer connecting to B7
    ,Knowing there are 3 sensor (or Buttons) interfacing port D
    the Buzzer run when any Button pressed
    so I need the Buzzer Silence even or wait the pressed button is open or 3 buttons
    ???can Do it By flowcode ***///
    best regards
    yasser

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

      Yes if i heard your question correctly. An Interrupt will take priority. Evenif your buzzer is making sound, even if there is a delay running. In the interrupt macro you can silence the buzzer and do other things you like.

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

    I need a little help. I need to make a digital clock on pic 16f877a which has an external oscillator of 20mhz. But using this doesn't provide the exact frequency for timer1. So a 32khz crystal is used on t1clk pin . But the interrupt frequency do not change and i can't get a exact value. So how to use a timer crystal for timer1 for a pic which alrady has an external oscillator??

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

      Hi. You can follow the example supplied by Matrix. Download the components examples at: www.matrixtsl.com/flowcode_help/help_examples.php
      Open the LCD examples, there is an example of a digital clock using timer which can basically fulfill your requirements.

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

      Student Companion thank you sir. But my problem is a bit different. I have already build the logic for a digital clock in flowcode 6. But i can't get exact interrupt frequency of 150hz to count 1 sec as i don't have 19.66Mhz crystal. My only option is to use the 32khz Crystal as a secondary oscillator Following you tutorial at www.google.co.in/amp/s/www.studentcompanion.co.za/digital-clock-using-pic-microcontroller-interrupt-xc8/amp/. I can see that you are using the internal 8Mhz crystal and also the 32khz as a secondary oscillator for the timer. Can you give a little insight as to how to implement it in flowcode. Thank you.

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

      Hi. Please ask your questions in the forum on our website for better support: www.studentcompanion.co.za/forums/

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

      Hi. Sorry for the late reply.
      For you to build a clock, any crystal frequency can be used whether internal or external depending on your need and understanding the advantages of ones vs the others.
      Interrupts occurs when the timer overflows. A count is made internally based on clock inputs (clock input can be internal or external) and the pre-scaler property (A prescaler divides down the clock signals used for the timer giving reduced overflow rates. The rate can be set to a number of possible values. The exact values are chip dependent).
      When the count reaches a certain point it overflows back to 0 triggering an Overflow event. This event can then be used to call a macro. Timer overflow interrupts are called repeatedly at the Interrupt time interval making them very useful for time based events.
      The exact properties available for a timer interrupt are device and timer dependent. As such the timer overflow dialogs may vary from device to device and from timer to timer.
      As I already replied to you, there is an example of a software clock using timer0 in Flowcode LCD component examples.
      They are using Timer0, Clock source Internal Oscillator, Prescaller: 1:128 giving an interrupt frequency of 150Hz, as time is the inverse of frequency, to get 1 second or 1 Hz, they count each time an interrupt as occurs until this counter =150 to get 1 second. Once you have 1 Second, you have your time base for your clock. Instead of getting 150 Hz for 1 second, your frequency will be different as it's depend on the clock used and also the PIC you are using.
      You can follow the same procedure but instead of using timer 0, use timer 1. In Flowcode, once you select Timer 1 from the Timer icon properties, you have option to select your clock source between Transition between T1CK1 pin, Internal clock (Fosc/4), Internal Clock (Fosc) and of course 32.768KHz XTAL T1CK1/T1CK0
      Why chose external vs internal?
      There are many advantages of using external clock for time based compared to internal clock. You can google to learn more, but usually external clocks are more precise and temperature tolerant better than using internal clocks. This will help you not to lose more seconds per day thus making your clock precise.
      Why use the 32.768KHz?
      The frequency 32768 Hz (32.768 KHz) is commonly used, because it is a power of 2 (215) value. And, you can get a precise 1 second period (1 Hz frequency) by using a 15 stage binary counter.
      As current consumption has to be as low as possible to preserve battery life. The low the frequency the low the current consumption. So, this frequency is selected as a best compromise between low frequency and convenient manufacture with market availability and real estate in term of physical dimensions while designing board, where low frequency generally means the quartz is physically bigger.

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

    Thanks allot for your hard work teaching us.But Please please help us and make video on how to fully use eeprom in flowcode v5 sothat we can learn how to use it in our projects like storing passwords in eeprom and use them even if power is switched off

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

      We will but not now. We have a list of tutorials we will upload before that one. Please not we no longer fo videos with Flowcode v5 because there are new versions now with more features than v5 like v6 and the current v7. But as you know with Flowcode if you can do it with v7 it won't be difficult to do it with v5. The code icons are the same. If you found problems to follow the tutorial with Flowcode v5, write a question in comments we will try to assist you.