1 Reply Latest reply on Apr 3, 2018 9:21 PM by BoTa_264741

    PSOC 5lp BPM Interrupt Question

      Hey guys,

      I am working on a project where the PSOC 5LP will generate an accurate interrupt in beat with some music. I am struggling with generating a consistent interrupt that will not stray with time... Inside the interrupt handler will be some code to control some motors


      So far I am using a timer connected to a 12MHz PLL clock to generate the interrupt on overflow. The timer is set on continuous with a UDB implementation (fixed does not have resolution big enough to handle slower BPMs)


      I am also struggling with altering the period of the timer dynamically... I have tried this:


      period = (60*CLOCK_BPM_FREQ)/BPM //  CLOCK_BPM_FREQ is the frequency of the timers clock (12000000) and BPM periodically.






      Any ideas on how to solve these problems would be much appreciated!!


      Happy Holidays