jaco1982
Newbie level 4
Problems with external interrupt (PIC18F4553)
I'm having some issues getting an external interrupt (INT0) to work on a PIC18F4553. The code is written in MikroC, and I'm running a simulation in Proteus. When the external interrupt is triggered, nothing happens. Cam someone please see what I am missing?
Code:
Schematic:
I'm having some issues getting an external interrupt (INT0) to work on a PIC18F4553. The code is written in MikroC, and I'm running a simulation in Proteus. When the external interrupt is triggered, nothing happens. Cam someone please see what I am missing?
Code:
Code:
void interrupt() {
PORTC.F1 = 1;
}
void main() {
TRISB = 0xFF; // All port B pins are configured as inputs
TRISC = 0x00;
PORTC = 0x00;
INTCON.GIE = 1;
RCON.IPEN = 0;
INTCON.INT0IE = 1;
INTCON.INT0IF = 0;
INTCON.PEIE = 1;
INTCON2.INTEDG0 = 1;
while(1){
PORTC.B0 = 1;
}
}
Schematic:
Last edited: