336x280(권장), 300x250(권장), 250x250, 200x200 크기의 광고 코드만 넣을 수 있습니다.
https://electrosome.com/interrupt-pic-microcontroller/
void main() { TRISC = 0; // To configure PORTC as output port OPTION_REG.INTEDG = 1; // Set Rising Edge Trigger for INT INTCON.GIE = 1; // Global Interrupt Enable INTCON.INTE = 1; // INT Enable while(1) { PORTC = 0x00; //Set some value at PortD }
} void interrupt() // ISR { INTCON.INTF=0; // Clear the interrupt 0 flag PORTC=~PORTC; // Invert (Toggle) the value at PortD Delay_ms(1000); // Delay for 1 sec }