LCD Bargraph with different styles: Unterschied zwischen den Versionen
Aus ProjectWiki
Mat (Diskussion | Beiträge) |
Mat (Diskussion | Beiträge) |
||
Zeile 45: | Zeile 45: | ||
== What it looks like == | == What it looks like == | ||
+ | Use | ||
+ | <pre>Const Lcd_bar_style = [Style]</pre> | ||
+ | with one of the styles listed below: | ||
− | + | [[File:Lcd_bar_styles.jpg|Bar styles]] | |
− | |||
− | + | == Download == | |
− | + | [http://www.braunecker.at/downloads/lcd_bar_1_0.zip Download (.zip)] | |
− | |||
− | |||
− | |||
− | |||
− |
Version vom 31. Mai 2011, 19:23 Uhr
Inhaltsverzeichnis
How to use it
In the top of your main program, just add these lines:
Const Lcd_bar_style = [Style] $include "lcd_bar.bas"
To draw the Bargraph on the LCD:
Locate [x] , [y] Lcd_bar [value] , [x-size]
Sample
Main File:
$regfile = "m32def.dat" $crystal = 16000000 $hwstack = 32 $swstack = 16 $framesize = 32 $sim Config Lcd = 16 * 2 Const Lcd_bar_style = 1 $include "..\inc\lcd_bar.bas" Dim Value As Byte Cls Do Locate 1 , 1 Lcd_bar Value , 5 Value = Value + 1 If Value = 101 Then Value = 0 'Waitms 50 Loop End
This simply draws a bar at the position [1, 1] and sweeps from 0-100%.
What it looks like
Use
Const Lcd_bar_style = [Style]
with one of the styles listed below: