<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://wiki.mcselec.com/bavr/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://wiki.mcselec.com/bavr/index.php?action=history&amp;feed=atom&amp;title=CLS</id>
		<title>CLS - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://wiki.mcselec.com/bavr/index.php?action=history&amp;feed=atom&amp;title=CLS"/>
		<link rel="alternate" type="text/html" href="http://wiki.mcselec.com/bavr/index.php?title=CLS&amp;action=history"/>
		<updated>2026-05-03T12:31:00Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.18.6</generator>

	<entry>
		<id>http://wiki.mcselec.com/bavr/index.php?title=CLS&amp;diff=419&amp;oldid=prev</id>
		<title>Admin at 18:08, 7 February 2013</title>
		<link rel="alternate" type="text/html" href="http://wiki.mcselec.com/bavr/index.php?title=CLS&amp;diff=419&amp;oldid=prev"/>
				<updated>2013-02-07T18:08:31Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
		&lt;tr valign='top'&gt;
		&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;← Older revision&lt;/td&gt;
		&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 18:08, 7 February 2013&lt;/td&gt;
		&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 49:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 49:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;= &amp;lt;span class=&amp;quot;f_Header&amp;quot;&amp;gt;See also&amp;lt;/span&amp;gt; =&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;= &amp;lt;span class=&amp;quot;f_Header&amp;quot;&amp;gt;See also&amp;lt;/span&amp;gt; =&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;[&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;http://avrhelp.mcselec.com/lcd_1.htm &lt;/del&gt;$LCD]&amp;amp;nbsp;,&amp;amp;nbsp;[&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;http://avrhelp.mcselec.com/lcdrs.htm &lt;/del&gt;$LCDRS]&amp;amp;nbsp;,&amp;amp;nbsp;[&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;http://avrhelp.mcselec.com/lcd_2.htm &lt;/del&gt;LCD]&amp;amp;nbsp;,&amp;amp;nbsp;[&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;http://avrhelp.mcselec.com/shiftlcd.htm &lt;/del&gt;SHIFTLCD]&amp;amp;nbsp;,&amp;amp;nbsp;[&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;http://avrhelp.mcselec.com/shiftcursor.htm &lt;/del&gt;SHIFTCURSOR]&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;&amp;amp;nbsp;,&amp;amp;nbsp;[http://avrhelp.mcselec.com/shiftlcd.htm SHIFTLCD&lt;/del&gt;]&amp;amp;nbsp;,&amp;amp;nbsp;[&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;http://avrhelp.mcselec.com/initlcd.htm &lt;/del&gt;INITLCD]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;[&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;[&lt;/ins&gt;$LCD&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;]&lt;/ins&gt;]&amp;amp;nbsp;,&amp;amp;nbsp;[&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;[&lt;/ins&gt;$LCDRS&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;]&lt;/ins&gt;]&amp;amp;nbsp;,&amp;amp;nbsp;[&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;[&lt;/ins&gt;LCD&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;]&lt;/ins&gt;]&amp;amp;nbsp;,&amp;amp;nbsp;[&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;[&lt;/ins&gt;SHIFTLCD&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;]&lt;/ins&gt;]&amp;amp;nbsp;,&amp;amp;nbsp;[&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;[&lt;/ins&gt;SHIFTCURSOR]]&amp;amp;nbsp;,&amp;amp;nbsp;[&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;[&lt;/ins&gt;INITLCD&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;]&lt;/ins&gt;]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;span style=&amp;quot;font-family: Arial;&amp;quot;&amp;gt;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;span style=&amp;quot;font-family: Arial;&amp;quot;&amp;gt;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Admin</name></author>	</entry>

	<entry>
		<id>http://wiki.mcselec.com/bavr/index.php?title=CLS&amp;diff=418&amp;oldid=prev</id>
		<title>Admin: Created page with &quot;= &lt;span class=&quot;f_Header&quot;&gt;Action&lt;/span&gt; =  Clear the LCD display and set the cursor to home.  &lt;span style=&quot;font-family: Arial;&quot;&gt;&amp;nbsp;&lt;/span&gt;  &lt;span style=&quot;font-family: Arial;&quot;...&quot;</title>
		<link rel="alternate" type="text/html" href="http://wiki.mcselec.com/bavr/index.php?title=CLS&amp;diff=418&amp;oldid=prev"/>
				<updated>2013-02-07T18:07:21Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;quot;= &amp;lt;span class=&amp;quot;f_Header&amp;quot;&amp;gt;Action&amp;lt;/span&amp;gt; =  Clear the LCD display and set the cursor to home.  &amp;lt;span style=&amp;quot;font-family: Arial;&amp;quot;&amp;gt; &amp;lt;/span&amp;gt;  &amp;lt;span style=&amp;quot;font-family: Arial;&amp;quot;...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;= &amp;lt;span class=&amp;quot;f_Header&amp;quot;&amp;gt;Action&amp;lt;/span&amp;gt; =&lt;br /&gt;
&lt;br /&gt;
Clear the LCD display and set the cursor to home.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-family: Arial;&amp;quot;&amp;gt;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-family: Arial;&amp;quot;&amp;gt;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= &amp;lt;span class=&amp;quot;f_Header&amp;quot;&amp;gt;Syntax&amp;lt;/span&amp;gt; =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span class=&amp;quot;f_Syntax&amp;quot;&amp;gt;CLS&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-family: Arial;&amp;quot;&amp;gt;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-family: Arial;&amp;quot;&amp;gt;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= &amp;lt;span class=&amp;quot;f_Header&amp;quot;&amp;gt;Syntax for graphical LCD&amp;lt;/span&amp;gt; =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span class=&amp;quot;f_Syntax&amp;quot;&amp;gt;CLS&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span class=&amp;quot;f_Syntax&amp;quot;&amp;gt;CLS&amp;lt;/span&amp;gt;&amp;amp;nbsp;TEXT&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span class=&amp;quot;f_Syntax&amp;quot;&amp;gt;CLS&amp;lt;/span&amp;gt;&amp;amp;nbsp;GRAPH&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span class=&amp;quot;f_Syntax&amp;quot;&amp;gt;CLS&amp;lt;/span&amp;gt;&amp;amp;nbsp;Y, X1 , X2 &amp;amp;nbsp;[, CHAR]&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-family: Arial;&amp;quot;&amp;gt;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= &amp;lt;span class=&amp;quot;f_Header&amp;quot;&amp;gt;Remarks&amp;lt;/span&amp;gt; =&lt;br /&gt;
&lt;br /&gt;
Clearing the LCD display does not clear the CG-RAM in which the custom characters are stored.&lt;br /&gt;
&lt;br /&gt;
For graphical LCD displays CLS will clear both the text and the graphical display.&lt;br /&gt;
&lt;br /&gt;
The EADOG128 and KS108 support the option to clear a portion of a line. Depending on the used graphic chip, this option might be added to other &amp;amp;nbsp;graphical LCD lib's too.&lt;br /&gt;
&lt;br /&gt;
Graphical displays coordinates start with 1. To clear the entire first line you need to code&amp;amp;nbsp;: CLS 1,1,128&lt;br /&gt;
&lt;br /&gt;
This will clear the first line, from the starting position X1(1) to the ending position(X2). You may specify an optional character to use. By default 0 is used. When you have inverse text, you need to use 255.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-family: Arial;&amp;quot;&amp;gt;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-family: Arial;&amp;quot;&amp;gt;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= &amp;lt;span class=&amp;quot;f_Header&amp;quot;&amp;gt;See also&amp;lt;/span&amp;gt; =&lt;br /&gt;
&lt;br /&gt;
[http://avrhelp.mcselec.com/lcd_1.htm $LCD]&amp;amp;nbsp;,&amp;amp;nbsp;[http://avrhelp.mcselec.com/lcdrs.htm $LCDRS]&amp;amp;nbsp;,&amp;amp;nbsp;[http://avrhelp.mcselec.com/lcd_2.htm LCD]&amp;amp;nbsp;,&amp;amp;nbsp;[http://avrhelp.mcselec.com/shiftlcd.htm SHIFTLCD]&amp;amp;nbsp;,&amp;amp;nbsp;[http://avrhelp.mcselec.com/shiftcursor.htm SHIFTCURSOR]&amp;amp;nbsp;,&amp;amp;nbsp;[http://avrhelp.mcselec.com/shiftlcd.htm SHIFTLCD]&amp;amp;nbsp;,&amp;amp;nbsp;[http://avrhelp.mcselec.com/initlcd.htm INITLCD]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-family: Arial;&amp;quot;&amp;gt;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-family: Arial;&amp;quot;&amp;gt;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= &amp;lt;span class=&amp;quot;f_Header&amp;quot;&amp;gt;Example&amp;lt;/span&amp;gt; =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&amp;lt;source lang=&amp;quot;bascomavr&amp;quot;&amp;gt;&lt;br /&gt;
'-----------------------------------------------------------------------------------------&lt;br /&gt;
'name : lcd.bas&lt;br /&gt;
'copyright : (c) 1995-2005, MCS Electronics&lt;br /&gt;
'purpose : demo: LCD, CLS, LOWERLINE, SHIFTLCD, SHIFTCURSOR, HOME&lt;br /&gt;
' CURSOR, DISPLAY&lt;br /&gt;
'micro : Mega8515&lt;br /&gt;
'suited for demo : yes&lt;br /&gt;
'commercial addon needed : no&lt;br /&gt;
'-----------------------------------------------------------------------------------------&lt;br /&gt;
 &lt;br /&gt;
$regfile = &amp;quot;m8515.dat&amp;quot; ' specify the used micro&lt;br /&gt;
$crystal = 4000000 ' used crystal frequency&lt;br /&gt;
$baud = 19200 ' use baud rate&lt;br /&gt;
$hwstack = 32 ' default use 32 for the hardware stack&lt;br /&gt;
$swstack = 10 ' default use 10 for the SW stack&lt;br /&gt;
$framesize = 40 ' default use 40 for the frame space&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
$sim&lt;br /&gt;
'REMOVE the above command for the real program !!&lt;br /&gt;
'$sim is used for faster simulation&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
'note : tested in PIN mode with 4-bit&lt;br /&gt;
 &lt;br /&gt;
'Config Lcdpin = Pin , Db4 = Portb.1 , Db5 = Portb.2 , Db6 = Portb.3 , Db7 = Portb.4 , E = Portb.5 , Rs = Portb.6&lt;br /&gt;
Config Lcdpin = Pin , Db4 = Porta.4 , Db5 = Porta.5 , Db6 = Porta.6 , Db7 = Porta.7 , E = Portc.7 , Rs = Portc.6&lt;br /&gt;
'These settings are for the STK200 in PIN mode&lt;br /&gt;
'Connect only DB4 to DB7 of the LCD to the LCD connector of the STK D4-D7&lt;br /&gt;
'Connect the E-line of the LCD to A15 (PORTC.7) and NOT to the E line of the LCD connector&lt;br /&gt;
'Connect the RS, V0, GND and =5V of the LCD to the STK LCD connector&lt;br /&gt;
 &lt;br /&gt;
Rem with the config lcdpin statement you can override the compiler settings&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
Dim A As Byte&lt;br /&gt;
Config Lcd = 16 * 2 'configure lcd screen&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
'other options are 16 * 4 and 20 * 4, 20 * 2 , 16 * 1a&lt;br /&gt;
'When you dont include this option 16 * 2 is assumed&lt;br /&gt;
'16 * 1a is intended for 16 character displays with split addresses over 2 lines&lt;br /&gt;
 &lt;br /&gt;
'$LCD = address will turn LCD into 8-bit databus mode&lt;br /&gt;
' use this with uP with external RAM and/or ROM&lt;br /&gt;
' because it aint need the port pins !&lt;br /&gt;
 &lt;br /&gt;
Cls 'clear the LCD display&lt;br /&gt;
Lcd &amp;quot;Hello world.&amp;quot; 'display this at the top line&lt;br /&gt;
Wait 1&lt;br /&gt;
Lowerline 'select the lower line&lt;br /&gt;
Wait 1&lt;br /&gt;
Lcd &amp;quot;Shift this.&amp;quot; 'display this at the lower line&lt;br /&gt;
Wait 1&lt;br /&gt;
For A = 1 To 10&lt;br /&gt;
Shiftlcd Right 'shift the text to the right&lt;br /&gt;
Wait 1 'wait a moment&lt;br /&gt;
Next&lt;br /&gt;
 &lt;br /&gt;
For A = 1 To 10&lt;br /&gt;
Shiftlcd Left 'shift the text to the left&lt;br /&gt;
Wait 1 'wait a moment&lt;br /&gt;
Next&lt;br /&gt;
 &lt;br /&gt;
Locate 2 , 1 'set cursor position&lt;br /&gt;
Lcd &amp;quot;*&amp;quot; 'display this&lt;br /&gt;
Wait 1 'wait a moment&lt;br /&gt;
 &lt;br /&gt;
Shiftcursor Right 'shift the cursor&lt;br /&gt;
Lcd &amp;quot;@&amp;quot; 'display this&lt;br /&gt;
Wait 1 'wait a moment&lt;br /&gt;
 &lt;br /&gt;
Home Upper 'select line 1 and return home&lt;br /&gt;
Lcd &amp;quot;Replaced.&amp;quot; 'replace the text&lt;br /&gt;
Wait 1 'wait a moment&lt;br /&gt;
 &lt;br /&gt;
Cursor Off Noblink 'hide cursor&lt;br /&gt;
Wait 1 'wait a moment&lt;br /&gt;
Cursor On Blink 'show cursor&lt;br /&gt;
Wait 1 'wait a moment&lt;br /&gt;
Display Off 'turn display off&lt;br /&gt;
Wait 1 'wait a moment&lt;br /&gt;
Display On 'turn display on&lt;br /&gt;
'-----------------NEW support for 4-line LCD------&lt;br /&gt;
Thirdline&lt;br /&gt;
Lcd &amp;quot;Line 3&amp;quot;&lt;br /&gt;
Fourthline&lt;br /&gt;
Lcd &amp;quot;Line 4&amp;quot;&lt;br /&gt;
Home Third 'goto home on line three&lt;br /&gt;
Home Fourth&lt;br /&gt;
Home F 'first letteer also works&lt;br /&gt;
Locate 4 , 1 : Lcd &amp;quot;Line 4&amp;quot;&lt;br /&gt;
Wait 1&lt;br /&gt;
 &lt;br /&gt;
'Now lets build a special character&lt;br /&gt;
'the first number is the characternumber (0-7)&lt;br /&gt;
'The other numbers are the rowvalues&lt;br /&gt;
'Use the LCD tool to insert this line&lt;br /&gt;
 &lt;br /&gt;
Deflcdchar 1 , 225 , 227 , 226 , 226 , 226 , 242 , 234 , 228 ' replace ? with number (0-7)&lt;br /&gt;
Deflcdchar 0 , 240 , 224 , 224 , 255 , 254 , 252 , 248 , 240 ' replace ? with number (0-7)&lt;br /&gt;
Cls 'select data RAM&lt;br /&gt;
Rem it is important that a CLS is following the deflcdchar statements because it will set the controller back in datamode&lt;br /&gt;
Lcd Chr(0) ; Chr(1) 'print the special character&lt;br /&gt;
 &lt;br /&gt;
'----------------- Now use an internal routine ------------&lt;br /&gt;
_temp1 = 1 'value into ACC&lt;br /&gt;
!rCall _write_lcd 'put it on LCD&lt;br /&gt;
End&lt;br /&gt;
&amp;lt;/source&amp;gt;&amp;lt;br/&amp;gt;{{Languages}}&lt;br /&gt;
&lt;br /&gt;
[[Category:BASCOM Language Reference]]&lt;/div&gt;</summary>
		<author><name>Admin</name></author>	</entry>

	</feed>