void interrupt ISR(void) {
if (IOCAF) { //SW1 was just pressed
IOCAF = 0; //must clear the flag in software
__delay_ms(5); //debounce by waiting and seeing if still held down
if (SWITCH == DOWN) {
_direction ^= 1; //change directions
}
}
if (INTCONbits.T0IF) { // When Timer 0 rolls over, rotate the LED
INTCONbits.T0IF = 0;
if (_direction == LED_RIGHT) {
LATC >> = 1; //rotate right
if (STATUSbits.C == 1) //when the last LED is lit, restart the pattern
LATCbits.LATC3 = 1;
} else{
LATC << = 1; //rotate left
if (LATCbits.LATC4 == 1) //when the last LED is lit, restart the pattern
LATCbits.LATC0 = 1;
}
}
}
新人新接触PIC
这个是一段示例程序,但是我把<xc.h>里所有包含了的头文件找了一次 没有发现对 interrupt ISR的描述,也没发现中断向量表。请问PIC16F1825单片机中断向量表在哪里找?
|