10 Replies Latest reply on Oct 18, 2014 1:50 PM by user_14586677

    A problem with ISRs

    mahmoud.athab

       Hi, I am building a simple digital piano for my little sister. Nothing serious, just some bush buttons connected to intterupts, when a button is pressed the intterupt writes a value to a control register. the control register works as a select signal for a mux. the mux inputs are differnet clocks which serve as the piano tunes.

         

      Now, the hardware is connected perfectly, every intterupt triggers perfectly, so here is the weird part:

         

      When I press the first bush button, which is the tune A, everything works as it should, the intterupt triggers, the control register is written, then the return statement is excuted which brings the program back to main.

         

      when I press the second bush button, the intterupt triggers, the control register is written, but the return statment is IGNORED. the program just keeps going to the next ISR where the its return statment is also ignored, and the next and the next until it creats an infinte loop outside of main.

         

      I have uploded the project on two links if you care to shed some light on this problem.

         

      http://www.mediafire.com/download/sp7z1hvm2ccu3eh/Simple_Piano_Using_Square_Waves.Bundle01.zip

         

      https://drive.google.com/file/d/0BwvX4pp-M0KyNzlqY00yWUZzOGc/view?usp=sharing