News:

;) This forum is the property of Proton software developers

Main Menu

Interrupt

Started by Ivano, Dec 19, 2025, 10:14 PM

Previous topic - Next topic

Ivano

Good evening, I'm working with a PIC 18F46k42. By enabling the various registers that enable the interrupt with timer 0, when I also enable timer 0, the program resets after 2-3 seconds.
If I enable timer 0 without enabling its interrupt (PIR3.7), it counts and doesn't reset, but obviously the ISR doesn't work. The reset occurs when both the timer and interrupt enable are enabled. The same thing happens when using timer 1. Has this happened to anyone?

charliecoutas

It sounds like the Watch Dog Timer is causing this. In the config section check this:


   WDTEN = off                                   ;Watch dog timer disabled
   WDTPS = 2048                                  ;

Charlie

Ivano

Good morning, I solved it.
I disabled the WDT because I thought it was due to this. In Word configuration, I set MVECEN = off.
I disabled multi-vector and now it works.
Thanks anyway.
Ivano