Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Interrupts with PIC18F4550

Jtomas

New Member
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.
 
 
Vladimir has an interrupt example

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
 
I have this old simulation practice on the 2550, I'll leave you the codes in case it helps.

Interrupts RB2-0.jpg
 

Attachments

  • _FuncionesPic18F2550.bas
    25 KB · Views: 6
  • Practicas Interrupcion Exterior RB0_INT0 Pic18F2550.bas
    1.8 KB · Views: 6
Last edited:

Latest threads

Back
Top