I'm having a strange problem I can't wrap my head around. It's easiest to explain with some code first.
Here is a while loop that I want to use to keep the software at a certain point while my timer ISR increments a counter.
Strange interrupt behavior. XC8 V2.0 PIC16F1619
Here is a while loop that I want to use to keep the software at a certain point while my timer ISR increments a counter.
Code (Text):
- run_duration = 0; // reset run_duration
- T1CONbits.TMR1ON = 1; // turn on timer1
- while(run_duration <= pwm_run_time); // hang out here until the duration is up....