Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int count;
- /*
- ===========================================
- ============= ISR FOR WAVES ===============
- */
- void __ISR( _TIMER_2_VECTOR, ipl4) T2Interrupt( void)
- {
- if(triangle)
- //do nothing
- else if(square)
- OC5RS = (count < 22) ? PR2 : 0;
- else if(exp)
- OC5RS = pow(2,count);
- else if(sin)
- OC1RS = Table[ count++];
- count++;
- if ( count >= 44)
- count = 0;
- // clear interrupt flag and exit
- mT2ClearIntFlag();
- } // T2 Interrupt
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement