DEFLCDCHAR
(Created page with "= <span class="f_Header">Action</span> = Define a custom LCD character. <span style="font-family: Arial;"> </span> <span style="font-family: Arial;"> </span> = <...") |
|||
Line 40: | Line 40: | ||
<span style="font-family: Arial;"> </span> | <span style="font-family: Arial;"> </span> | ||
− | It is important that a CLS follows the DEFLCDCHAR statement(s). | + | <span style="font-weight: bold; color: rgb(255, 0, 0);">It is important that a CLS follows the DEFLCDCHAR statement(s).</span> |
− | So make sure you use the DEFLCDCHAR before your CLS statement. | + | <span style="font-weight: bold; color: rgb(255, 0, 0);">So make sure you use the DEFLCDCHAR before your CLS statement</span>. |
− | + | | |
− | Special characters can be printed with the [ | + | Special characters can be printed with the [http://avrhelp.mcselec.com/chr.htm Chr]() function. |
<span style="font-family: Arial;"> </span> | <span style="font-family: Arial;"> </span> | ||
− | LCD Text displays have a 64 byte memory that can be used to show your own custom characters. Each character uses 8 bytes as the character is an array from 8x8 pixels. You can create a maximum of 8 characters this way. Or better said | + | LCD Text displays have a 64 byte memory that can be used to show your own custom characters. Each character uses 8 bytes as the character is an array from 8x8 pixels. You can create a maximum of 8 characters this way. Or better said : you can show a maximum of 8 custom characters at the same time. You can redefine characters in your program but with the previous mentioned restriction. |
A custom character can be used to show characters that are not available in the LCD font table. For example a Û. | A custom character can be used to show characters that are not available in the LCD font table. For example a Û. | ||
Line 58: | Line 58: | ||
<span style="font-family: Arial;"> </span> | <span style="font-family: Arial;"> </span> | ||
− | <span style="font-family: | + | <span style="font-weight: bold; color: rgb(255, 0, 0);">Note:</span> |
+ | |||
+ | You cannot use Chr(0)-<span style="font-family: 'Courier New'; font-weight: bold; color: rgb(0, 0, 128);">Deflcdchar</span><span style="font-family: 'Courier New';"> 0</span> in any with any String Variables/Arrays, Chr(0) will be interpreted as a String terminator | ||
+ | |||
+ | and not as Custom Character for <span style="font-family: 'Courier New'; font-weight: bold; color: rgb(0, 0, 128);">Deflcdchar</span><span style="font-family: 'Courier New';"> 0 (</span><span style="font-family: 'Courier New'; font-weight: bold; color: rgb(0, 0, 128);">Deflcdchar</span><span style="font-family: 'Courier New';"> from 1 to 7 is fine).</span> | ||
= <span class="f_Header">See also</span> = | = <span class="f_Header">See also</span> = |
Revision as of 21:14, 24 August 2013
Contents |
Action
Define a custom LCD character.
Syntax
DEFLCDCHAR char,r1,r2,r3,r4,r5,r6,r7,r8
Remarks
char |
Constant representing the character (0-7). |
r1-r8 |
The row values for the character. |
You can use the LCD designer to build the characters.
It is important that a CLS follows the DEFLCDCHAR statement(s).
So make sure you use the DEFLCDCHAR before your CLS statement.
Special characters can be printed with the Chr() function.
LCD Text displays have a 64 byte memory that can be used to show your own custom characters. Each character uses 8 bytes as the character is an array from 8x8 pixels. You can create a maximum of 8 characters this way. Or better said : you can show a maximum of 8 custom characters at the same time. You can redefine characters in your program but with the previous mentioned restriction.
A custom character can be used to show characters that are not available in the LCD font table. For example a Û.
You can also use custom characters to create a bar graph or a music note.
Note:
You cannot use Chr(0)-Deflcdchar 0 in any with any String Variables/Arrays, Chr(0) will be interpreted as a String terminator
and not as Custom Character for Deflcdchar 0 (Deflcdchar from 1 to 7 is fine).
See also
Partial Example
Deflcdchar 1 , 225 , 227 , 226 , 226 , 226 , 242 , 234 , 228 ' replace ? with number (0-7) Deflcdchar 0 , 240 , 224 , 224 , 255 , 254 , 252 , 248 , 240 ' replace ? with number (0-7) Cls 'select data RAM Rem it is important that a CLS is following the deflcdchar statements because it will set the controller back in datamode Lcd Chr(0) ; Chr(1)
Languages | English • Deutsch |
---|