LCDAT/de
m (1 revision) |
(→Anmerkungen) |
||
(4 intermediate revisions by one user not shown) | |||
Line 1: | Line 1: | ||
− | + | = <span class="f_Header">Funktion</span> = | |
− | + | Sendet eine Konstante oder Variable zu einem SED oder Grafik-Display. | |
<span style="font-family: Arial;"> </span> | <span style="font-family: Arial;"> </span> | ||
Line 17: | Line 17: | ||
<span style="font-family: Arial;"> </span> | <span style="font-family: Arial;"> </span> | ||
− | = <span class="f_Header"> | + | = <span class="f_Header">Anmerkungen</span> = |
<div style="padding: 0px; margin: 0px 0px 0px 4px;"> | <div style="padding: 0px; margin: 0px 0px 0px 4px;"> | ||
{| width="488" cellspacing="0" cellpadding="1" border="1" style="border: 2px solid rgb(0, 0, 0); border-spacing: 0px; border-collapse: collapse;" | {| width="488" cellspacing="0" cellpadding="1" border="1" style="border: 2px solid rgb(0, 0, 0); border-spacing: 0px; border-collapse: collapse;" | ||
Line 25: | Line 25: | ||
| valign="top" width="100%" style="width: 414px; border: 1px solid rgb(0, 0, 0);" | | | valign="top" width="100%" style="width: 414px; border: 1px solid rgb(0, 0, 0);" | | ||
− | X | + | X Position im Bereich von 0-63. Die Spaltenbreite (SE-Displays) beträgt 1 Pixel. Andere Displays können einen größeren Bereich umfassen, z.B. 132 oder 255. |
− | + | ||
|- style="vertical-align: top;" | |- style="vertical-align: top;" | ||
| valign="top" width="14%" style="width: 65px; border: 1px solid rgb(0, 0, 0);" | | | valign="top" width="14%" style="width: 65px; border: 1px solid rgb(0, 0, 0);" | | ||
Line 32: | Line 31: | ||
| valign="top" width="100%" style="width: 414px; border: 1px solid rgb(0, 0, 0);" | | | valign="top" width="100%" style="width: 414px; border: 1px solid rgb(0, 0, 0);" | | ||
− | Y | + | Y Position. Zeile in Pixel. Das Maximum ist abhängig vom Display. |
|- style="vertical-align: top;" | |- style="vertical-align: top;" | ||
Line 39: | Line 38: | ||
| valign="top" width="100%" style="width: 414px; border: 1px solid rgb(0, 0, 0);" | | | valign="top" width="100%" style="width: 414px; border: 1px solid rgb(0, 0, 0);" | | ||
− | + | Die anzuzeigende Variable oder Konstante. | |
|- style="vertical-align: top;" | |- style="vertical-align: top;" | ||
Line 46: | Line 45: | ||
| valign="top" width="100%" style="width: 414px; border: 1px solid rgb(0, 0, 0);" | | | valign="top" width="100%" style="width: 414px; border: 1px solid rgb(0, 0, 0);" | | ||
− | + | Optionaler Wert. Value = 0 für normale Darstellung. Jeder andere Wert invertiert die Daten. | |
|- style="vertical-align: top;" | |- style="vertical-align: top;" | ||
Line 52: | Line 51: | ||
<span style="font-family: Arial;"> </span> | <span style="font-family: Arial;"> </span> | ||
− | | valign="top" width="100%" style="width: 414px; border: 1px solid rgb(0, 0, 0);" | <p style="text-align: center;"><span style="font-weight: bold;"> | + | | valign="top" width="100%" style="width: 414px; border: 1px solid rgb(0, 0, 0);" | <p style="text-align: center;"><span style="font-weight: bold;">für COLOR DISPLAYS</span></p> |
|- style="vertical-align: top;" | |- style="vertical-align: top;" | ||
| valign="top" width="14%" style="width: 65px; border: 1px solid rgb(0, 0, 0);" | | | valign="top" width="14%" style="width: 65px; border: 1px solid rgb(0, 0, 0);" | | ||
Line 58: | Line 57: | ||
| valign="top" width="100%" style="width: 414px; border: 1px solid rgb(0, 0, 0);" | | | valign="top" width="100%" style="width: 414px; border: 1px solid rgb(0, 0, 0);" | | ||
− | + | Vordergundfarbe | |
|- style="vertical-align: top;" | |- style="vertical-align: top;" | ||
Line 65: | Line 64: | ||
| valign="top" width="100%" style="width: 414px; border: 1px solid rgb(0, 0, 0);" | | | valign="top" width="100%" style="width: 414px; border: 1px solid rgb(0, 0, 0);" | | ||
− | + | Hintergrundfarbe | |
|} | |} | ||
Line 71: | Line 70: | ||
<span style="font-family: Arial;"> </span> | <span style="font-family: Arial;"> </span> | ||
− | + | Die Bibliothek glibSED muss eingefügt werden mit : | |
+ | |||
$LIB "glibsed.lbx" | $LIB "glibsed.lbx" | ||
Line 77: | Line 77: | ||
<span style="font-family: Arial;"> </span> | <span style="font-family: Arial;"> </span> | ||
− | + | Andere Bibliotheken müssen mit anderen Direktiven eingebunden werden. | |
− | + | ||
<span style="font-family: Arial;"> </span> | <span style="font-family: Arial;"> </span> | ||
− | = <span class="f_Header"> | + | = <span class="f_Header">Siehe auch</span> = |
[[CONFIG LCD|CONFIG GRAPHLCD]] , [[SETFONT]], [[GLCDCMD]], [[GLCDDATA]] | [[CONFIG LCD|CONFIG GRAPHLCD]] , [[SETFONT]], [[GLCDCMD]], [[GLCDDATA]] | ||
Line 89: | Line 88: | ||
<span style="font-family: Arial;"> </span> | <span style="font-family: Arial;"> </span> | ||
− | = <span class="f_Header"> | + | = <span class="f_Header">Beispiel</span> = |
<br/><source lang="bascomavr"> | <br/><source lang="bascomavr"> |
Latest revision as of 12:33, 28 February 2013
Contents |
Funktion
Sendet eine Konstante oder Variable zu einem SED oder Grafik-Display.
Syntax
LCDAT y , x , var [ , inv]
LCDAT y , x , var [ , FG, BG]
Anmerkungen
X |
X Position im Bereich von 0-63. Die Spaltenbreite (SE-Displays) beträgt 1 Pixel. Andere Displays können einen größeren Bereich umfassen, z.B. 132 oder 255. |
Y |
Y Position. Zeile in Pixel. Das Maximum ist abhängig vom Display. |
Var |
Die anzuzeigende Variable oder Konstante. |
inv |
Optionaler Wert. Value = 0 für normale Darstellung. Jeder andere Wert invertiert die Daten. |
|
für COLOR DISPLAYS |
FG |
Vordergundfarbe |
BG |
Hintergrundfarbe |
Die Bibliothek glibSED muss eingefügt werden mit :
$LIB "glibsed.lbx"
Andere Bibliotheken müssen mit anderen Direktiven eingebunden werden.
Siehe auch
CONFIG GRAPHLCD , SETFONT, GLCDCMD, GLCDDATA
Beispiel
'----------------------------------------------------------------------------------------- 'name : sed1520.bas 'copyright : (c) 1995-2005, MCS Electronics 'purpose : demonstrates the SED1520 based graphical display support 'micro : Mega48 'suited for demo : yes 'commercial addon needed : no '----------------------------------------------------------------------------------------- $regfile = "m48def.dat" ' specify the used micro $crystal = 7372800 ' used crystal frequency $baud = 115200 ' use baud rate $hwstack = 32 ' default use 32 for the hardware stack $swstack = 10 ' default use 10 for the SW stack $framesize = 40 ' default use 40 for the frame space 'I used a Staver to test 'some routines to control the display are in the glcdSED.lib file 'IMPORTANT : since the SED1520 uses 2 chips, the columns are split into 2 of 60. 'This means that data after column 60 will not print correct. You need to locate the data on the second halve 'For example when you want to display a line of text that is more then 8 chars long, (8x8=64) , byte 8 will not draw correctly 'Frankly i find the KS0108 displays a much better choice. $lib "glcdSED1520.lbx" 'First we define that we use a graphic LCD Config Graphlcd = 120 * 64sed , Dataport = Porta , Controlport = Portd , Ce = 5 , Ce2 = 7 , Cd = 3 , Rd = 4 'The dataport is the portname that is connected to the data lines of the LCD 'The controlport is the portname which pins are used to control the lcd 'CE =CS Chip Enable/ Chip select 'CE2= Chip select / chip enable of chip 2 'CD=A0 Data direction 'RD=Read 'Dim variables (y not used) Dim X As Byte , Y As Byte 'clear the screen Cls Wait 2 'specify the font we want to use Setfont Font8x8 'You can use locate but the columns have a range from 1-132 'When you want to show somthing on the LCD, use the LDAT command 'LCDAT Y , COL, value Lcdat 1 , 1 , "1231231" Lcdat 3 , 80 , "11" 'lcdat accepts an additional param for inversing the text 'lcdat 1,1,"123" , 1 ' will inverse the text Wait 2 Line(0 , 0) -(30 , 30) , 1 Wait 2 Showpic 0 , 0 , Plaatje 'show a comnpressed picture End 'end program 'we need to include the font files $include "font8x8.font" '$include "font16x16.font" Plaatje: 'include the picture data $bgf "smile.bgf"
Languages | English • Deutsch |
---|