I have found this code , but i don't understand that.
If some know how to work , please to explain;
Code:value var Word fullbars VAR BYTE ' Number of full bars at left of graph barval VAR BYTE ' Value passed to bargraph routine partbar VAR BYTE ' ASCII code for partial bar character pad VAR BYTE ' Number of spaces to pad to the right of graph LCDOut $FE,64,REP $0\8 ' Load blank character (ascii $0) LCDOut $FE, 1 ' Clear the display barval = (value/9)+1 ' Scale 0-500 to 60 segment bargraph (1-56) fullbars = (barval MIN 60)/3 ' Calculate number of full bars (|||). ' partbar holds the ascii code for the partial bar character: $0=" ", $1="|", or $2="||" partbar = (barval MIN 60)//3 ' Calculate ascii code for partial bar character pad = 19 - fullbars ' Number of spaces to fill display width. LCDOut $FE,$D0,"VU: ", REP $3\fullbars, partbar, REP " "\pad




Bookmarks