Quantcast
Channel: Microcontrollers
Viewing all articles
Browse latest Browse all 4924

Strange interrupt behavior. XC8 V2.0 PIC16F1619

$
0
0
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.

Code (Text):
  1.  
  2.  
  3. run_duration = 0;                                           // reset run_duration
  4. T1CONbits.TMR1ON = 1;                              // turn on timer1
  5. while(run_duration <= pwm_run_time);            // hang out here until the duration is up....
Strange interrupt behavior. XC8 V2.0 PIC16F1619

Viewing all articles
Browse latest Browse all 4924

Trending Articles