Hello everyone,
I'm trying to configure the PIC 18F4550 with PIC SIMULATOR IDE and I can't get it to work. I need to use external interrupts via INT0, INT1, and INT2. I'm sure I'm not configuring the interrupt registers correctly. Can you send me a simple example that might help?
Best regards and thanks.
Interrupts are special events that require immediate attention. They cause the processor to cease the running task to serve a special task for which the
The external interrupt is a mechanism for devices that interrupts the controller to get the attention of the controller. Here we are going to toggle LED using a switch as an external interrupt.
All you need to do is modify for each interrupt.
If you have multiple triggers then determine each in turn like this.
Code:
On Interrupt
If INT0IF then 'int0 flag
' do int 0 stuff
endif
If INT1IF then ' int 1
' do int 1 stuff
endif
If INT2IF then ' int 2
' do int 2 stuff
endif
Resume