Menu

Task_Switcher_Library

Help
Gigi
2018-02-17
2018-02-18
  • Gigi

    Gigi - 2018-02-17

    I'm trying to use this library: Time_Based_Task_Switcher_Library001.h , very well done and useful, only that while using the Timer0, present in all PIC, requires a POST_SCALER that is not present in many PICs. Could it be modified to make it usable for all PICs?
    Thank you

     
    • Anobium

      Anobium - 2018-02-17

      I think if you look at the 002 .h file you can remove the dependency postscaler.

       
  • Gigi

    Gigi - 2018-02-18

    Anobium I thank you for the quick response, you're right the 002.h file is for me, everything works perfectly. I have only one last question and possible to temporarily stop the Task Interrupt, example Run_Task1 and reactivate it later?

     
  • Anobium

    Anobium - 2018-02-18

    This is documented in the Help. See http://gcbasic.sourceforge.net/help/_on_interrupt.html

    When you want to stop add

            On Interrupt Timer0Overflow Ignore              'pic
            On Interrupt Timer0Match1 Ignore                'avr
    

    then, to restart, add

            On Interrupt Timer0Overflow Call Interr_Timer0   'pic
            On Interrupt Timer0Match1 Call Interr_Timer0     'avr
    
     

    Last edit: Anobium 2018-02-18

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.