Sylvio,
This may sound silly, but are you sure it's a 20mhz crystal?
A 4mhz crystal with that Timer1 reload value would give ~870 hz.
<br>
Sylvio,
This may sound silly, but are you sure it's a 20mhz crystal?
A 4mhz crystal with that Timer1 reload value would give ~870 hz.
<br>
DT
That's why I said you're program probably needs to be reworked.
It's spending too much time inside the 'flag if/then' updating the values, therefore it appears to not be interrupting fast enough, when it's actually trying to get everything done that you want it to do. There's just not enough instruction cycles left between interrupts to get that update accomplished.
(let's see if anybody gets this reference)
I guess you could call it a 1201 or a 1202 Program Alarm.
I don't know Sylvio,
I'm running it here and I don't see the same problem.
But then, I've got a 16F887. Apples and Oranges...
Timer1 runs at 4khz, and the IF block executes once after each FLAG, so it runs at 4khz too.
The whole "block" including the LOOKUP and SAIDA: takes about 70us, so it's not taking too long.
Unless there's something in the part of the program that wasn't posted. I'm stumped.
<br>
DT
Maybe a difference or two (bug fix?) in an older version vs. newer version of the 'Instant Interrupts' related to the timers?
I've been using this one:
Is there an update?Code:'**************************************************************** '* Name : DT_INTS-14.bas * '* Author : Darrel Taylor * '* Version : 0.93 BETA * '* Date : JAN 29, 2006 * '**************************************************************** '* Rev 0.93 Fixed CMIF and EEIF problem with older PIC's * '* that have the Flags in PIR1 instead of PIR2 * '* Rev 0.92 solves a "Missed Interrupt" and * '* banking switching problem *
Sylvio,
.93 is the current version for the 14-bit pics.
Do you have a CLEAR statement at the TOP of your program?
<br>
DT
Bookmarks