...well I am getting closer to the numbers I am expecting but...
My values were 1001 and 4206 so it took 3205 to perform LCDOUT.
Then I restarted the timer just before the last LCDOUT and added this to your code and got a value of 7405
T1CON.0=0 ' Stop the timer
temp.HighByte=TMR1H
temp.LowByte=TMR1L
LCDOUT $FE,$80,"TMR1 = ", dec temp
So the second time LCDOUT executed it took 3199
I did it a third time and found a different number again.
So LCDOUT executed 3 times and it took less time everytime it executed.
1st time took 3205
2nd time took 3199
3rd time took 3187
I figured writting to the LCD on a blank line took 3205
overwriting on the first line of the LCD took 3199
and overwritting on the second line took 3187
But I did it a fourth time (overwrote on the first line) and it took 3312
This is the code I ended up with:
Code:
temp VAR word
TMR1H=0 ' Reset timer value
TMR1L=0
T1CON.0=1 ' Start the timer
pauseus 1000
T1CON.0=0 ' Stop the timer
temp.HighByte=TMR1H
temp.LowByte=TMR1L
T1CON.0=1 ' Restart the timer
LCDOUT $FE,$80,"TMR1 = ", dec temp
T1CON.0=0 ' Stop the timer
temp.HighByte=TMR1H
temp.LowByte=TMR1L
T1CON.0=1 ' Restart the timer
LCDOUT $FE,$C0,"TMR1 = ", dec temp
T1CON.0=0 ' Stop the timer
temp.HighByte=TMR1H
temp.LowByte=TMR1L
T1CON.0=1 ' Restart the timer
LCDOUT $FE,$80,"TMR1 = ", dec temp
T1CON.0=0 ' Stop the timer
temp.HighByte=TMR1H
temp.LowByte=TMR1L
T1CON.0=1 ' Restart the timer
LCDOUT $FE,$C0,"TMR1 = ", dec temp
T1CON.0=0 ' Stop the timer
temp.HighByte=TMR1H
temp.LowByte=TMR1L
LCDOUT $FE,$80,"TMR1 = ", dec temp
This beeing said, if I start over from the begining, no matter how many times I am always getting the same results so this rules out a bad resonator or voltage noise or any othe hardware issue.
So there is something in the process that is hapenning which is irregular and I wish I could understand what it is!
I am really sorry to be such a pain and I appreciate your patience but I am still a little confused.
Mike
Bookmarks