Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void interrupt tc_int(void) // High priority interrupt
- {
- if (TMR1IE && TMR1IF)
- {
- TMR1IF=0;
- ++tick_count;
- TRISC=1;
- LATCbits.LATC4 = 0x01;
- }
- }
- void interrupt low_priority LowIsr(void) //Low priority interrupt
- {
- if(INTCONbits.T0IF && INTCONbits.T0IE) // If Timer flag is set & Interrupt is enabled
- {
- TMR0 -= 250; // Reload the timer - 250uS per interrupt
- INTCONbits.T0IF = 0; // Clear the interrupt flag
- ADCON1=0x0F;
- TRISB=0x0CF;
- LATBbits.LATB5 = 0x01; // Toggle a bit
- }
- if (TMR1IE && TMR1IF)
- {
- TMR1IF=0;
- ++tick_count;
- TRISC=0;
- LATCbits.LATC3 = 0x01;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement