
Originally Posted by
CocaColaKid
Would you be able to help with the ASM part of it as it is for the most part greek to me.
That's too bad....
ASM is the Best part of Picbasic Pro. 
Learning one without the other is like buying a space shuttle without the solid rocket boosters.
It looks nice, but it's not going to take you where you want to go. <hr>
Ok, here ya go.
The Elapsed Timer for use with Timer 2.
Code:
<font color="#0000FF"><b><i>; Initialze your hardware and LCD first
</i></b></font><font color="#008000"><b>INCLUDE </b></font><font color="#FF0000">"DT_INTS-14.bas" </font><font color="#0000FF"><b><i>' Required
</i></b></font><font color="#008000"><b>INCLUDE </b></font><font color="#FF0000">"Elapsed-T2.bas" </font><font color="#0000FF"><b><i>' Elapsed Timer for TMR2
</i></b></font><font color="#008000"><b>ASM
</b></font><font color="#000080">INT_LIST macro </font><font color="#0000FF"><b><i>; IntSource, Label, Type, ResetFlag?
</i></b></font><font color="#000080">INT_Handler TMR2_INT, _ClockCount, ASM, yes
endm
INT_CREATE </font><font color="#0000FF"><b><i>; Creates the interrupt processor
</i></b></font><font color="#000080">INT_ENABLE TMR2_INT </font><font color="#0000FF"><b><i>; Enable TMR2 Interrupts
</i></b></font><font color="#008000"><b>ENDASM
GOSUB </b></font><b>ResetTime
</b><font color="#008000"><b>GOSUB </b></font><b>StartTimer
Main</b>:
<font color="#008000"><b>IF </b></font><b>SecondsChanged </b>= <font color="#800000"><b>1 </b></font><font color="#008000"><b>THEN
LCDOUT </b></font><font color="#800000"><b>$FE</b></font>,<font color="#800000"><b>2</b></font>, <font color="#008000"><b>DEC </b></font><b>Days</b>,<font color="#FF0000">"d-"</font>,<font color="#008000"><b>DEC2 </b></font><b>Hours</b>,<font color="#FF0000">":"</font>,<font color="#008000"><b>DEC2 </b></font><b>Minutes</b>,<font color="#FF0000">":"</font>,<font color="#008000"><b>DEC2 </b></font><b>Seconds
SecondsChanged </b>= <font color="#800000"><b>0
</b></font><font color="#008000"><b>ENDIF
GOTO </b></font><b>Main</b>
Bookmarks