Page 1 of 1

custom timer1 not work

Posted: Fri Oct 27, 2017 7:36 am
by Francisco Cabrera
Hi friends, the option custom timer1 something is badly because it does not work, they can help me, thank you.

Re: custom timer1 not work

Posted: Fri Oct 27, 2017 11:19 am
by Benj
Hello,

In your interrupt handler you currently have this.

Code: Select all

if (pir1 y (1 << TMR1IF))  
this should instead be like this.

Code: Select all

if (pir1 & (1 << TMR1IF))  

Re: custom timer1 not work

Posted: Fri Oct 27, 2017 12:31 pm
by Francisco Cabrera
Thank you bemg for answering, I have modified the mistake, and the interruption does not work.... :(
Do you see well everything else? .... if I fit interruption tmr1 without being custom, in the same program it works perfectly simulating in flowcode

regards

Re: custom timer1 not work

Posted: Fri Oct 27, 2017 1:20 pm
by Benj
Hello,

Custom interrupts will not simulate as they could be an interrupt for anything, they will only work on the hardware. Have you tested on hardware?

Re: custom timer1 not work

Posted: Fri Oct 27, 2017 1:26 pm
by Francisco Cabrera
no benj, :shock: Only I have simulated it in flowcode, Then this it is the problem .... thank you very much for your help :D