Not An Interrupt to be Seen

(instructions, reset, WDT, specifications...) PIC17Cxx, PIC18Fxxx

Re: Not An Interrupt to be Seen

Postby Ian.M » Wed Jun 11, 2014 10:50 pm

I regard it as good practice to set everything up for a feature or peripheral before enabling it.

Therefore:
* setup peripherals and I/O,
* set up the interrupt sources,
* set up INTCON with the GIE bit clear,
* do whatever it takes to acknowledge and clear the interrupt flags for any enabled interrupts to avoid spurious interrupts from the peripheral initialisation or from pins that are still settling after powerup
* finally set (GIE with BSF INTCON,GIE) immediately before entering the main superloop.
Ian.M
Verified identity
 
Posts: 95
Joined: Wed May 28, 2014 12:47 am
PIC experience: Professional 1+ years with MCHP products

Re: Not An Interrupt to be Seen

Postby SLTom992 » Mon Jun 23, 2014 6:22 pm

I should have added that I took your advice.
SLTom992
 
Posts: 58
Joined: Tue Jun 10, 2014 8:59 pm
PIC experience: Professional 1+ years with MCHP products

Previous

Return to 16-Bit Core

Who is online

Users browsing this forum: No registered users and 8 guests

cron