No, I have no idea what you are doing.
If you're using a timer, why do you need pauses?
What frequency are you trying to run the timer at?
What frequency is your primary oscillator?
What PIC are you using?
<br>
No, I have no idea what you are doing.
If you're using a timer, why do you need pauses?
What frequency are you trying to run the timer at?
What frequency is your primary oscillator?
What PIC are you using?
<br>
DT
I use one 16F877 MCU to 20 Mhz
TMR1 produce an interrupt every 0,4 µSec
for to drive four 7 segment displays (prescaler:1)
My board developpement is EasyPic4
If I write not a Pause after TMR1H %11111111
then the displays don't work
At 4Mhz, each instruction takes 1 uSec to execute.
At 20Mhz, each instruciton takes .2 uSec to execute.
When you take in to account the fact that each jump/return to/from the interrupt handler takes at minimum 4 instructions cycles (2 for the jump into the int handler, 2 for the RETFIE after the handler), which happens to be .8uSec, you have less than ZERO time to do anything.
Even at 40Mhz, you're still at ZERO time left over.
At 48Mhz, you might get one instruction in here and there...
And even at 64Mhz, you probably won't get more than one or two instructions done between interrupts.
I think it is better to post the details of your project so that you could get a decent help. And the .4usec to drive a LED display, to me seems too little time.
Ioannis
Thank's for your explanation it's clear now
I reduced the value preloaded in TMR1
and he works fine without "pause"
Hello,
I've been reading through the posts regardings the Instant interrupts.
I'm still a little confused on the usage or setting of the ResetFlag.
Maybe I overlooked it in the posts but I did not find any info on this.
In some cases it is set to 'yes' but what is the influence.
--> ; IntSource, Label, Type, ResetFlag?
Can someone give me a little explanation on this?
Thank you.
Best regards,
If you set it to YES, you don't need to clear the interrupt flags manually, DT's INT will do it for you.
If you set it to NO, the program won't reset the interrupt flag, so you'll have to do it yourself. In case you don't, your program will always turn in round in your ISR.
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Bookmarks