SHARE
TWEET

Untitled

a guest Nov 16th, 2019 67 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. static unsigned char counter=0;
  2.  
  3. void __interrupt() INTERRUPT_InterruptManager (void)
  4. {
  5.     if(PIE4bits.TMR2IE == 1 && INTCONbits.PEIE == 1 && PIR4bits.TMR2IF == 1)
  6.     {
  7.         PIR4bits.TMR2IF = 0; // Clear IF
  8.         if(counter==4)
  9.             counter=0;
  10.  
  11.         LATC = (1 << (4+counter)) | (LATC & 0x0f);
  12.  
  13.         counter+=1;
  14.     }
  15. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top