I found out how to add variables to my macro, so now using the include file, you can print any variable to the lcd by using:
@ PrintVar x,y, _anyvariablehere
(instead of loading a specific variable , then using @ PrintVar that I had before). Small change, but I figured it might help someone.
Here is the segment of the macro that is part of the lcd_3310v31 include file (attached).
Code:'@ PrintVar macro function 'format should look like this: @ PrintVar x,y, _anyvariable ASM PrintVar macro x, y, Variable ;input values from: @PrintVar 0,1, _any_variable local OverVar goto OverVar OverVar MOVE?CB x, _PosX ;move x from above statement to PosX MOVE?CB y, _PosY ;move y from above statement to PosY MOVE?WW Variable, _VarData ;move variable in statement to VarData L?CALL _VariableOut ;call VariableOut function endm ENDASM VariableOut: @ bcf _digits for n = 4 to 0 step -1 'cycles through all possible digts of number Gosub Lcd_GotoXY 'place character at position PosX and PosY Lcd_Data = (VarData dig n) + 48 'digit number n to character str format if Lcd_data = 48 and digits = 0 then SkipChar 'skip if first char is 0 @ bsf _digits ;show that one character has been printed gosub Lcd_SendChar 'print char to screen PosX = PosX + 6 'next x position for character SkipChar: next n return




Bookmarks