<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://topway.app/sld_doc/en/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Usr255</id>
	<title>Smart LCD - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://topway.app/sld_doc/en/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Usr255"/>
	<link rel="alternate" type="text/html" href="https://topway.app/sld_doc/en/index.php/Special:Contributions/Usr255"/>
	<updated>2026-09-23T01:41:06Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.44.0</generator>
	<entry>
		<id>https://topway.app/sld_doc/en/index.php?title=MediaWiki:Sidebar&amp;diff=1119</id>
		<title>MediaWiki:Sidebar</title>
		<link rel="alternate" type="text/html" href="https://topway.app/sld_doc/en/index.php?title=MediaWiki:Sidebar&amp;diff=1119"/>
		<updated>2025-10-22T05:34:22Z</updated>

		<summary type="html">&lt;p&gt;Usr255: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
* Smart LCD (SLD)&lt;br /&gt;
** SLD Introduction|SLD Introduction&lt;br /&gt;
** Quick Start|Quick Start&lt;br /&gt;
** Operations|Operations&lt;br /&gt;
** Function Features|Function Features&lt;br /&gt;
* Development Tools&lt;br /&gt;
** SGTools|SGTools&lt;br /&gt;
** Action Elements|Action Elements&lt;br /&gt;
** Character Elements|Character Elements&lt;br /&gt;
** Image Elements|Image Elements&lt;br /&gt;
** Graphics Elements|Graphics Elements&lt;br /&gt;
** Keyboard Elements|Keyboard Elements&lt;br /&gt;
** Elements Sub Func|Elements Sub Func&lt;br /&gt;
** Page Func|Page Func&lt;br /&gt;
** Display UI Download|Display UI Download&lt;br /&gt;
* Communication&lt;br /&gt;
** Communication Interface|Communication Interface&lt;br /&gt;
** Serial Commands Protocol|Serial Commands Protocol&lt;br /&gt;
** MODBUS Slave Protocol|MODBUS Slave Protocol&lt;br /&gt;
** MODBUS Master Protocol|MODBUS Master Protocol&lt;br /&gt;
* Others&lt;br /&gt;
** Lua Script|Lua Script&lt;br /&gt;
** Memory &amp;amp; Ranges|Memory &amp;amp; Ranges&lt;br /&gt;
** FAQ-01|FAQ-01&lt;br /&gt;
** FAQ-02|FAQ-02&lt;br /&gt;
* Display Project&lt;br /&gt;
** Tutorials|Tutorials&lt;br /&gt;
** Examples-01|Examples-01&lt;br /&gt;
** Examples-02|Examples-02&lt;br /&gt;
** Tech-Memos-01|Tech-Memos-01&lt;/div&gt;</summary>
		<author><name>Usr255</name></author>
	</entry>
	<entry>
		<id>https://topway.app/sld_doc/en/index.php?title=Show_Extended_Code_on_String_Element&amp;diff=1118</id>
		<title>Show Extended Code on String Element</title>
		<link rel="alternate" type="text/html" href="https://topway.app/sld_doc/en/index.php?title=Show_Extended_Code_on_String_Element&amp;diff=1118"/>
		<updated>2025-10-21T09:16:50Z</updated>

		<summary type="html">&lt;p&gt;Usr255: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== background ===&lt;br /&gt;
For some of the countries, they commonly use specific kind of character form external code page. Smart LCD can provide various Countries Code and External Code Pages with String Element&lt;br /&gt;
&lt;br /&gt;
=== how to ===&lt;br /&gt;
&lt;br /&gt;
* Font Setting --&amp;gt; Font Config &amp;lt;2&amp;gt; --&amp;gt; built font&lt;br /&gt;
&lt;br /&gt;
[[File:SAN-21-0625-01-build font.png]]&lt;br /&gt;
&lt;br /&gt;
* select Externed codepage&lt;br /&gt;
&lt;br /&gt;
[[File:SAN-21-0625-02-build font.png|600x600px]]&lt;br /&gt;
&lt;br /&gt;
note. Some of the font face may not provide all the extended char, check before select it.&lt;br /&gt;
&lt;br /&gt;
* Config the codepage to be used in project setting&lt;br /&gt;
&lt;br /&gt;
[[File:SAN-21-0625-04-cp.png|600x600px]]&lt;br /&gt;
&lt;br /&gt;
* Code page can also be config by sys_reg (System Registers[0xFFFF30] := 4 for 860 OEM Portuguese)&lt;br /&gt;
* Code page can also be config by command Set_codepage (0xE7)&lt;br /&gt;
* Select the corresponding font for String Element with VP_STR[0x000100]&lt;br /&gt;
* In case of displaying Portuguese, the relationship can see in the build font panel&lt;br /&gt;
&lt;br /&gt;
[[File:SAN-21-0625-03-font relation.png|560x560px]]&lt;br /&gt;
&lt;br /&gt;
* Use Command Tools to send command to the Smart LCD&lt;br /&gt;
* AA E7 01 04 CC 33 C3 3C (for Country Code=USA , Extended Code Page=PC860&lt;br /&gt;
* AA 42 00 00 01 00 50 6F 72 74 75 67 75 65 73 65 00 CC 33 C3 3C (send some basic ASCII char (&amp;quot;Portuguese&amp;quot;)&lt;br /&gt;
* AA 42 00 00 01 00 80 81 82 83 A0 A1 A2 A3 00 CC 33 C3 3C (send some extended code page char to be shown)&lt;br /&gt;
&lt;br /&gt;
[[File:SAN-21-0625-05-example.png|600x600px]]&lt;br /&gt;
&lt;br /&gt;
=== downloads ===&lt;br /&gt;
nil&lt;/div&gt;</summary>
		<author><name>Usr255</name></author>
	</entry>
	<entry>
		<id>https://topway.app/sld_doc/en/index.php?title=Show_Extended_Code_on_String_Element&amp;diff=1117</id>
		<title>Show Extended Code on String Element</title>
		<link rel="alternate" type="text/html" href="https://topway.app/sld_doc/en/index.php?title=Show_Extended_Code_on_String_Element&amp;diff=1117"/>
		<updated>2025-10-21T09:13:51Z</updated>

		<summary type="html">&lt;p&gt;Usr255: Created page with &amp;quot;=== background === For some of the countries, they commonly use specific kind of character form external code page. Smart LCD can provide various Countries Code and External Code Pages with String Element  === how to ===  * built font, select Font Setting --&amp;gt; Font Config &amp;lt;2&amp;gt;  File:SAN-21-0625-01-build font.png  * select Externed codepage  600x600px  note. Some of the font face may not provide all the extended char, check before...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== background ===&lt;br /&gt;
For some of the countries, they commonly use specific kind of character form external code page. Smart LCD can provide various Countries Code and External Code Pages with String Element&lt;br /&gt;
&lt;br /&gt;
=== how to ===&lt;br /&gt;
&lt;br /&gt;
* built font, select Font Setting --&amp;gt; Font Config &amp;lt;2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:SAN-21-0625-01-build font.png]]&lt;br /&gt;
&lt;br /&gt;
* select Externed codepage&lt;br /&gt;
&lt;br /&gt;
[[File:SAN-21-0625-02-build font.png|600x600px]]&lt;br /&gt;
&lt;br /&gt;
note. Some of the font face may not provide all the extended char, check before select it.&lt;br /&gt;
&lt;br /&gt;
* Config the codepage in project setting codepage&lt;br /&gt;
&lt;br /&gt;
[[File:SAN-21-0625-04-cp.png|600x600px]]&lt;br /&gt;
&lt;br /&gt;
* Code page can be config by sys_reg (System Registers[0xFFFF30] := 4 for 860 OEM Portuguese)&lt;br /&gt;
* Code page can be config by command Set_codepage (0xE7)&lt;br /&gt;
* Select the corresponding font for String Element with VP_STR[0x000100]&lt;br /&gt;
* In case of displaying Portuguese, the relationship can see in the build font panel&lt;br /&gt;
&lt;br /&gt;
[[File:SAN-21-0625-03-font relation.png|560x560px]]&lt;br /&gt;
&lt;br /&gt;
* Use Command Tools to send command &lt;br /&gt;
* AA E7 01 04 CC 33 C3 3C (for Country Code=USA , Extended Code Page=PC860&lt;br /&gt;
* AA 42 00 00 01 00 50 6F 72 74 75 67 75 65 73 65 00 CC 33 C3 3C (send some basic ASCII char (&amp;quot;Portuguese&amp;quot;)&lt;br /&gt;
* AA 42 00 00 01 00 80 81 82 83 A0 A1 A2 A3 00 CC 33 C3 3C (send some extended code page char to be shown)&lt;br /&gt;
&lt;br /&gt;
[[File:SAN-21-0625-05-example.png|600x600px]]&lt;br /&gt;
&lt;br /&gt;
=== downloads ===&lt;br /&gt;
nil&lt;/div&gt;</summary>
		<author><name>Usr255</name></author>
	</entry>
	<entry>
		<id>https://topway.app/sld_doc/en/index.php?title=File:SAN-21-0625-05-example.png&amp;diff=1116</id>
		<title>File:SAN-21-0625-05-example.png</title>
		<link rel="alternate" type="text/html" href="https://topway.app/sld_doc/en/index.php?title=File:SAN-21-0625-05-example.png&amp;diff=1116"/>
		<updated>2025-10-21T09:12:59Z</updated>

		<summary type="html">&lt;p&gt;Usr255: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;SAN-21-0625-05-example&lt;/div&gt;</summary>
		<author><name>Usr255</name></author>
	</entry>
	<entry>
		<id>https://topway.app/sld_doc/en/index.php?title=File:SAN-21-0625-03-font_relation.png&amp;diff=1115</id>
		<title>File:SAN-21-0625-03-font relation.png</title>
		<link rel="alternate" type="text/html" href="https://topway.app/sld_doc/en/index.php?title=File:SAN-21-0625-03-font_relation.png&amp;diff=1115"/>
		<updated>2025-10-21T09:05:40Z</updated>

		<summary type="html">&lt;p&gt;Usr255: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;SAN-21-0625-03-font relation&lt;/div&gt;</summary>
		<author><name>Usr255</name></author>
	</entry>
	<entry>
		<id>https://topway.app/sld_doc/en/index.php?title=File:SAN-21-0625-04-cp.png&amp;diff=1114</id>
		<title>File:SAN-21-0625-04-cp.png</title>
		<link rel="alternate" type="text/html" href="https://topway.app/sld_doc/en/index.php?title=File:SAN-21-0625-04-cp.png&amp;diff=1114"/>
		<updated>2025-10-21T08:58:12Z</updated>

		<summary type="html">&lt;p&gt;Usr255: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;SAN-21-0625-04-cp&lt;/div&gt;</summary>
		<author><name>Usr255</name></author>
	</entry>
	<entry>
		<id>https://topway.app/sld_doc/en/index.php?title=File:SAN-21-0625-02-build_font.png&amp;diff=1113</id>
		<title>File:SAN-21-0625-02-build font.png</title>
		<link rel="alternate" type="text/html" href="https://topway.app/sld_doc/en/index.php?title=File:SAN-21-0625-02-build_font.png&amp;diff=1113"/>
		<updated>2025-10-21T08:50:00Z</updated>

		<summary type="html">&lt;p&gt;Usr255: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;SAN-21-0625-02-build font&lt;/div&gt;</summary>
		<author><name>Usr255</name></author>
	</entry>
	<entry>
		<id>https://topway.app/sld_doc/en/index.php?title=File:SAN-21-0625-01-build_font.png&amp;diff=1112</id>
		<title>File:SAN-21-0625-01-build font.png</title>
		<link rel="alternate" type="text/html" href="https://topway.app/sld_doc/en/index.php?title=File:SAN-21-0625-01-build_font.png&amp;diff=1112"/>
		<updated>2025-10-21T08:49:08Z</updated>

		<summary type="html">&lt;p&gt;Usr255: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;SAN-21-0625-01-build font&lt;/div&gt;</summary>
		<author><name>Usr255</name></author>
	</entry>
	<entry>
		<id>https://topway.app/sld_doc/en/index.php?title=Tech-Memos-01&amp;diff=1111</id>
		<title>Tech-Memos-01</title>
		<link rel="alternate" type="text/html" href="https://topway.app/sld_doc/en/index.php?title=Tech-Memos-01&amp;diff=1111"/>
		<updated>2025-10-21T08:29:15Z</updated>

		<summary type="html">&lt;p&gt;Usr255: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* [[Floating point value input]]&lt;br /&gt;
* [[Floating point value display]]&lt;br /&gt;
* [[Ardunio (soft_serial) connect to Smart LCD]]&lt;br /&gt;
* [[hmt.gettick() function usage]]&lt;br /&gt;
* [[Touch_Key lock on touch]]&lt;br /&gt;
* [[Show Extended Code on Static String]]&lt;br /&gt;
* [[Assign VP value in page (init VP values)]]&lt;br /&gt;
* [[Copy a page during editing]]&lt;br /&gt;
* [[Assign Page ID manually in display project]]&lt;br /&gt;
* [[Show Extended Code on String Element]]&lt;/div&gt;</summary>
		<author><name>Usr255</name></author>
	</entry>
	<entry>
		<id>https://topway.app/sld_doc/en/index.php?title=Assign_Page_ID_manually_in_display_project&amp;diff=1110</id>
		<title>Assign Page ID manually in display project</title>
		<link rel="alternate" type="text/html" href="https://topway.app/sld_doc/en/index.php?title=Assign_Page_ID_manually_in_display_project&amp;diff=1110"/>
		<updated>2025-10-20T06:57:22Z</updated>

		<summary type="html">&lt;p&gt;Usr255: /* how to */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== background ===&lt;br /&gt;
When developing Smart LCD project, it may need to group pages or re-arrange page sequence.&lt;br /&gt;
&lt;br /&gt;
It is possible to assign Page ID to do so.&lt;br /&gt;
&lt;br /&gt;
=== how to ===&lt;br /&gt;
&lt;br /&gt;
* right click on a page in the Project Resources window&lt;br /&gt;
[[File:Set page id 01.png]]&lt;br /&gt;
&lt;br /&gt;
* click continue (note. all the page references with this page will be update accordingly)&lt;br /&gt;
&lt;br /&gt;
[[File:Set page id 02.png]]&lt;br /&gt;
&lt;br /&gt;
* enter new id&lt;br /&gt;
&lt;br /&gt;
[[File:Set page id 03.png]]&lt;br /&gt;
&lt;br /&gt;
* this example the PG0001 updated as PG0301&lt;br /&gt;
&lt;br /&gt;
[[File:Set page id 04.png]]&lt;br /&gt;
&lt;br /&gt;
=== download ===&lt;br /&gt;
nil&lt;/div&gt;</summary>
		<author><name>Usr255</name></author>
	</entry>
	<entry>
		<id>https://topway.app/sld_doc/en/index.php?title=File:Set_page_id_04.png&amp;diff=1109</id>
		<title>File:Set page id 04.png</title>
		<link rel="alternate" type="text/html" href="https://topway.app/sld_doc/en/index.php?title=File:Set_page_id_04.png&amp;diff=1109"/>
		<updated>2025-10-20T06:56:40Z</updated>

		<summary type="html">&lt;p&gt;Usr255: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Set page id 04&lt;/div&gt;</summary>
		<author><name>Usr255</name></author>
	</entry>
	<entry>
		<id>https://topway.app/sld_doc/en/index.php?title=File:Set_page_id_03.png&amp;diff=1108</id>
		<title>File:Set page id 03.png</title>
		<link rel="alternate" type="text/html" href="https://topway.app/sld_doc/en/index.php?title=File:Set_page_id_03.png&amp;diff=1108"/>
		<updated>2025-10-20T06:55:24Z</updated>

		<summary type="html">&lt;p&gt;Usr255: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Set page id 03&lt;/div&gt;</summary>
		<author><name>Usr255</name></author>
	</entry>
	<entry>
		<id>https://topway.app/sld_doc/en/index.php?title=File:Set_page_id_02.png&amp;diff=1107</id>
		<title>File:Set page id 02.png</title>
		<link rel="alternate" type="text/html" href="https://topway.app/sld_doc/en/index.php?title=File:Set_page_id_02.png&amp;diff=1107"/>
		<updated>2025-10-20T06:54:27Z</updated>

		<summary type="html">&lt;p&gt;Usr255: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Set page id 02&lt;/div&gt;</summary>
		<author><name>Usr255</name></author>
	</entry>
	<entry>
		<id>https://topway.app/sld_doc/en/index.php?title=File:Set_page_id_01.png&amp;diff=1106</id>
		<title>File:Set page id 01.png</title>
		<link rel="alternate" type="text/html" href="https://topway.app/sld_doc/en/index.php?title=File:Set_page_id_01.png&amp;diff=1106"/>
		<updated>2025-10-20T06:51:53Z</updated>

		<summary type="html">&lt;p&gt;Usr255: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Set page id 01&lt;/div&gt;</summary>
		<author><name>Usr255</name></author>
	</entry>
	<entry>
		<id>https://topway.app/sld_doc/en/index.php?title=Assign_Page_ID_manually_in_display_project&amp;diff=1105</id>
		<title>Assign Page ID manually in display project</title>
		<link rel="alternate" type="text/html" href="https://topway.app/sld_doc/en/index.php?title=Assign_Page_ID_manually_in_display_project&amp;diff=1105"/>
		<updated>2025-10-20T06:51:19Z</updated>

		<summary type="html">&lt;p&gt;Usr255: Created page with &amp;quot;=== background === When developing Smart LCD project, it may need to group pages or re-arrange page sequence.  It is possible to assign Page ID to do so.  === how to ===  # right click on a page in the Project Resources window&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== background ===&lt;br /&gt;
When developing Smart LCD project, it may need to group pages or re-arrange page sequence.&lt;br /&gt;
&lt;br /&gt;
It is possible to assign Page ID to do so.&lt;br /&gt;
&lt;br /&gt;
=== how to ===&lt;br /&gt;
&lt;br /&gt;
# right click on a page in the Project Resources window&lt;/div&gt;</summary>
		<author><name>Usr255</name></author>
	</entry>
	<entry>
		<id>https://topway.app/sld_doc/en/index.php?title=Tech-Memos-01&amp;diff=1104</id>
		<title>Tech-Memos-01</title>
		<link rel="alternate" type="text/html" href="https://topway.app/sld_doc/en/index.php?title=Tech-Memos-01&amp;diff=1104"/>
		<updated>2025-10-20T05:49:40Z</updated>

		<summary type="html">&lt;p&gt;Usr255: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* [[Floating point value input]]&lt;br /&gt;
* [[Floating point value display]]&lt;br /&gt;
* [[Ardunio (soft_serial) connect to Smart LCD]]&lt;br /&gt;
* [[hmt.gettick() function usage]]&lt;br /&gt;
* [[Touch_Key lock on touch]]&lt;br /&gt;
* [[Show Extended Code on Static String]]&lt;br /&gt;
* [[Assign VP value in page (init VP values)]]&lt;br /&gt;
* [[Copy a page during editing]]&lt;br /&gt;
* [[Assign Page ID manually in display project]]&lt;/div&gt;</summary>
		<author><name>Usr255</name></author>
	</entry>
	<entry>
		<id>https://topway.app/sld_doc/en/index.php?title=FAQ-01&amp;diff=1103</id>
		<title>FAQ-01</title>
		<link rel="alternate" type="text/html" href="https://topway.app/sld_doc/en/index.php?title=FAQ-01&amp;diff=1103"/>
		<updated>2025-10-20T05:44:10Z</updated>

		<summary type="html">&lt;p&gt;Usr255: /* Abnormal USB drive found */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== General ==&lt;br /&gt;
&lt;br /&gt;
=== What is SGTools? ===&lt;br /&gt;
&lt;br /&gt;
* SGTools is an UI development software dedicated for TOPWAY Smart LCD.&lt;br /&gt;
* SGTools is an upgraded version over the previous RGTools.&lt;br /&gt;
* It supports all the Smart LCD with resistive touch or capacitive touch.&lt;br /&gt;
&lt;br /&gt;
=== How many background image can be store in to Smart LCD? ===&lt;br /&gt;
&lt;br /&gt;
* Most of the Smart LCD is having 256Mbyte Flash (vary by model) in the Smart LCD&lt;br /&gt;
* The no. of background image can be preload is depends on the display resolutions (vary by model)&lt;br /&gt;
* The Smart LCD is showing the interface by PAGE and pages can share the same background image&lt;br /&gt;
* The maximum no. of PAGE is up to 1000&lt;br /&gt;
* It should be good enough for most of the UI design&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Smart LCD resolutions&lt;br /&gt;
!No. of background picture&lt;br /&gt;
|-&lt;br /&gt;
|800x600&lt;br /&gt;
|~270&lt;br /&gt;
|-&lt;br /&gt;
|800X480&lt;br /&gt;
|~330&lt;br /&gt;
|-&lt;br /&gt;
|480X272&lt;br /&gt;
|~1000&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== What kind of image can be use in the SGTools? ===&lt;br /&gt;
&amp;lt;u&amp;gt;Background Image&amp;lt;/u&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Recommend 24bit BMP&lt;br /&gt;
* Recommend matched resolution image&lt;br /&gt;
* SGTools will resize the un-matched resolution to fit the screen&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;Icons&amp;lt;/u&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Recommend 24bit BMP&lt;br /&gt;
* Limit to 1/4 of the Smart LCD display resolutions&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;Animations&amp;lt;/u&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Recommend 24bit BMP, Animated GIF supported&lt;br /&gt;
* Limit to 1/4 of the Smart LCD display resolutions&lt;br /&gt;
&lt;br /&gt;
== USB issue during display project download ==&lt;br /&gt;
&lt;br /&gt;
=== Power off Smart LCD ===&lt;br /&gt;
&lt;br /&gt;
* Ensure the Smart LCD is totally power off&lt;br /&gt;
* Disconnect the power supply cable of the Smart LCD&lt;br /&gt;
&lt;br /&gt;
=== Cable issue ===&lt;br /&gt;
&lt;br /&gt;
* Use a good quality USB cable&lt;br /&gt;
* Ensure USB power supply(500mA/5V USB supply)&lt;br /&gt;
* A dual USB-A to micro-USB cable, may help in some case&lt;br /&gt;
&lt;br /&gt;
=== PC USB terminal ===&lt;br /&gt;
&lt;br /&gt;
* Try another the USB terminal&lt;br /&gt;
* Connect to the PC motherboard directly (back side of the is better than the front)&lt;br /&gt;
&lt;br /&gt;
== Smart LCD cannot be recognized by PC… ==&lt;br /&gt;
&lt;br /&gt;
=== Smart LCD USB access locked ===&lt;br /&gt;
&lt;br /&gt;
* In case no USB device found on the PC (Smart LCD connected), it is possible than the Smart LCD USB access locked&lt;br /&gt;
* Connect the RS-232 terminal to the PCB&lt;br /&gt;
* In TOPWAY Command Tools, use the “Unlock USB drive” command with the correct password to unlock the USB access&lt;br /&gt;
&lt;br /&gt;
[[File:Unlock usb drive.png]]&lt;br /&gt;
&lt;br /&gt;
=== Smart LCD USB access locked (forgot password) ===&lt;br /&gt;
&lt;br /&gt;
* In case no USB device found on the PC (Smart LCD connected), it is possible the Smart LCD USB access locked&lt;br /&gt;
* Connect the RS-232 terminal to the PCB&lt;br /&gt;
* In TOPWAY Command Tools, use the “Format USB drive” command to format the USB drive and the USB access will be unlock at the same time&lt;br /&gt;
&lt;br /&gt;
[[File:Format usb drive.png]]&lt;br /&gt;
&lt;br /&gt;
=== Abnormal USB drive found ===&lt;br /&gt;
&lt;br /&gt;
* In case no USB device found on the PC (Smart LCD connected), it is possible the Smart LCD USB drive was corrupted during previous download&lt;br /&gt;
* Use PC format tools to format the drive with FAT32 filesystem&lt;br /&gt;
&lt;br /&gt;
== Display Project Configuration ==&lt;br /&gt;
&lt;br /&gt;
=== How to config the screen saver? ===&lt;br /&gt;
&lt;br /&gt;
* To Set the Screen Saver Mode...&lt;br /&gt;
&lt;br /&gt;
* The Screen Saver Mode can be config in the SGTools Menu ⇒ Tools ⇒ Project Setting&lt;br /&gt;
&lt;br /&gt;
[[File:Screen saver mode.png]]&lt;br /&gt;
&lt;br /&gt;
Note. Dim down backlight can further extend the backlight LEDs life.&lt;br /&gt;
&lt;br /&gt;
=== How to wake up form screen saver? ===&lt;br /&gt;
&lt;br /&gt;
* To Wake-up form Screen Saver...&lt;br /&gt;
* Anywhere on screen being touched&lt;br /&gt;
* A page jump command received&lt;br /&gt;
* A data on screen was updated&lt;br /&gt;
&lt;br /&gt;
=== How to shorten the power up “Starting RTC” time? ===&lt;br /&gt;
&amp;lt;u&amp;gt;Install RTC battery&amp;lt;/u&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Operate with RTC battery installed can shorten the power up time&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;RTC Mode Setting&amp;lt;/u&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* The RTC mode can be config in the SGTools Menu ⇒ Tools ⇒ Project Setting&lt;br /&gt;
&lt;br /&gt;
[[File:RTC mode.png]]&lt;br /&gt;
&lt;br /&gt;
* RTC Mode as follow&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!RTC Mode&lt;br /&gt;
!Operating with RTC battery&lt;br /&gt;
!Operating without RTC battery&lt;br /&gt;
!Descriptions&lt;br /&gt;
|-&lt;br /&gt;
|Enable&lt;br /&gt;
|1st power up takes 6s;&lt;br /&gt;
next power up takes 1s&lt;br /&gt;
|every power up takes 6s&lt;br /&gt;
|RTC run with correct init&lt;br /&gt;
|-&lt;br /&gt;
|Disable&lt;br /&gt;
|every power up takes 1s&lt;br /&gt;
|every power up takes 1s&lt;br /&gt;
|RTC stop&lt;br /&gt;
|-&lt;br /&gt;
|Engineering Mode&lt;br /&gt;
|every power up takes 1s&lt;br /&gt;
|every power up takes 1s&lt;br /&gt;
|RTC run without init&lt;br /&gt;
RTC might not run correctly&lt;br /&gt;
NOT suggest for production setting&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== UI Elements and Functions ==&lt;br /&gt;
&lt;br /&gt;
=== How to calibrate the resistive touch panel? ===&lt;br /&gt;
&amp;lt;u&amp;gt;Power-on Calibration&amp;lt;/u&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Touch and hold the top-right corner of the RTP&lt;br /&gt;
* Power on the Smart LCD&lt;br /&gt;
* The display will enter the calibrate mode&lt;br /&gt;
* Touch the cross on screen to do the calibration&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;Command Calibration&amp;lt;/u&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Power on the Smart LCD&lt;br /&gt;
* Use a E4 command to enter the calibration mode  (AA E4 55 AA 5A A5 CC 33 C3 3C)&lt;br /&gt;
* The display will enter the calibrate mode&lt;br /&gt;
* Touch the cross on screen to do the calibration&lt;br /&gt;
&lt;br /&gt;
=== How to show Value with decimal point? ===&lt;br /&gt;
&amp;lt;u&amp;gt;Integer Value (VP_N16, VP_N32, VP_N64)&amp;lt;/u&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Data Type can be Signed or Un-signed&lt;br /&gt;
* Config the Integer Digits and Decimal Digits in the Number elements&lt;br /&gt;
* It will show integers with decimal point.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!VP&#039;s value(10&#039;s)&lt;br /&gt;
!Interger Digits&lt;br /&gt;
!Decimal Digits&lt;br /&gt;
!Display Result&lt;br /&gt;
|-&lt;br /&gt;
|15&lt;br /&gt;
|Auto&lt;br /&gt;
|3&lt;br /&gt;
|0.015&lt;br /&gt;
|-&lt;br /&gt;
|23762&lt;br /&gt;
|Auto&lt;br /&gt;
|3&lt;br /&gt;
|23.782&lt;br /&gt;
|-&lt;br /&gt;
|5629&lt;br /&gt;
|5&lt;br /&gt;
|1&lt;br /&gt;
|00562.9&lt;br /&gt;
|-&lt;br /&gt;
| -87913&lt;br /&gt;
|3&lt;br /&gt;
|2&lt;br /&gt;
| -879.13&lt;br /&gt;
|-&lt;br /&gt;
| -13277&lt;br /&gt;
|2&lt;br /&gt;
|2&lt;br /&gt;
| -99.99&lt;br /&gt;
|-&lt;br /&gt;
|1758&lt;br /&gt;
|3&lt;br /&gt;
|0&lt;br /&gt;
|999&lt;br /&gt;
|}&lt;br /&gt;
Note. Over range value will show its max value&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;Floating Value (VP_N32)&amp;lt;/u&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Data Type should be Floating Value&lt;br /&gt;
* Float type value is suggested to select: Integer Digits=Auto, Decimal Digits=1~9. to prevent over maximum value presentation error&lt;br /&gt;
&lt;br /&gt;
Note. Float type value might rounded or truncated due to hex-dec conversion&lt;br /&gt;
&lt;br /&gt;
=== How to hide an element in page? ===&lt;br /&gt;
&amp;lt;u&amp;gt;Real Time Properties Control&amp;lt;/u&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Enable VP is can be use to hide an element in page&lt;br /&gt;
* Enable VP is none by default (element operate normally)&lt;br /&gt;
* It can assign a VP address (VP_N16, VP_N32, VP_N64) to it as its Enable control register&lt;br /&gt;
* The VP value set to 1 as enable at power-on.&lt;br /&gt;
* It can be disabled (hidden) by a zero value&lt;br /&gt;
&lt;br /&gt;
=== How to display Chinese Char? ===&lt;br /&gt;
&lt;br /&gt;
* Smart LCD support GB2312, GBK, BIG5&lt;br /&gt;
* GB2312 support the most command 6763 simplified Chinese&lt;br /&gt;
* Select a Chinese Font Char set in the String ElementConfig a VP_STR with it&lt;br /&gt;
* Send a GB code string to the VP_STR to display it on screen&lt;br /&gt;
&lt;br /&gt;
Note. It can generate custom font in SGTools (Menu ⇒ Tools ⇒ Font Setting ⇒ Font Config &amp;lt;2&amp;gt;)&lt;br /&gt;
&lt;br /&gt;
== Communications ==&lt;br /&gt;
&lt;br /&gt;
=== How to config the terminal buadrate? ===&lt;br /&gt;
&amp;lt;u&amp;gt;By Project setting&amp;lt;/u&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* The terminal baudrate can be config in the SGTools (Menu ⇒ Tools ⇒ Project Setting)&lt;br /&gt;
&lt;br /&gt;
[[File:SGT Project Baud Rate.png|223x223px]]&lt;br /&gt;
&lt;br /&gt;
* default is115200 baud per second&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;By Command&amp;lt;/u&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* It is also possible to change the baudrate by using command.&lt;br /&gt;
* Use a E0 command to set sys config (AA E0 55 AA 5A A5 07 83 00 CC 33 C3 3C)&lt;br /&gt;
* Baud rate will back to project setting after next power on&lt;br /&gt;
&lt;br /&gt;
=== How to resolve communication issue? ===&lt;br /&gt;
&amp;lt;u&amp;gt;Physical Connections&amp;lt;/u&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Check the terminal connections cable&lt;br /&gt;
* Ensure the GND is connection&lt;br /&gt;
* Confirm the cross wiring (Tx to Rx )&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|Smart LCD TX ⇒ PC Rx&lt;br /&gt;
|-&lt;br /&gt;
|Smart LCD Rx ⇐ PC Tx&lt;br /&gt;
|-&lt;br /&gt;
|Smart LCD RTS  ⇒ PC CTS&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;u&amp;gt;Signal Levels&amp;lt;/u&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Check the terminal signal of the Smart LCD&lt;br /&gt;
* There are three kind of Smart LCD terminal (depends on model) UART (3.3V) / RS-232C (±12V) / RS-485 (3.3V)&lt;br /&gt;
* The host and the Smart LCD must be have the same signal levels&lt;br /&gt;
* Only Smart LCD with RS-232C can interface to PC RS-232C signal(±12V)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;Byte Packet Config&amp;lt;/u&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Check the baud rate (115200 by default)&lt;br /&gt;
* Check the no. of bit, parity and stop bit (8N1 by default)&lt;br /&gt;
* All the command are in hex/binary (NOT ASCII)&lt;br /&gt;
&lt;br /&gt;
=== What is the function of terminal RTS signal? ===&lt;br /&gt;
&amp;lt;u&amp;gt;RTS signal&amp;lt;/u&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* RTS is an output signal of the Smart LCD, working like a busy signal&lt;br /&gt;
* It will be set, while the Smart LCD input buffer full When RTS set, host should stop sending data/command to prevent data/command lost&lt;br /&gt;
* As Smart LCD is having 32kbyte (various by model) input buffer&lt;br /&gt;
* In most of the case, it may not necessary to use RTS signal&lt;/div&gt;</summary>
		<author><name>Usr255</name></author>
	</entry>
	<entry>
		<id>https://topway.app/sld_doc/en/index.php?title=MediaWiki:Sidebar&amp;diff=1102</id>
		<title>MediaWiki:Sidebar</title>
		<link rel="alternate" type="text/html" href="https://topway.app/sld_doc/en/index.php?title=MediaWiki:Sidebar&amp;diff=1102"/>
		<updated>2025-10-20T05:16:31Z</updated>

		<summary type="html">&lt;p&gt;Usr255: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
* Smart LCD (SLD)&lt;br /&gt;
** SLD Introduction|SLD Introduction&lt;br /&gt;
** Quick Start|Quick Start&lt;br /&gt;
** Operations|Operations&lt;br /&gt;
** Function Features|Function Features&lt;br /&gt;
** http://192.168.10.3/_P8/sld_doc/zh | [Chinese Site]&lt;br /&gt;
* Development Tools&lt;br /&gt;
** SGTools|SGTools&lt;br /&gt;
** Action Elements|Action Elements&lt;br /&gt;
** Character Elements|Character Elements&lt;br /&gt;
** Image Elements|Image Elements&lt;br /&gt;
** Graphics Elements|Graphics Elements&lt;br /&gt;
** Keyboard Elements|Keyboard Elements&lt;br /&gt;
** Elements Sub Func|Elements Sub Func&lt;br /&gt;
** Page Func|Page Func&lt;br /&gt;
** Display UI Download|Display UI Download&lt;br /&gt;
* Communication&lt;br /&gt;
** Communication Interface|Communication Interface&lt;br /&gt;
** Serial Commands Protocol|Serial Commands Protocol&lt;br /&gt;
** MODBUS Slave Protocol|MODBUS Slave Protocol&lt;br /&gt;
** MODBUS Master Protocol|MODBUS Master Protocol&lt;br /&gt;
* Others&lt;br /&gt;
** Lua Script|Lua Script&lt;br /&gt;
** Memory &amp;amp; Ranges|Memory &amp;amp; Ranges&lt;br /&gt;
** FAQ-01|FAQ-01&lt;br /&gt;
** FAQ-02|FAQ-02&lt;br /&gt;
* Display Project&lt;br /&gt;
** Tutorials|Tutorials&lt;br /&gt;
** Examples-01|Examples-01&lt;br /&gt;
** Examples-02|Examples-02&lt;br /&gt;
** Tech-Memos-01|Tech-Memos-01&lt;/div&gt;</summary>
		<author><name>Usr255</name></author>
	</entry>
	<entry>
		<id>https://topway.app/sld_doc/en/index.php?title=MediaWiki:Sidebar&amp;diff=1100</id>
		<title>MediaWiki:Sidebar</title>
		<link rel="alternate" type="text/html" href="https://topway.app/sld_doc/en/index.php?title=MediaWiki:Sidebar&amp;diff=1100"/>
		<updated>2025-10-20T05:10:12Z</updated>

		<summary type="html">&lt;p&gt;Usr255: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
* Smart LCD (SLD)&lt;br /&gt;
** SLD Introduction|SLD Introduction&lt;br /&gt;
** Quick Start|Quick Start&lt;br /&gt;
** Operations|Operations&lt;br /&gt;
** Function Features|Function Features&lt;br /&gt;
** http://192.168.10.3/_P8/sld_doc/zh | [Chinese Site]&lt;br /&gt;
* Development Tools&lt;br /&gt;
** SGTools|SGTools&lt;br /&gt;
** Action Elements|Action Elements&lt;br /&gt;
** Character Elements|Character Elements&lt;br /&gt;
** Image Elements|Image Elements&lt;br /&gt;
** Graphics Elements|Graphics Elements&lt;br /&gt;
** Keyboard Elements|Keyboard Elements&lt;br /&gt;
** Elements Sub Func|Elements Sub Func&lt;br /&gt;
** Page Func|Page Func&lt;br /&gt;
** Display UI Download|Display UI Download&lt;br /&gt;
* Communication&lt;br /&gt;
** Communication Interface|Communication Interface&lt;br /&gt;
** Serial Commands Protocol|Serial Commands Protocol&lt;br /&gt;
** MODBUS Slave Protocol|MODBUS Slave Protocol&lt;br /&gt;
** MODBUS Master Protocol|MODBUS Master Protocol&lt;br /&gt;
* Others&lt;br /&gt;
** Lua Script|Lua Script&lt;br /&gt;
** Memory Area|Memory Area&lt;br /&gt;
** Memory &amp;amp; Ranges|Memory &amp;amp; Ranges&lt;br /&gt;
** Ranges|Ranges&lt;br /&gt;
** FAQ-01|FAQ-01&lt;br /&gt;
** FAQ-02|FAQ-02&lt;br /&gt;
* Display Project&lt;br /&gt;
** Tutorials|Tutorials&lt;br /&gt;
** Examples-01|Examples-01&lt;br /&gt;
** Examples-02|Examples-02&lt;br /&gt;
** Tech-Memos-01|Tech-Memos-01&lt;/div&gt;</summary>
		<author><name>Usr255</name></author>
	</entry>
	<entry>
		<id>https://topway.app/sld_doc/en/index.php?title=Memory_%26_Ranges&amp;diff=1099</id>
		<title>Memory &amp; Ranges</title>
		<link rel="alternate" type="text/html" href="https://topway.app/sld_doc/en/index.php?title=Memory_%26_Ranges&amp;diff=1099"/>
		<updated>2025-10-20T05:04:44Z</updated>

		<summary type="html">&lt;p&gt;Usr255: Created page with &amp;quot;== Memory area ==  * TOPWAY Smart LCD provide RAM area for variables VP_N16, VP_N32, VP_N64, VP_STR, … * Be aware that data in RAM dissipates when Smart LCD power is cut. * There are multiple storage areas within Smart LCD. * Table below explains those areas and ways to access them.  {| class=&amp;quot;wikitable&amp;quot; |+ !Int RAM |&amp;#039;&amp;#039;&amp;#039;HW RAM area&amp;#039;&amp;#039;&amp;#039; * VP_N16/32/64 * VP_STR * VP_G16 | | |- !Int Flash |&amp;#039;&amp;#039;&amp;#039;HW Flash area&amp;#039;&amp;#039;&amp;#039; * cmd 0x94 W/R * cmd 0x90 W  * cmd 0x91 R |&amp;#039;&amp;#039;&amp;#039;Partition0&amp;#039;&amp;#039;&amp;#039; * Di...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Memory area ==&lt;br /&gt;
&lt;br /&gt;
* TOPWAY Smart LCD provide RAM area for variables VP_N16, VP_N32, VP_N64, VP_STR, …&lt;br /&gt;
* Be aware that data in RAM dissipates when Smart LCD power is cut.&lt;br /&gt;
* There are multiple storage areas within Smart LCD.&lt;br /&gt;
* Table below explains those areas and ways to access them.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Int RAM&lt;br /&gt;
|&#039;&#039;&#039;HW RAM area&#039;&#039;&#039;&lt;br /&gt;
* VP_N16/32/64&lt;br /&gt;
* VP_STR&lt;br /&gt;
* VP_G16&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
!Int Flash&lt;br /&gt;
|&#039;&#039;&#039;HW Flash area&#039;&#039;&#039;&lt;br /&gt;
* cmd 0x94 W/R&lt;br /&gt;
* cmd 0x90 W &lt;br /&gt;
* cmd 0x91 R&lt;br /&gt;
|&#039;&#039;&#039;Partition0&#039;&#039;&#039;&lt;br /&gt;
* Display Project&lt;br /&gt;
* cmd 0x95 R usr.bin&lt;br /&gt;
* Lua R/(W)&lt;br /&gt;
|style=vertical-align:top|&#039;&#039;&#039;Partition2&#039;&#039;&#039;&lt;br /&gt;
* Lua R/W&lt;br /&gt;
|-&lt;br /&gt;
!Ext U-Drv&lt;br /&gt;
|&lt;br /&gt;
|style=vertical-align:top|&#039;&#039;&#039;Partition1&#039;&#039;&#039;&lt;br /&gt;
* Lua R/W&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
!Hardware&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; |File System&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== HW RAM area (on-board internal RAM) ===&lt;br /&gt;
&lt;br /&gt;
* It is for VP variables (VP_N16, VP_N32, VP_N64, VP_STR, VP_G16,…)&lt;br /&gt;
* VP variables&#039; default values are either 0s or “blank” at startup&lt;br /&gt;
* TRAM is volatile memory&lt;br /&gt;
* VP variables can be accessed by Project Elements, Lua Commands, Serial commands&lt;br /&gt;
&lt;br /&gt;
=== HW Flash area (on-board internal flash) ===&lt;br /&gt;
&lt;br /&gt;
* It can be directly accessed by serial command&lt;br /&gt;
* Serial command 0x94: provides backup or restore function&lt;br /&gt;
* Serial command 0x90: write a data to Hardware Flash area&lt;br /&gt;
* Serial command 0x91: read a from Hardware Flash area&lt;br /&gt;
* Lua access via “hmt.runcmd” that by execute the above commands&lt;br /&gt;
&lt;br /&gt;
Partition 0 (on-board internal flash)&lt;br /&gt;
&lt;br /&gt;
* Display Project files are stored in this partition&lt;br /&gt;
* Constant data is stored in usr.bin file at design-time. User can use serial command 0x95 to retrieve that.&lt;br /&gt;
* Lua io.open, io.read commands can be used to access the partition (named as “disk0”). For data safety, DON’T use Lua io.write command in Partition 0.&lt;br /&gt;
&lt;br /&gt;
=== Partition1 (External U-Drv) ===&lt;br /&gt;
&lt;br /&gt;
* External USB storage is defined as partition 1.&lt;br /&gt;
* This partition (named as “disk1”) can be accessed by Lua io.open, io.read commands&lt;br /&gt;
* In most of the case, it is for backing up the internal stored data (with Lua script)&lt;br /&gt;
&lt;br /&gt;
=== Partition2 (on-board internal flash) ===&lt;br /&gt;
* This partition can be config in SGTools (project config)&lt;br /&gt;
* This partition (named as “disk2”) can be access by Lua io.open, io.read command[[File:Project Setting 2nd Partition Size.png|640x640px]]&lt;br /&gt;
&#039;&#039;&#039;Note&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
We can assign a default value at run-time, by using &amp;quot;Page Function&amp;quot;. The function will run before the host page is loaded.&lt;br /&gt;
&lt;br /&gt;
[[File:Page Function Call.png]]&lt;br /&gt;
&lt;br /&gt;
= PAGEs, Image-Resources and VP-Variables Ranges =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!&#039;&#039;&#039;icon&#039;&#039;&#039;&lt;br /&gt;
!&#039;&#039;&#039;Mnemonic&#039;&#039;&#039;&lt;br /&gt;
!&#039;&#039;&#039;Name&#039;&#039;&#039;&lt;br /&gt;
!&#039;&#039;&#039;Linked VP.&#039;&#039;&#039;&lt;br /&gt;
!&#039;&#039;&#039;Linked IMG&#039;&#039;&#039;&lt;br /&gt;
!&#039;&#039;&#039;Editor Limit&#039;&#039;&#039;&lt;br /&gt;
!&#039;&#039;&#039;Memory Limit&#039;&#039;&#039;&lt;br /&gt;
!&#039;&#039;&#039;Address range&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|[[File:PAGE.png|64x64px]]&lt;br /&gt;
|PAGE&lt;br /&gt;
|Page&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;--&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|IMG_BKG&lt;br /&gt;
|≤1000/project&lt;br /&gt;
|256M byte (*4)&lt;br /&gt;
|PG0000 ~ PG0999&lt;br /&gt;
|-&lt;br /&gt;
|[[File:BKG IMG.png|64x64px]]&lt;br /&gt;
|IMG_BKG&lt;br /&gt;
|Background  Image&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;--&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;--&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|≤10000/project&lt;br /&gt;
&lt;br /&gt;
(*1)&lt;br /&gt;
|&lt;br /&gt;
|DP0000 ~ DP9999&lt;br /&gt;
|-&lt;br /&gt;
|[[File:ICO IMG.png|64x64px]]&lt;br /&gt;
|IMG_ICO&lt;br /&gt;
|Icon&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;--&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;--&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|≤10000/project&lt;br /&gt;
&lt;br /&gt;
(*2)&lt;br /&gt;
|&lt;br /&gt;
|DI0000 ~ DI9999&lt;br /&gt;
|-&lt;br /&gt;
|[[File:ANI IMG.png|64x64px]]&lt;br /&gt;
|IMG_ANI&lt;br /&gt;
|Animation&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;--&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;--&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|≤1000/project&lt;br /&gt;
&lt;br /&gt;
(*2)(*3)&lt;br /&gt;
|&lt;br /&gt;
|ANI000 ~ ANI999&lt;br /&gt;
|-&lt;br /&gt;
|[[File:VP STR.png|64x64px]]&lt;br /&gt;
|VP_STR&lt;br /&gt;
|String  Variable&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;--&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;--&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|≤1024 / project&lt;br /&gt;
|1024(MAX) x (127+1)byte&lt;br /&gt;
|0x000000 ~ 0x01FF80&lt;br /&gt;
|-&lt;br /&gt;
|[[File:VP N16.png|64x64px]]&lt;br /&gt;
|VP_N16&lt;br /&gt;
|16bit Variable&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;--&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;--&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|≤32512 / project&lt;br /&gt;
|32512(MAX) x (2)byte&lt;br /&gt;
|0x080000 ~ 0x08FDFE&lt;br /&gt;
|-&lt;br /&gt;
|[[File:VP N32.png|64x64px]]&lt;br /&gt;
|VP_N32&lt;br /&gt;
|32bit Variable&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;--&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;--&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|≤16128 / project&lt;br /&gt;
|16128(MAX) x (4)byte&lt;br /&gt;
|0x020000 ~ 0x02FBFC&lt;br /&gt;
|-&lt;br /&gt;
|[[File:VP N64.png|64x64px]]&lt;br /&gt;
|VP_N64&lt;br /&gt;
|64bit Variable&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;--&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;--&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|≤7936 / project&lt;br /&gt;
|7936(MAX) x (8)byte&lt;br /&gt;
|0x030000 ~ 0x03F7F8&lt;br /&gt;
|-&lt;br /&gt;
|[[File:VP G16.png|64x64px]]&lt;br /&gt;
|VP_G16&lt;br /&gt;
|16bit  Graph Variable&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;--&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;--&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|≤16384 / project&lt;br /&gt;
|16384(MAX) x (8)byte&lt;br /&gt;
&lt;br /&gt;
(dynamic array allocation)&lt;br /&gt;
|0x060000 ~ 0x07FFF8&lt;br /&gt;
|-&lt;br /&gt;
|[[File:VP BP1.png|64x64px]]&lt;br /&gt;
|VP_BP1&lt;br /&gt;
|Bitmap  Variable&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;--&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;--&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|≤2048 / project&lt;br /&gt;
|2048(MAX) x (64)byte&lt;br /&gt;
&lt;br /&gt;
(dynamic array allocation)&lt;br /&gt;
|0x060000 ~ 0x05FFBF&lt;br /&gt;
|-&lt;br /&gt;
|[[File:VP REG.png|64x64px]]&lt;br /&gt;
|VP_REG&lt;br /&gt;
|Register  Variable&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;--&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;--&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;--&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;--&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|0xFFFF00 ~ 0xFFFFFF&lt;br /&gt;
|-&lt;br /&gt;
|[[File:VP TMR.png|64x64px]]&lt;br /&gt;
|VP_TMR&lt;br /&gt;
|Timer  Variable&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;--&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;--&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|≤8 / project&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;--&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|0x02FFE0 ~ 0x02FFFC&lt;br /&gt;
|}&lt;br /&gt;
Note:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt;1. IMG_BKG must &amp;gt;1/2 of Full-Screen (SGTools auto resize to fit screen)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt;2. IMG_ICON and IMG_ANI Size Limit&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Project resolution&lt;br /&gt;
!Size Limit&lt;br /&gt;
|-&lt;br /&gt;
|320x240&lt;br /&gt;
|320x240 max. (Full-Screen)&lt;br /&gt;
|-&lt;br /&gt;
|480x272&lt;br /&gt;
|480x272 max. (Full-Screen)&lt;br /&gt;
|-&lt;br /&gt;
|640x480&lt;br /&gt;
|131072pixels (42% of Full Screen)&lt;br /&gt;
|-&lt;br /&gt;
|800x480&lt;br /&gt;
|131072pixels (34% of Full Screen)&lt;br /&gt;
|-&lt;br /&gt;
|800x600&lt;br /&gt;
|131072pixels (27% of Full Screen)&lt;br /&gt;
|-&lt;br /&gt;
|1366X480&lt;br /&gt;
|131072pixels (20% of Full Screen)&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt;3. 1~128frame max.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt;4. Memory Size may vary by model.&lt;br /&gt;
&lt;br /&gt;
= Elements in PAGE Limitation =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|&#039;&#039;&#039;icon&#039;&#039;&#039;&lt;br /&gt;
|&#039;&#039;&#039;Mnemonic&#039;&#039;&#039;&lt;br /&gt;
|&#039;&#039;&#039;Name&#039;&#039;&#039;&lt;br /&gt;
|&#039;&#039;&#039;Linked VP.&#039;&#039;&#039;&lt;br /&gt;
|&#039;&#039;&#039;Linked IMG&#039;&#039;&#039;&lt;br /&gt;
|&#039;&#039;&#039;Editor Limit&#039;&#039;&#039;&lt;br /&gt;
|&#039;&#039;&#039;Memory Limit&#039;&#039;&#039;&lt;br /&gt;
|&#039;&#039;&#039;ID range&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|[[File:TPK.png|64x64px]]&lt;br /&gt;
|&#039;&#039;&#039;TPK&#039;&#039;&#039;&lt;br /&gt;
|Touch  Key&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;--&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|1x IMG_ICO or&lt;br /&gt;
&lt;br /&gt;
1x IMG_BKG (*1)&lt;br /&gt;
|≤256 / PAGE&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;--&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|0 ~ 255 (each page)&lt;br /&gt;
|-&lt;br /&gt;
|[[File:VPK.png|64x64px]]&lt;br /&gt;
|&#039;&#039;&#039;VPK&#039;&#039;&#039;&lt;br /&gt;
|Virtual  Key&lt;br /&gt;
|VP_N16 (*2)&lt;br /&gt;
&lt;br /&gt;
VP_N32 (*2)&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;--&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|≤64 / PAGE&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;--&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|0 ~ 63 (each page)&lt;br /&gt;
|-&lt;br /&gt;
|[[File:STS.png|64x64px]]&lt;br /&gt;
|&#039;&#039;&#039;STS&#039;&#039;&#039;&lt;br /&gt;
|Static  String&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;--&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;--&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|≤128 / PAGE&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;--&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|0 ~ 127 (each page)&lt;br /&gt;
|-&lt;br /&gt;
|[[File:STR.png|64x64px]]&lt;br /&gt;
|&#039;&#039;&#039;STR&#039;&#039;&#039;&lt;br /&gt;
|String  Element&lt;br /&gt;
|VP_STR&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;--&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|≤128 / PAGE&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;--&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|0 ~ 127 (each page)&lt;br /&gt;
|-&lt;br /&gt;
|[[File:Num.png|64x64px]]&lt;br /&gt;
|&#039;&#039;&#039;N16&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;N32&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;N64&#039;&#039;&#039;&lt;br /&gt;
|Number  Element&lt;br /&gt;
|VP_N16&lt;br /&gt;
&lt;br /&gt;
VP_N32&lt;br /&gt;
&lt;br /&gt;
VP_V64&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;--&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|≤120 / PAGE&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;--&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
--&lt;br /&gt;
&lt;br /&gt;
--&lt;br /&gt;
|0 ~ 119 (each page)&lt;br /&gt;
|-&lt;br /&gt;
|[[File:TMR.png|64x64px]]&lt;br /&gt;
|&#039;&#039;&#039;TMR&#039;&#039;&#039;&lt;br /&gt;
|Timer  Display&lt;br /&gt;
|VP_N32&lt;br /&gt;
&lt;br /&gt;
(timer only)&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;--&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|≤8 / PAGE&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;--&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|0 ~ 7 (each page)&lt;br /&gt;
|-&lt;br /&gt;
|[[File:RTC.png|64x64px]]&lt;br /&gt;
|&#039;&#039;&#039;RTC&#039;&#039;&#039;&lt;br /&gt;
|Real  Time Clock&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;--&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;--&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|≤8 / PAGE&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;--&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|0 ~ 7 (each page)&lt;br /&gt;
|-&lt;br /&gt;
|[[File:ICO.png|64x64px]]&lt;br /&gt;
|&#039;&#039;&#039;ICO&#039;&#039;&#039;&lt;br /&gt;
|Static  Icon&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;--&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|1x IMG_ICO&lt;br /&gt;
|≤128 / PAGE&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;--&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|0 ~ 127 (each page)&lt;br /&gt;
|-&lt;br /&gt;
|[[File:ANI.png|64x64px]]&lt;br /&gt;
|&#039;&#039;&#039;ANI&#039;&#039;&#039;&lt;br /&gt;
|Animation  Element&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;--&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|1x IMG_ANI&lt;br /&gt;
|≤8 / PAGE&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;--&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|0 ~ 7 (each page)&lt;br /&gt;
|-&lt;br /&gt;
|[[File:IDX BIT.png|64x64px]]&lt;br /&gt;
|&#039;&#039;&#039;IDX_BIT&#039;&#039;&#039;&lt;br /&gt;
|Bit  Icon&lt;br /&gt;
|VP_N16&lt;br /&gt;
&lt;br /&gt;
VP_N32&lt;br /&gt;
|2(MAX) x IMG_ICON&lt;br /&gt;
|≤64 / PAGE&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;--&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|0 ~ 63 (each page)&lt;br /&gt;
|-&lt;br /&gt;
|[[File:IDX.png|64x64px]]&lt;br /&gt;
|&#039;&#039;&#039;IDX&#039;&#039;&#039;&lt;br /&gt;
|Indexed  Icon&lt;br /&gt;
|VP_N16&lt;br /&gt;
|10000(MAX) x IMG_ICON&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; |≤64 / PAGE&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;--&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; |0 ~ 63 (each page)&lt;br /&gt;
|-&lt;br /&gt;
|[[File:TCM.png|64x64px]]&lt;br /&gt;
|&#039;&#039;&#039;TCM&#039;&#039;&#039;&lt;br /&gt;
|Tachometer&lt;br /&gt;
|VP_N16&lt;br /&gt;
|181(MAX) x IMG_ICON&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;--&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|[[File:IDX DEC.png|64x64px]]&lt;br /&gt;
|&#039;&#039;&#039;I16&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;I32&#039;&#039;&#039;&lt;br /&gt;
|Decimal  Icon&lt;br /&gt;
|VP_N16&lt;br /&gt;
&lt;br /&gt;
VP_N32&lt;br /&gt;
|12x IMG_ICON&lt;br /&gt;
&lt;br /&gt;
(0~9,”.”,”-“)&lt;br /&gt;
|≤32 / PAGE&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;--&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|0 ~ 31 (each page)&lt;br /&gt;
|-&lt;br /&gt;
|[[File:B16.png|64x64px]]&lt;br /&gt;
|&#039;&#039;&#039;B16&#039;&#039;&#039;&lt;br /&gt;
|Progress  Bar&lt;br /&gt;
|VP_N16&lt;br /&gt;
|1x IMG_ICON&lt;br /&gt;
|≤32 / PAGE&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;--&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|0 ~ 31 (each page)&lt;br /&gt;
|-&lt;br /&gt;
|[[File:G16.png|64x64px]]&lt;br /&gt;
|&#039;&#039;&#039;G16&#039;&#039;&#039;&lt;br /&gt;
|Graph  Element&lt;br /&gt;
|VP_G16&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;--&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|≤8 / PAGE&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;--&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|0 ~ 7 (each page)&lt;br /&gt;
|-&lt;br /&gt;
|[[File:BP1.png|64x64px]]&lt;br /&gt;
|&#039;&#039;&#039;BP1&#039;&#039;&#039;&lt;br /&gt;
|Bitmap  Element&lt;br /&gt;
|VP_BP1&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;--&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|≤32 / PAGE&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;--&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|0 ~ 31 (each page)&lt;br /&gt;
|-&lt;br /&gt;
|[[File:QRC.png|64x64px]]&lt;br /&gt;
|&#039;&#039;&#039;QRC&#039;&#039;&#039;&lt;br /&gt;
|QR  Code Element&lt;br /&gt;
|VP_STR&lt;br /&gt;
&lt;br /&gt;
VP_N16 (in seq.)&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;--&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|≤4 / PAGE&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;--&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|0 ~ 3 (each page)&lt;br /&gt;
|-&lt;br /&gt;
|[[File:DPD.png|64x64px]]&lt;br /&gt;
|&#039;&#039;&#039;DPD&#039;&#039;&#039;&lt;br /&gt;
|Draw  Pad&lt;br /&gt;
|VP_N16 (in seq.)&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;--&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|≤4 / PAGE&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;--&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|0 ~ 3 (each page)&lt;br /&gt;
|}&lt;br /&gt;
Note:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt;1. IMG_ICO for key-down display, IMG_BKG will be cropped to key size for key-down display&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt;2. Monitoring values&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt;3. Element display Size: 8x8 (MIN), except Bitmap Element&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt;4. The above limitation is to ensure the display performance, though it can be override by the “config.ini” in the SGTools installation folder. (Remember to backup the file before edit!)&lt;br /&gt;
&lt;br /&gt;
= System Registers =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|&#039;&#039;&#039;Address&#039;&#039;&#039;&lt;br /&gt;
|&#039;&#039;&#039;System Register&#039;&#039;&#039;&lt;br /&gt;
|&#039;&#039;&#039;Descriptions&#039;&#039;&#039;&lt;br /&gt;
|&#039;&#039;&#039;Note&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|0xFFFF00&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
0xFFFF07&lt;br /&gt;
|Timer_Ctrl0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Timer_Ctrl7&lt;br /&gt;
|D[0]=0 : stop the timer&lt;br /&gt;
&lt;br /&gt;
D[0]=1 : start the timer&lt;br /&gt;
&lt;br /&gt;
D[1]=0 : count down, time down to 0x00000000&lt;br /&gt;
&lt;br /&gt;
D[1]=1 : count up, time up to 0x7fffffff&lt;br /&gt;
&lt;br /&gt;
D[7:2]=000000 : reserved&lt;br /&gt;
|(*1)&lt;br /&gt;
|-&lt;br /&gt;
|0xFFFF10&lt;br /&gt;
|RTC_Year&lt;br /&gt;
|Value=0~99&lt;br /&gt;
| rowspan=&amp;quot;7&amp;quot; |0xffff10~0xffff16&lt;br /&gt;
&lt;br /&gt;
should be written at the same time&lt;br /&gt;
|-&lt;br /&gt;
|0xFFFF11&lt;br /&gt;
|RTC_Month&lt;br /&gt;
|Value=1~12&lt;br /&gt;
|-&lt;br /&gt;
|0xFFFF12&lt;br /&gt;
|RTC_Day&lt;br /&gt;
|Value=1~31&lt;br /&gt;
|-&lt;br /&gt;
|0xFFFF13&lt;br /&gt;
|RTC_Hour&lt;br /&gt;
|Value=0~23&lt;br /&gt;
|-&lt;br /&gt;
|0xFFFF14&lt;br /&gt;
|RTC_Minute&lt;br /&gt;
|Value=0~59&lt;br /&gt;
|-&lt;br /&gt;
|0xFFFF15&lt;br /&gt;
|RTC_Second&lt;br /&gt;
|Value=0~59&lt;br /&gt;
|-&lt;br /&gt;
|0xFFFF16&lt;br /&gt;
|RTC_Set&lt;br /&gt;
|Value=1 : sync the  time&lt;br /&gt;
|-&lt;br /&gt;
|0xFFFF20&lt;br /&gt;
|Buzzer&lt;br /&gt;
|Value=0~63; buzzer beeping duration (*1)&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; |See Project  Setting for details&lt;br /&gt;
|-&lt;br /&gt;
|0xFFFF21&lt;br /&gt;
|Backlight&lt;br /&gt;
|Value=0~63; Real time  backlight brightness setting (*1)&lt;br /&gt;
|-&lt;br /&gt;
|0xFFFF22&lt;br /&gt;
|ScreenSaverBacklight&lt;br /&gt;
|Value=0~63; Screen Saver  Backlight Brightness (*1)&lt;br /&gt;
| rowspan=&amp;quot;7&amp;quot; |see Screen Saver  section for details&lt;br /&gt;
|-&lt;br /&gt;
|0xFFFF23&lt;br /&gt;
|ScreenSaverPage_H&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; |Value=0~999; Screen Saver  display Page (*2)&lt;br /&gt;
|-&lt;br /&gt;
|0xFFFF24&lt;br /&gt;
|ScreenSaverPage_L&lt;br /&gt;
|-&lt;br /&gt;
|0xFFFF25&lt;br /&gt;
|ScreenSaver Timer1_H&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; |Value=0~65535; Screen saver  delay time 1 (*2)&lt;br /&gt;
|-&lt;br /&gt;
|0xFFFF26&lt;br /&gt;
|ScreenSaver Timer1_L&lt;br /&gt;
|-&lt;br /&gt;
|0xFFFF27&lt;br /&gt;
|ScreenSaver Timer2_H&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; |Value=0~65535; Screen saver  delay time 2 (*2)&lt;br /&gt;
|-&lt;br /&gt;
|0xFFFF28&lt;br /&gt;
|ScreenSaver Timer2_L&lt;br /&gt;
|-&lt;br /&gt;
|0xFFFF30&lt;br /&gt;
|Font_CodePage&lt;br /&gt;
|Font Code Page  index value (*1) (*3)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|0xFFFF31&lt;br /&gt;
|Font_Country&lt;br /&gt;
|Font Country  index value (*1) (*4)&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
Note:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt;1. Value can be update by command System_register_write (0xb3) to access the register&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt;2. Value should be written at the same time by command Sucesstive_write (0x82)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt;3. Code Page index value&lt;br /&gt;
{|&lt;br /&gt;
|&#039;&#039;&#039;index&#039;&#039;&#039;&lt;br /&gt;
|&#039;&#039;&#039;Code Page&#039;&#039;&#039;&lt;br /&gt;
|..........&lt;br /&gt;
|&#039;&#039;&#039;index&#039;&#039;&#039;&lt;br /&gt;
|&#039;&#039;&#039;Code Page&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|437(OEM United States)&lt;br /&gt;
|&lt;br /&gt;
|12&lt;br /&gt;
|1252(ANSI Latin I)&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|737(OEM Greek437G)&lt;br /&gt;
|&lt;br /&gt;
|13&lt;br /&gt;
|1253(ANSI Greek)&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|852(OEM Latin II)&lt;br /&gt;
|&lt;br /&gt;
|14&lt;br /&gt;
|1254(ANSI Turkish)&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|860(OEM Portuguese)&lt;br /&gt;
|&lt;br /&gt;
|15&lt;br /&gt;
|1255(ANSI Hebrew)&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|863(OEM Canadian French)&lt;br /&gt;
|&lt;br /&gt;
|16&lt;br /&gt;
|1256(ANSI Arabic)&lt;br /&gt;
|-&lt;br /&gt;
|6&lt;br /&gt;
|865(OEM Nordic)&lt;br /&gt;
|&lt;br /&gt;
|17&lt;br /&gt;
|1257(ANSI Baltic)&lt;br /&gt;
|-&lt;br /&gt;
|7&lt;br /&gt;
|866(OEM Russian)&lt;br /&gt;
|&lt;br /&gt;
|18&lt;br /&gt;
|1258(ANSI/OEM Viet Nam)&lt;br /&gt;
|-&lt;br /&gt;
|8&lt;br /&gt;
|874(ANSI/OEM Thai)&lt;br /&gt;
|&lt;br /&gt;
|19&lt;br /&gt;
|GB2312 (Simplified  Chinese)&lt;br /&gt;
|-&lt;br /&gt;
|9&lt;br /&gt;
|932(ANSI/OEM Japanese  Shift JIS)&lt;br /&gt;
|&lt;br /&gt;
|20&lt;br /&gt;
|GBK (Simplified Chinese)&lt;br /&gt;
|-&lt;br /&gt;
|10&lt;br /&gt;
|1250(ANSI Central Europe)&lt;br /&gt;
|&lt;br /&gt;
|21&lt;br /&gt;
|ECU-KR ( Korea )&lt;br /&gt;
|-&lt;br /&gt;
|11&lt;br /&gt;
|1251(ANSI Cyrillic)&lt;br /&gt;
|&lt;br /&gt;
|22&lt;br /&gt;
|BIG5 (Traditional Chinese)&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|uni-code (with font config &amp;lt;3&amp;gt; TTF)&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt;4. Country index value&lt;br /&gt;
{|&lt;br /&gt;
|&#039;&#039;&#039;index&#039;&#039;&#039;&lt;br /&gt;
|&#039;&#039;&#039;Code Page&#039;&#039;&#039;&lt;br /&gt;
|..........&lt;br /&gt;
|&#039;&#039;&#039;index&#039;&#039;&#039;&lt;br /&gt;
|&#039;&#039;&#039;Code Page&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|USA&lt;br /&gt;
|&lt;br /&gt;
|7&lt;br /&gt;
|DenmarkⅡ&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|France&lt;br /&gt;
|&lt;br /&gt;
|8&lt;br /&gt;
|Sweden&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|Germany&lt;br /&gt;
|&lt;br /&gt;
|9&lt;br /&gt;
|Italy&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|UK&lt;br /&gt;
| &lt;br /&gt;
|10&lt;br /&gt;
|Spain&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|DenmarkⅠ&lt;br /&gt;
|&lt;br /&gt;
|11&lt;br /&gt;
|Japan&lt;br /&gt;
|-&lt;br /&gt;
|6&lt;br /&gt;
|DenmarkⅡ&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Usr255</name></author>
	</entry>
	<entry>
		<id>https://topway.app/sld_doc/en/index.php?title=MediaWiki:Sidebar&amp;diff=1098</id>
		<title>MediaWiki:Sidebar</title>
		<link rel="alternate" type="text/html" href="https://topway.app/sld_doc/en/index.php?title=MediaWiki:Sidebar&amp;diff=1098"/>
		<updated>2025-10-20T05:02:32Z</updated>

		<summary type="html">&lt;p&gt;Usr255: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
* Smart LCD (SLD)&lt;br /&gt;
** SLD Introduction|SLD Introduction&lt;br /&gt;
** Quick Start|Quick Start&lt;br /&gt;
** Operations|Operations&lt;br /&gt;
** Function Features|Function Features&lt;br /&gt;
** http://192.168.10.3/_P8/sld_doc/zh | [Chinese Site]&lt;br /&gt;
* Development Tools&lt;br /&gt;
** SGTools|SGTools&lt;br /&gt;
** Action Elements|Action Elements&lt;br /&gt;
** Character Elements|Character Elements&lt;br /&gt;
** Image Elements|Image Elements&lt;br /&gt;
** Graphics Elements|Graphics Elements&lt;br /&gt;
** Keyboard Elements|Keyboard Elements&lt;br /&gt;
** Elements Sub Func|Elements Sub Func&lt;br /&gt;
** Page Func|Page Func&lt;br /&gt;
** Display UI Download|Display UI Download&lt;br /&gt;
* Communication&lt;br /&gt;
** Communication Interface|Communication Interface&lt;br /&gt;
** Serial Commands Protocol|Serial Commands Protocol&lt;br /&gt;
** MODBUS Slave Protocol|MODBUS Slave Protocol&lt;br /&gt;
** MODBUS Master Protocol|MODBUS Master Protocol&lt;br /&gt;
* Others&lt;br /&gt;
** Lua Script|Lua Script&lt;br /&gt;
** Memory Area|Memory Area&lt;br /&gt;
** Memory &amp;amp; Ranges|Memory &amp;amp; Ranges&lt;br /&gt;
** FAQ-01|FAQ-01&lt;br /&gt;
** FAQ-02|FAQ-02&lt;br /&gt;
* Display Project&lt;br /&gt;
** Tutorials|Tutorials&lt;br /&gt;
** Examples-01|Examples-01&lt;br /&gt;
** Examples-02|Examples-02&lt;br /&gt;
** Tech-Memos-01|Tech-Memos-01&lt;/div&gt;</summary>
		<author><name>Usr255</name></author>
	</entry>
	<entry>
		<id>https://topway.app/sld_doc/en/index.php?title=MediaWiki:Sidebar&amp;diff=1097</id>
		<title>MediaWiki:Sidebar</title>
		<link rel="alternate" type="text/html" href="https://topway.app/sld_doc/en/index.php?title=MediaWiki:Sidebar&amp;diff=1097"/>
		<updated>2025-10-20T05:02:09Z</updated>

		<summary type="html">&lt;p&gt;Usr255: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
* Smart LCD (SLD)&lt;br /&gt;
** SLD Introduction|SLD Introduction&lt;br /&gt;
** Quick Start|Quick Start&lt;br /&gt;
** Operations|Operations&lt;br /&gt;
** Function Features|Function Features&lt;br /&gt;
** http://192.168.10.3/_P8/sld_doc/zh | [Chinese Site]&lt;br /&gt;
* Development Tools&lt;br /&gt;
** SGTools|SGTools&lt;br /&gt;
** Action Elements|Action Elements&lt;br /&gt;
** Character Elements|Character Elements&lt;br /&gt;
** Image Elements|Image Elements&lt;br /&gt;
** Graphics Elements|Graphics Elements&lt;br /&gt;
** Keyboard Elements|Keyboard Elements&lt;br /&gt;
** Elements Sub Func|Elements Sub Func&lt;br /&gt;
** Page Func|Page Func&lt;br /&gt;
** Display UI Download|Display UI Download&lt;br /&gt;
* Communication&lt;br /&gt;
** Communication Interface|Communication Interface&lt;br /&gt;
** Serial Commands Protocol|Serial Commands Protocol&lt;br /&gt;
** MODBUS Slave Protocol|MODBUS Slave Protocol&lt;br /&gt;
** MODBUS Master Protocol|MODBUS Master Protocol&lt;br /&gt;
* Others&lt;br /&gt;
** Lua Script|Lua Script&lt;br /&gt;
** Memory Area|Memory Area&lt;br /&gt;
** Memory &amp;amp; Ranges |Memory &amp;amp; Ranges&lt;br /&gt;
** FAQ-01|FAQ-01&lt;br /&gt;
** FAQ-02|FAQ-02&lt;br /&gt;
* Display Project&lt;br /&gt;
** Tutorials|Tutorials&lt;br /&gt;
** Examples-01|Examples-01&lt;br /&gt;
** Examples-02|Examples-02&lt;br /&gt;
** Tech-Memos-01|Tech-Memos-01&lt;/div&gt;</summary>
		<author><name>Usr255</name></author>
	</entry>
	<entry>
		<id>https://topway.app/sld_doc/en/index.php?title=SGTools&amp;diff=1091</id>
		<title>SGTools</title>
		<link rel="alternate" type="text/html" href="https://topway.app/sld_doc/en/index.php?title=SGTools&amp;diff=1091"/>
		<updated>2025-10-14T07:17:38Z</updated>

		<summary type="html">&lt;p&gt;Usr255: /* Project Setting (Menu - Tools - Project Setting) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== TOPWAY SGTools ==&lt;br /&gt;
SGTools is a UI design tools for Smart LCD. SGTools enables UI design with zero coding. It dramatically simplifies and speeds up the whole product design process&lt;br /&gt;
&lt;br /&gt;
== SGTools Layout ==&lt;br /&gt;
[[File:SGT-Interface.png|800x800px]]&lt;br /&gt;
{|&lt;br /&gt;
|A.&lt;br /&gt;
|menu and config&lt;br /&gt;
|file tools for project open, save, project options&lt;br /&gt;
|-&lt;br /&gt;
|B.&lt;br /&gt;
|alignment tools&lt;br /&gt;
|alignment and display filter tools; with compile and download tools&lt;br /&gt;
|-&lt;br /&gt;
|C.&lt;br /&gt;
|elements for UI&lt;br /&gt;
|display elements tools&lt;br /&gt;
|-&lt;br /&gt;
|D.&lt;br /&gt;
|resource (VP, icons, etc)&lt;br /&gt;
|Resource windows (right click on the resources); built new page; import pictures (IMG_BKG, IMG_ICO, IMG_ANI); allocated VP variable (VP_N16, VP_N32, VP_N64); user file, etc... (*1)&lt;br /&gt;
|-&lt;br /&gt;
|E.&lt;br /&gt;
|UI editing area&lt;br /&gt;
|The working area for composing the display page. User could build element onto the page.&lt;br /&gt;
|-&lt;br /&gt;
|F.&lt;br /&gt;
|Elements or page properties&lt;br /&gt;
|Display the selected element properties or Page properties&lt;br /&gt;
|-&lt;br /&gt;
|G.&lt;br /&gt;
|prompt output area&lt;br /&gt;
|Prompt output window show the compiling information, warning and error information&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== SGTools Menu - File ==&lt;br /&gt;
&lt;br /&gt;
=== Start (Menu - File - Welcome) ===&lt;br /&gt;
At the start up of SGTools, a pop-up Welcome interface for user to select which project to work on.&lt;br /&gt;
&lt;br /&gt;
[[File:SGT welcome.png]]&lt;br /&gt;
&lt;br /&gt;
=== New Project (Menu - File - New Project) ===&lt;br /&gt;
[[File:File-new(128x128).png|64x64px]] For New Project, user can type in the project name and select the folder for that project. It is important to select the correct screen size that matches the target Smart LCD. (0°/180° for landscape projects), (90°/270° for portrait projects).  After click the OK button, SGTools will create a folder in to the Project Folder.&lt;br /&gt;
&lt;br /&gt;
[[File:SGT New Project.png]]&lt;br /&gt;
&lt;br /&gt;
=== Open Project (Menu - File - Open Project) ===&lt;br /&gt;
[[File:File-open(128x128).png|64x64px]] Open Project look for the project folder with .tpj or .tp9 file inside&lt;br /&gt;
=== Save (Menu - File - Save) ===&lt;br /&gt;
[[File:File-save(128x128).png|64x64px]]Save the current project.&lt;br /&gt;
&lt;br /&gt;
=== Save As (Menu - File - Save As) ===&lt;br /&gt;
Save the current project another (folder) name.&lt;br /&gt;
&lt;br /&gt;
=== Close Project (Menu - File - Close) ===&lt;br /&gt;
[[File:File-close(128x128).png|64x64px]]Close the current project.&lt;br /&gt;
&lt;br /&gt;
== SGTools Menu - Tools ==&lt;br /&gt;
&lt;br /&gt;
=== Editor Setting (Menu - Tools - Option) ===&lt;br /&gt;
[[File:SGT Editor Setting.png|480x480px]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;In Editor Setting&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* Fine adjust all the image color tone during compile by setting Image Gamma&lt;br /&gt;
* Select Compile Options&lt;br /&gt;
* Output Project Image File (see “Download the display project” section for details)&lt;br /&gt;
* Open Output folder after compile&lt;br /&gt;
* Compile Project before download&lt;br /&gt;
* Save the project before compile&lt;br /&gt;
* Compile Orphan Background Images&lt;br /&gt;
&lt;br /&gt;
=== Project Setting (Menu - Tools - Project Setting) ===&lt;br /&gt;
[[File:Tools icon(128x128).png|64x64px]] Project Setting&lt;br /&gt;
&lt;br /&gt;
[[File:SGT Project Setting.png|480x480px]]&lt;br /&gt;
&lt;br /&gt;
* Page: Starting page to show at power on&lt;br /&gt;
* power on &amp;quot;Backlight Brightness&amp;quot; level&lt;br /&gt;
* select one of the &amp;quot;Screen Saver Mode&amp;quot;, user can select one of the following with related parameter [[File:Screen saver mode.png]]&lt;br /&gt;
* Delay Time1 = 0 can disable the Screen Saver Function&lt;br /&gt;
* set &amp;quot;Buzzer&amp;quot; beeping length (0=no sound)&lt;br /&gt;
* set RTC (real time clock) operation mode [[File:RTC mode.png|407x407px]]&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!&#039;&#039;&#039;RTC Mode&#039;&#039;&#039;&lt;br /&gt;
!&#039;&#039;&#039;Operating with RTC battery&#039;&#039;&#039;&lt;br /&gt;
!&#039;&#039;&#039;Operating without RTC battery&#039;&#039;&#039;&lt;br /&gt;
!&#039;&#039;&#039;Descriptions&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|Enable&lt;br /&gt;
|1st power up takes 6s;&lt;br /&gt;
next power up takes 1s&lt;br /&gt;
|every power up takes 6s&lt;br /&gt;
|RTC runs with correct init&lt;br /&gt;
|-&lt;br /&gt;
|Disable&lt;br /&gt;
|every power up takes 1s&lt;br /&gt;
|every power up takes 1s&lt;br /&gt;
|RTC stops&lt;br /&gt;
|-&lt;br /&gt;
|Engineering Mode&lt;br /&gt;
|every power up takes 1s&lt;br /&gt;
|every power up takes 1s&lt;br /&gt;
|RTC runs without init, it might not run correctly. It is NOT suggested for production setting&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
* set RS232 communication baud rate&lt;br /&gt;
* set “Command Format”, three kinds of command Format are available.(normal command, normal command + instruction length, normal command + instruction length + CRC)  [[File:SGT Project Setting CommandFormat.png|297x297px]]&lt;br /&gt;
* set “Command Timeout” (0=no timeout)&lt;br /&gt;
* set power on &amp;quot;Country Code&amp;quot; for ASCII display&lt;br /&gt;
* set power on &amp;quot;Code Page&amp;quot; for ext. char &amp;amp; decoding&lt;br /&gt;
* set “Enable ACK” to provide command responses; “:&amp;gt;” : ready for new command; “!&amp;gt;” : command error&lt;br /&gt;
* set &amp;quot;Touch-Key lock on touch&amp;quot; to lock the touch down key and action on release&lt;br /&gt;
* set &amp;quot;Upside-down&amp;quot; to flip screen at run-time&lt;br /&gt;
* Partition2 can be create for data storage &lt;br /&gt;
&lt;br /&gt;
* LAN settings only available for SmartLCD equipped with Ethernet interface [[File:SGT LAN Setting a.png|480x480px]]&lt;br /&gt;
* IP is the static assigned IP address for a SmartLCD&lt;br /&gt;
* IP, TCP Port, Mask and GW(Gateway) are standard Ethernet config parameters&lt;br /&gt;
* TFTP Port is for remote TFTP file access&lt;br /&gt;
&lt;br /&gt;
=== Font Setting (Menu - Tools - Font Setting) ===&lt;br /&gt;
[[File:Font config icon(128x128).png|64x64px]]There are 3 sections of Fonts.&lt;br /&gt;
&lt;br /&gt;
Font Config &amp;lt;1&amp;gt;, the Font Width and Height are fixed and mainly for ASCII Char. (with some default font, vary by model)&lt;br /&gt;
&lt;br /&gt;
[[File:SGT FontConfig1.png|480x480px]] [[File:SGT FontConfig1 build.png|480x480px]]&lt;br /&gt;
&lt;br /&gt;
Font Config &amp;lt;2&amp;gt;, provide more free option about Size and Decoding selection. (without font by default)&lt;br /&gt;
&lt;br /&gt;
[[File:SGT FontConfig2.png|480x480px]] [[File:SGT FontConfig2 build.png|480x480px]]&lt;br /&gt;
&lt;br /&gt;
Font Config &amp;lt;3&amp;gt;, support True Type Font (TTF) for some models. (without font by default)&lt;br /&gt;
&lt;br /&gt;
[[File:SGT FontConfig3.png|480x480px]]&lt;br /&gt;
&lt;br /&gt;
Right click on the font table, select &amp;quot;build&amp;quot; could build the font with several options. It is suggested to delete un-used Font area to free up memory.&lt;br /&gt;
&lt;br /&gt;
=== Compile (Menu - Tools - Compile) ===&lt;br /&gt;
[[File:Compile(128x128).png|64x64px]] Compile [F7]&lt;br /&gt;
&lt;br /&gt;
After finish the layout, &amp;quot;Built Project Files&amp;quot; will compile all the resource and font etc in to a set of files. It could download or copy to the Smart LCD at any time. It will pop-up the output folder inside the Project Folder&lt;br /&gt;
&lt;br /&gt;
=== Download to Module (Menu - Tools - Download to Module) ===&lt;br /&gt;
[[File:Quick-download(128x128).png|64x64px]] Download to Module [F9]&lt;br /&gt;
&lt;br /&gt;
After connect the Smart LCD USB to user PC, the Smart LCD will appear as a removable drive. Using &amp;quot;Download to Module&amp;quot; will copy the compiled project files into the Smart LCD.&lt;br /&gt;
&lt;br /&gt;
[[File:SGT DownloadToModule-successful.png|480x480px]]&lt;br /&gt;
&lt;br /&gt;
Note. it will refuse to download without Smart LCD&lt;/div&gt;</summary>
		<author><name>Usr255</name></author>
	</entry>
	<entry>
		<id>https://topway.app/sld_doc/en/index.php?title=Lua_Script&amp;diff=1090</id>
		<title>Lua Script</title>
		<link rel="alternate" type="text/html" href="https://topway.app/sld_doc/en/index.php?title=Lua_Script&amp;diff=1090"/>
		<updated>2025-09-28T04:17:59Z</updated>

		<summary type="html">&lt;p&gt;Usr255: /* tpkhook */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Smart LCD Lua Script Support ==&lt;br /&gt;
Lua script is supported in some of the TOPWAY Smart LCD to enhance the flexibility. Engineer may refine the Smart LCD functionality with script. The provided Lua functionality support most of the features of Lua 5.3 except OS operation. (please refer to lua.net for Lua 5.3 details)It also extended with hmt library for Smart LCD variables access, function control and value return etc.&lt;br /&gt;
&lt;br /&gt;
== Lua Script Structure ==&lt;br /&gt;
&lt;br /&gt;
==== Basic structure ====&lt;br /&gt;
 -- define variable(s)&lt;br /&gt;
 Script_Variable01 = 0x00&lt;br /&gt;
 &lt;br /&gt;
 -- main loop&lt;br /&gt;
 luamain = function(void)&lt;br /&gt;
 &lt;br /&gt;
 return 0&lt;br /&gt;
 end&lt;br /&gt;
Note:&amp;lt;BR&amp;gt;main loop run continually&amp;lt;BR&amp;gt;intensive loop in the main loop may affect the Smart LCD UI operations&lt;br /&gt;
&lt;br /&gt;
==== Advance structure with hooks ====&lt;br /&gt;
 -- define variable(s)&lt;br /&gt;
 Script_Variable01 = 0x00&lt;br /&gt;
 &lt;br /&gt;
 -- main loop&lt;br /&gt;
 luamain = function(void)&lt;br /&gt;
 &lt;br /&gt;
 return 0&lt;br /&gt;
 end&lt;br /&gt;
 &lt;br /&gt;
 -- touch key hook&lt;br /&gt;
 tpkhook = function(page, id, state)&lt;br /&gt;
 return 0&lt;br /&gt;
 end&lt;br /&gt;
 &lt;br /&gt;
 -- page hook&lt;br /&gt;
 pagechangehook = function(pageid)&lt;br /&gt;
 &lt;br /&gt;
 return 0&lt;br /&gt;
 end&lt;br /&gt;
Note:&lt;br /&gt;
&lt;br /&gt;
* main loop run continually&lt;br /&gt;
* intensive loop in the main loop may affect the Smart LCD UI operations&lt;br /&gt;
* hooks share the MCU time with the main loop.&lt;br /&gt;
* looping or long delay will affect the main loop&lt;br /&gt;
* “wait loop” is not allowed in the hooks.&lt;br /&gt;
&lt;br /&gt;
== Smart LCD VP variables ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Mnemonic&lt;br /&gt;
!Name&lt;br /&gt;
!Memory Limit&lt;br /&gt;
!Address Range&lt;br /&gt;
|-&lt;br /&gt;
|VP_STR&lt;br /&gt;
|String Variable&lt;br /&gt;
|1024(MAX)*(127+1)byte&lt;br /&gt;
|0x000000~0x01FF80&lt;br /&gt;
|-&lt;br /&gt;
|VP_N16&lt;br /&gt;
|16Bit Integer Variable&lt;br /&gt;
|32512(MAX)*(2)byte&lt;br /&gt;
|0x080000~0x08FDFE&lt;br /&gt;
|-&lt;br /&gt;
|VP_N32&lt;br /&gt;
|32Bit Integer Variable&lt;br /&gt;
|16128(MAX)*(4)byte&lt;br /&gt;
|0x020000~0x02FEFC&lt;br /&gt;
|-&lt;br /&gt;
|VP_N64&lt;br /&gt;
|64Bit Integer Variable&lt;br /&gt;
|7936(MAX)*(8)byte&lt;br /&gt;
|0x030000~0x03F7F8&lt;br /&gt;
|-&lt;br /&gt;
|VP_SYS&lt;br /&gt;
|System Register Variable&lt;br /&gt;
|256(MAX)*(1)byte&lt;br /&gt;
|0xFFFF00~0xFFFFFF&lt;br /&gt;
|}&lt;br /&gt;
Note. Please also refer to Smart LCD handbook for VP variables details&lt;br /&gt;
&amp;lt;span id=&amp;quot;hmt-functions-summary&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
== hmt Lua Functions Summary ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
| &#039;&#039;&#039;Category&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;Function Name&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;Descriptions&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
! rowspan=&amp;quot;12&amp;quot; |VP&lt;br /&gt;
read/write&lt;br /&gt;
| hmt.readvpstr(addr)&lt;br /&gt;
| Read VP_STR value&lt;br /&gt;
|-&lt;br /&gt;
| hmt.writevpstr(addr, string)&lt;br /&gt;
| Write VP_STR value&lt;br /&gt;
|-&lt;br /&gt;
| hmt.readvp16(addr)&lt;br /&gt;
| Read VP_16 value&lt;br /&gt;
|-&lt;br /&gt;
| hmt.writevp16(addr, value)&lt;br /&gt;
| Write VP_16 value&lt;br /&gt;
|-&lt;br /&gt;
| hmt.readvp32(addr)&lt;br /&gt;
| Read VP_32 value&lt;br /&gt;
|-&lt;br /&gt;
| hmt.readvp32f(addr)&lt;br /&gt;
| Read VP_32 value (floating point value)&lt;br /&gt;
|-&lt;br /&gt;
| hmt.writevp32(addr, value)&lt;br /&gt;
| Write VP_32 value&lt;br /&gt;
|-&lt;br /&gt;
| hmt.readvp64(addr)&lt;br /&gt;
| Read VP_64 value&lt;br /&gt;
|-&lt;br /&gt;
| hmt.readvp64f(addr)&lt;br /&gt;
| Read VP_64 value (floating point value)&lt;br /&gt;
|-&lt;br /&gt;
| hmt.writevp64(addr, value)&lt;br /&gt;
| Write VP_64 value&lt;br /&gt;
|-&lt;br /&gt;
| hmt.readvpreg(addr)&lt;br /&gt;
| Read VP_SYS value&lt;br /&gt;
|-&lt;br /&gt;
| hmt.writevpreg(addr, value)&lt;br /&gt;
| Write VP_SYS value&lt;br /&gt;
|-&lt;br /&gt;
! rowspan=&amp;quot;9&amp;quot; | System&lt;br /&gt;
| hmt.changepage(pageid)&lt;br /&gt;
| Display a pre-stored PAGE&lt;br /&gt;
|-&lt;br /&gt;
| hmt.readpage()&lt;br /&gt;
| Read Page ID&lt;br /&gt;
|-&lt;br /&gt;
| hmt.gettick()&lt;br /&gt;
| Read system time&lt;br /&gt;
|-&lt;br /&gt;
| hmt.delayms(time)&lt;br /&gt;
| Delay in ms(*1)&lt;br /&gt;
|-&lt;br /&gt;
| hmt.runcmd(table, num)&lt;br /&gt;
| Execute terminal command (without packet header and taill)&lt;br /&gt;
|-&lt;br /&gt;
| hmt.bypass(is)&lt;br /&gt;
| Disable Smart LCD terminal command execution (I/O); is=1 for disable; is=0 for enable(normal)&lt;br /&gt;
|-&lt;br /&gt;
| hmt.crc16calc(table, num)&lt;br /&gt;
| Generate a CRC value&lt;br /&gt;
|-&lt;br /&gt;
| hmt.formatdisk2()&lt;br /&gt;
| Format module flash second partition (*4)&lt;br /&gt;
|-&lt;br /&gt;
| hmt.inituart(baudrate,parity)&lt;br /&gt;
| Set baud rate and parity parameters of A and B (*4)&lt;br /&gt;
|-&lt;br /&gt;
! rowspan=&amp;quot;5&amp;quot; | Thread&lt;br /&gt;
| hmt.createthread(function())&lt;br /&gt;
| Create a thread and return a thread object (*4)&lt;br /&gt;
|-&lt;br /&gt;
| suspend()&lt;br /&gt;
| Suspend thread (*4)&lt;br /&gt;
|-&lt;br /&gt;
| resume()&lt;br /&gt;
| Resume thread (*4)&lt;br /&gt;
|-&lt;br /&gt;
| terminate()&lt;br /&gt;
| Terminate thread (*4)&lt;br /&gt;
|-&lt;br /&gt;
| getid()&lt;br /&gt;
| Get thread ID and handle (*4)&lt;br /&gt;
|-&lt;br /&gt;
! rowspan=&amp;quot;7&amp;quot; | UART0&lt;br /&gt;
| hmt.uartisempty()&lt;br /&gt;
| Check for UART0 buffer; 1 for empty; 0 for not empty&lt;br /&gt;
|-&lt;br /&gt;
| hmt.uartclearbuf()&lt;br /&gt;
| Clear UART0 buffer&lt;br /&gt;
|-&lt;br /&gt;
| hmt.getchar()&lt;br /&gt;
| Read a byte form UART0 buffer&lt;br /&gt;
|-&lt;br /&gt;
| hmt.putchar(char)&lt;br /&gt;
| Send a byte to UART0&lt;br /&gt;
|-&lt;br /&gt;
| hmt.uartsendbytes(table, num)&lt;br /&gt;
| Send a num of byte to UART0&lt;br /&gt;
|-&lt;br /&gt;
| hmt.uartlock()&lt;br /&gt;
| Lock UART0 before Lua sending data to UART0 (*2, *3)&lt;br /&gt;
|-&lt;br /&gt;
| hmt.uartunlock()&lt;br /&gt;
| Unlock UART0 after Lua sending data to UART0 (*2, *3)&lt;br /&gt;
|-&lt;br /&gt;
! rowspan=&amp;quot;7&amp;quot; | UART1&lt;br /&gt;
| hmt.uart1isempty()&lt;br /&gt;
| Check for UART1 buffer; 1 for empty; 0 for not empty&lt;br /&gt;
|-&lt;br /&gt;
| hmt.uart1clearbuf()&lt;br /&gt;
| Clear UART1 buffer&lt;br /&gt;
|-&lt;br /&gt;
| hmt.uart1getchar()&lt;br /&gt;
| Read a byte form UART1 buffer&lt;br /&gt;
|-&lt;br /&gt;
| hmt.uart1putchar(char)&lt;br /&gt;
| Send a byte to UART1&lt;br /&gt;
|-&lt;br /&gt;
| hmt.uart1sendbytes(table, num)&lt;br /&gt;
| Send a num of byte to UART1&lt;br /&gt;
|-&lt;br /&gt;
| hmt.uart1lock()&lt;br /&gt;
| Lock UART1 before sending data to UART1 (*2, *3)&lt;br /&gt;
|-&lt;br /&gt;
| hmt.uart1unlock()&lt;br /&gt;
| Unlock UART1 after sending data to UART1 (*2, *3)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Note.&amp;lt;br&amp;gt;*1. long delay may affect the Smart LCD normal operation.&amp;lt;br&amp;gt;*2. It is necessary to lock the UART for Lua access, if hmt.bypass is not enabled.&amp;lt;br&amp;gt;*3. Generally hmt.uartlock() and hmt.uartunlock() should be used in pair.&amp;lt;br&amp;gt;*4. Selected model only&lt;br /&gt;
&lt;br /&gt;
== VP read/write Functions ==&lt;br /&gt;
&lt;br /&gt;
=== hmt.readvpstr ===&lt;br /&gt;
{|&lt;br /&gt;
|&#039;&#039;&#039;Function&#039;&#039;&#039;&lt;br /&gt;
|hmt.readvpstr(addr)&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|Read VP_STR value&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Parameter&#039;&#039;&#039;&lt;br /&gt;
|addr is the VP_STR address (*1)&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Return Value&#039;&#039;&#039;&lt;br /&gt;
|String&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Example&#039;&#039;&#039;&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Lua Script&lt;br /&gt;
!Descriptions&lt;br /&gt;
|-&lt;br /&gt;
|local strvalue = ““&amp;lt;BR&amp;gt;strvalue = hmt.readvpstr(0x000080)&amp;lt;BR&amp;gt;print(“strvalue=”, strvalue)&lt;br /&gt;
|&lt;br /&gt;
* Put “TOPWAY” into VP_STR 0x000080 via SmartLCD UI&lt;br /&gt;
* define a local variable strvalue and put ““ inside&lt;br /&gt;
* copy value in VP_STR at 0x000080 to strvalue&lt;br /&gt;
* print to UART0&lt;br /&gt;
* it should find the following at the UART0&lt;br /&gt;
* &#039;&#039;&#039;strvalue=TOPWAY&#039;&#039;&#039;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== hmt.writevpstr ===&lt;br /&gt;
{|&lt;br /&gt;
|&#039;&#039;&#039;Function&#039;&#039;&#039;&lt;br /&gt;
|hmt.writevpstr(addr, string)&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|Write a value to VP_STR&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Parameter&#039;&#039;&#039;&lt;br /&gt;
|addr is the VP_STR address (*1), string is the value to be written&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Return Value&#039;&#039;&#039;&lt;br /&gt;
|nil&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Example&#039;&#039;&#039;&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Lua Script&lt;br /&gt;
!Descriptions&lt;br /&gt;
|-&lt;br /&gt;
|local strvalue = “ShenZhen”&amp;lt;br&amp;gt;hmt.writevpstr(0x000080, strvalue)&amp;lt;br&amp;gt;print(“0x000080:”, hmt.readvpstr(0x000080))&lt;br /&gt;
|&lt;br /&gt;
* define a local variable strvalue and put “ShenZhen” inside&lt;br /&gt;
* copy the strvalue to VP_STR at 0x000080&lt;br /&gt;
* print to UART0&lt;br /&gt;
* it should find the following at the UART0&lt;br /&gt;
* &#039;&#039;&#039;0x000080:ShenZhen&#039;&#039;&#039;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== hmt.readvp16 ===&lt;br /&gt;
{|&lt;br /&gt;
|&#039;&#039;&#039;Function&#039;&#039;&#039;&lt;br /&gt;
|hmt.readvp16(addr)&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|Read VP_N16 value&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Parameter&#039;&#039;&#039;&lt;br /&gt;
|addr is the VP_N16 address (*1)&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Return Value&#039;&#039;&#039;&lt;br /&gt;
|Integer&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Example&#039;&#039;&#039;&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Lua Script&lt;br /&gt;
!Descriptions&lt;br /&gt;
|-&lt;br /&gt;
|local N16value = 0&amp;lt;BR&amp;gt;N16value = hmt.readvp16(0x080002)&amp;lt;BR&amp;gt;print(“N16value:”, N16value)&lt;br /&gt;
|&lt;br /&gt;
* Put 24 into VP_N16 0x080002 via SmartLCD UI&lt;br /&gt;
* define a local variable N16value and put 0 inside&lt;br /&gt;
* copy value in VP_N16 at 0x080002 to N16value&lt;br /&gt;
* print to UART0&lt;br /&gt;
* it should find the following at the UART0&lt;br /&gt;
* &#039;&#039;&#039;N16value:24&#039;&#039;&#039;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== hmt.writevp16 ===&lt;br /&gt;
{|&lt;br /&gt;
|&#039;&#039;&#039;Function&#039;&#039;&#039;&lt;br /&gt;
|hmt.writevp16(addr, value)&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|Write a value to VP_N16&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Parameter&#039;&#039;&#039;&lt;br /&gt;
|addr is the VP_N16 address(*1), value is the value to be written&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Return Value&#039;&#039;&#039;&lt;br /&gt;
|nil&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Example&#039;&#039;&#039;&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Lua Script&lt;br /&gt;
!Descriptions&lt;br /&gt;
|-&lt;br /&gt;
|local N16value = 123&amp;lt;br&amp;gt;hmt.writevp16(0x080002, N16value)&amp;lt;br&amp;gt;print(“0x080002:”, hmt.readvp16(0x080002))&lt;br /&gt;
|&lt;br /&gt;
* define a local variable N16value and put 123 inside&lt;br /&gt;
* copy the N16value to VP_N16 at 0x080002&lt;br /&gt;
* print to UART0&lt;br /&gt;
* it should find the following at the UART0&lt;br /&gt;
* &#039;&#039;&#039;0x080002:123&#039;&#039;&#039;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== hmt.readvp32 ===&lt;br /&gt;
{|&lt;br /&gt;
|&#039;&#039;&#039;Function&#039;&#039;&#039;&lt;br /&gt;
|hmt.readvp32(addr)&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|Read VP_N32 value&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Parameter&#039;&#039;&#039;&lt;br /&gt;
|addr is the VP_N32 address (*1)&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Return Value&#039;&#039;&#039;&lt;br /&gt;
|Integer&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Example&#039;&#039;&#039;&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Lua Script&lt;br /&gt;
!Descriptions&lt;br /&gt;
|-&lt;br /&gt;
|local N32value = 0&amp;lt;br&amp;gt;N32value = hmt.readvp32(0x020004)&amp;lt;br&amp;gt;print(“N32value:”, N32value)&lt;br /&gt;
|&lt;br /&gt;
* Put 1108410368 into VP_N32 0x020004 via SmartLCD UI&lt;br /&gt;
* define a local variable N32value and put 0 inside&lt;br /&gt;
* copy value in VP_N32 at 0x020004 to N32value&lt;br /&gt;
* print to UART0&lt;br /&gt;
* it should find the following at the UART0&lt;br /&gt;
* &#039;&#039;&#039;N32value:1108410368&#039;&#039;&#039;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== hmt.readvp32f ===&lt;br /&gt;
{|&lt;br /&gt;
|&#039;&#039;&#039;Function&#039;&#039;&#039;&lt;br /&gt;
|hmt.readvp32f(addr)&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|Read VP_N32 value with floating value inside&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Parameter&#039;&#039;&#039;&lt;br /&gt;
|addr is the VP_N32 address (*1)&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Return Value&#039;&#039;&#039;&lt;br /&gt;
|Floating point&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Example&#039;&#039;&#039;&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Lua Script&lt;br /&gt;
!Descriptions&lt;br /&gt;
|-&lt;br /&gt;
|local N32value = 0.0&amp;lt;br&amp;gt;N32value = hmt.readvp32f(0x020004)&amp;lt;br&amp;gt;print(“N32value:”, N32value)&lt;br /&gt;
|&lt;br /&gt;
* Put a floating point value 36.25 into VP_N32 0x020004 via SmartLCD UI&lt;br /&gt;
* define a local variable N32value and put 0.0 inside&lt;br /&gt;
* copy floating point value in VP_N32 at 0x020004 to N32value&lt;br /&gt;
* print to UART0&lt;br /&gt;
* it should find the following at the UART0&lt;br /&gt;
* &#039;&#039;&#039;N32value:36.25&#039;&#039;&#039;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== hmt.writevp32 ===&lt;br /&gt;
{|&lt;br /&gt;
|&#039;&#039;&#039;Function&#039;&#039;&#039;&lt;br /&gt;
|hmt.writevp32(addr, value)&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|Write a value to VP_N32&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Parameter&#039;&#039;&#039;&lt;br /&gt;
|addr is the VP_N32 address(*1), value is the value to be written&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Return Value&#039;&#039;&#039;&lt;br /&gt;
|nil&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Example&#039;&#039;&#039;&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Lua Script&lt;br /&gt;
!Descriptions&lt;br /&gt;
|-&lt;br /&gt;
|local N32value = 54321&amp;lt;br&amp;gt;hmt.writevp32(0x080004, N32value)&amp;lt;br&amp;gt;print(“0x080004:”, hmt.readvp32(0x080004))&lt;br /&gt;
|&lt;br /&gt;
* define a local variable N32value and put 54321 inside&lt;br /&gt;
* copy the N32value to VP_N32 at 0x080004&lt;br /&gt;
* print to UART0&lt;br /&gt;
* it should find the following at the UART0&lt;br /&gt;
* &#039;&#039;&#039;0x080004:54321&#039;&#039;&#039;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== hmt.readvp64 ===&lt;br /&gt;
{|&lt;br /&gt;
|&#039;&#039;&#039;Function&#039;&#039;&#039;&lt;br /&gt;
|hmt.readvp64(addr)&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|Read VP_N64 value &lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Parameter&#039;&#039;&#039;&lt;br /&gt;
|addr is the VP_N64 address (*1)&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Return Value&#039;&#039;&#039;&lt;br /&gt;
|Integer&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Example&#039;&#039;&#039;&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Lua Script&lt;br /&gt;
!Descriptions&lt;br /&gt;
|-&lt;br /&gt;
|local N64value = 0&amp;lt;br&amp;gt;N32value = hmt.readvp64(0x030000)&amp;lt;br&amp;gt;print(“N64value:”, N64value)&lt;br /&gt;
|&lt;br /&gt;
* Put 4638029965185179976 into VP_N64 0x030000 via SmartLCD UI\&lt;br /&gt;
* define a local variable N64value and put 0 inside&lt;br /&gt;
* copy value in VP_N64 at 0x030000 to N64value&lt;br /&gt;
* print to UART0&lt;br /&gt;
* it should find the following at the UART0&lt;br /&gt;
* &#039;&#039;&#039;N64value: 4638029965185179976&#039;&#039;&#039;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== hmt.readvp64f ===&lt;br /&gt;
{|&lt;br /&gt;
|&#039;&#039;&#039;Function&#039;&#039;&#039;&lt;br /&gt;
|hmt.readvp64f(addr)&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|Read VP_N64 value with floating value inside&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Parameter&#039;&#039;&#039;&lt;br /&gt;
|addr is the VP_N64 address (*1)&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Return Value&#039;&#039;&#039;&lt;br /&gt;
|Floating point&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Example&#039;&#039;&#039;&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Lua Script&lt;br /&gt;
!Descriptions&lt;br /&gt;
|-&lt;br /&gt;
|local N64value = 0.0&amp;lt;br&amp;gt;N64value = hmt.readvp64f(0x030000)&amp;lt;br&amp;gt;print(“N64value:”, N64value)&lt;br /&gt;
|&lt;br /&gt;
* Put a floating point value 118.37 into VP_N64 0x030000 via SmartLCD UI&lt;br /&gt;
* define a local variable N64value and put 0.0 inside&lt;br /&gt;
* copy floating point value in VP_N64 at 0x030000 to N64value&lt;br /&gt;
* print to UART0&lt;br /&gt;
* it should find the following at the UART0&lt;br /&gt;
* &#039;&#039;&#039;N64value:118.37&#039;&#039;&#039;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== hmt.writevp64 ===&lt;br /&gt;
{|&lt;br /&gt;
|&#039;&#039;&#039;Function&#039;&#039;&#039;&lt;br /&gt;
|hmt.writevp64(addr, value)&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|Write a value to VP_N64&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Parameter&#039;&#039;&#039;&lt;br /&gt;
|addr is the VP_N64 address(*1), value is the value to be written&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Return Value&#039;&#039;&#039;&lt;br /&gt;
|nil&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Example&#039;&#039;&#039;&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Lua Script&lt;br /&gt;
!Descriptions&lt;br /&gt;
|-&lt;br /&gt;
|local N64value = 123456789&amp;lt;br&amp;gt;hmt.writevp64(0x030000, N64value)&amp;lt;br&amp;gt;print(“0x030000:”, hmt.readvp64(0x030000))&lt;br /&gt;
|&lt;br /&gt;
* define a local variable N64value and put 123456789 inside&lt;br /&gt;
* copy the N64value to VP_N64 at 0x030000&lt;br /&gt;
* print to UART0&lt;br /&gt;
* it should find the following at the UART0&lt;br /&gt;
* &#039;&#039;&#039;0x030000:123456789&#039;&#039;&#039;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== hmt.readvpreg ===&lt;br /&gt;
{|&lt;br /&gt;
|&#039;&#039;&#039;Function&#039;&#039;&#039;&lt;br /&gt;
|hmt.readvpreg(addr)&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|Read Smart LCD system register value (VP_SYS) value &lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Parameter&#039;&#039;&#039;&lt;br /&gt;
|ddr is the VP_SYS address (*1)&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Return Value&#039;&#039;&#039;&lt;br /&gt;
|Integer&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Example&#039;&#039;&#039;&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Lua Script&lt;br /&gt;
!Descriptions&lt;br /&gt;
|-&lt;br /&gt;
|local Regvalue = 0&amp;lt;br&amp;gt;Regvalue = hmt.readvpreg(0xFFFF20)&amp;lt;br&amp;gt;print(“Regvalue:”, Regvalue)&lt;br /&gt;
|&lt;br /&gt;
* define a local variable Regvalue and put 0 inside&lt;br /&gt;
* copy value in VP_SYS at 0xFFFF20 to Regvalue&lt;br /&gt;
* print to UART0&lt;br /&gt;
* it should find the following at the UART0&lt;br /&gt;
* &#039;&#039;&#039;Regvalue:8&#039;&#039;&#039;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== hmt.writevpreg ===&lt;br /&gt;
{|&lt;br /&gt;
|&#039;&#039;&#039;Function&#039;&#039;&#039;&lt;br /&gt;
|hmt.writevpreg(addr, value)&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|Write a value to Smart LCD system register value (VP_SYS) value&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Parameter&#039;&#039;&#039;&lt;br /&gt;
|addr is the VP_SYS address(*1), value is the value to be written&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Return Value&#039;&#039;&#039;&lt;br /&gt;
|nil&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Example&#039;&#039;&#039;&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Lua Script&lt;br /&gt;
!Descriptions&lt;br /&gt;
|-&lt;br /&gt;
|local Regvalue = 18&amp;lt;br&amp;gt;hmt.writevpreg(0xFFFF20, Regvalue)&amp;lt;br&amp;gt;print(“0xFFFF20:”, hmt.readvpreg(0xFFFF20))&lt;br /&gt;
|&lt;br /&gt;
* define a local variable Regvalue and put 18 inside&lt;br /&gt;
* copy the Regvalue to VP_SYS at 0xFFFF20&lt;br /&gt;
* print to UART0&lt;br /&gt;
* it should find the following at the UART0&lt;br /&gt;
* &#039;&#039;&#039;0xFFFF20:18&#039;&#039;&#039;&lt;br /&gt;
|}&lt;br /&gt;
Note: *1. Please refer to Smart LCD VP variables section.&lt;br /&gt;
&lt;br /&gt;
== System Functions ==&lt;br /&gt;
&lt;br /&gt;
=== hmt.changepage ===&lt;br /&gt;
{|&lt;br /&gt;
|&#039;&#039;&#039;Function&#039;&#039;&#039;&lt;br /&gt;
|hmt.changepage(pageid)&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|Change the Smart LCD UI display PAGE&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Parameter&#039;&#039;&#039;&lt;br /&gt;
|pageid is the target display PAGE to be shown&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Return Value&#039;&#039;&#039;&lt;br /&gt;
|Nil&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Example&#039;&#039;&#039;&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Lua Script&lt;br /&gt;
!Descriptions&lt;br /&gt;
|-&lt;br /&gt;
|hmt.changepage(0x02)&lt;br /&gt;
|&lt;br /&gt;
* UI show up the PAGE 2&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== hmt.readpage ===&lt;br /&gt;
{|&lt;br /&gt;
|&#039;&#039;&#039;Function&#039;&#039;&#039;&lt;br /&gt;
|hmt.readpage()&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|Read the current display page id &lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Parameter&#039;&#039;&#039;&lt;br /&gt;
|Nil&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Return Value&#039;&#039;&#039;&lt;br /&gt;
|Integer&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Example&#039;&#039;&#039;&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Lua Script&lt;br /&gt;
!Descriptions&lt;br /&gt;
|-&lt;br /&gt;
|local pageid = 0&amp;lt;br&amp;gt;pageid = hmt.readpage()&amp;lt;br&amp;gt;print(“pageid:”, pageid)&lt;br /&gt;
|&lt;br /&gt;
* SmartLCD UI is showing PAGE 3&lt;br /&gt;
* define a local variable pageid and put 0 inside&lt;br /&gt;
* copy the current display page id to pageid&lt;br /&gt;
* print to UART0&lt;br /&gt;
* it should find the following at the UART0&lt;br /&gt;
* &#039;&#039;&#039;pageid:3&#039;&#039;&#039;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== hmt.gettick ===&lt;br /&gt;
{|&lt;br /&gt;
|&#039;&#039;&#039;Function&#039;&#039;&#039;&lt;br /&gt;
|hmt.gettick()&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|Read the system running time in ms&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Parameter&#039;&#039;&#039;&lt;br /&gt;
|Nil&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Return Value&#039;&#039;&#039;&lt;br /&gt;
|Integer&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Example&#039;&#039;&#039;&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Lua Script&lt;br /&gt;
!Descriptions&lt;br /&gt;
|-&lt;br /&gt;
|local worktime = 0&amp;lt;br&amp;gt;worktime = hmt.gettick()&amp;lt;br&amp;gt;print(“worktime:”, worktime)&lt;br /&gt;
|&lt;br /&gt;
* define a local variable worktime and put 0 inside&lt;br /&gt;
* copy the current system running time to worktime&lt;br /&gt;
* print to UART0&lt;br /&gt;
* it should find the following at the UART0&lt;br /&gt;
* worktime:334520  (The system ran for about 334520ms)&lt;br /&gt;
|}&lt;br /&gt;
Note. Return Value will loop back to 0(dec) after 4294966(dec)&lt;br /&gt;
&lt;br /&gt;
=== hmt.readpage ===&lt;br /&gt;
{|&lt;br /&gt;
|&#039;&#039;&#039;Function&#039;&#039;&#039;&lt;br /&gt;
|hmt.readpage()&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|Read the current display page id &lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Parameter&#039;&#039;&#039;&lt;br /&gt;
|Nil&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Return Value&#039;&#039;&#039;&lt;br /&gt;
|Integer&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Example&#039;&#039;&#039;&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Lua Script&lt;br /&gt;
!Descriptions&lt;br /&gt;
|-&lt;br /&gt;
|local pageid = 0&amp;lt;br&amp;gt;pageid = hmt.readpage()&amp;lt;br&amp;gt;print(“pageid:”, pageid)&lt;br /&gt;
|&lt;br /&gt;
* SmartLCD UI is showing PAGE 3&lt;br /&gt;
* define a local variable pageid and put 0 inside&lt;br /&gt;
* copy the current display page id to pageid&lt;br /&gt;
* print to UART0&lt;br /&gt;
* it should find the following at the UART0&lt;br /&gt;
* &#039;&#039;&#039;pageid:3&#039;&#039;&#039;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== hmt.delayms ===&lt;br /&gt;
{|&lt;br /&gt;
|&#039;&#039;&#039;Function&#039;&#039;&#039;&lt;br /&gt;
|hmt.delayms(time)&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|delay routine &lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Parameter&#039;&#039;&#039;&lt;br /&gt;
|time is the delay in ms&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Return Value&#039;&#039;&#039;&lt;br /&gt;
|Nil&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Example&#039;&#039;&#039;&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Lua Script&lt;br /&gt;
!Descriptions&lt;br /&gt;
|-&lt;br /&gt;
|hmt.delaymy(200)&lt;br /&gt;
|&lt;br /&gt;
* system will do nothing for 200ms and jump and go on&lt;br /&gt;
|}&lt;br /&gt;
Note. long delay may affect the Smart LCD normal operation.&lt;br /&gt;
&lt;br /&gt;
=== hmt.runcmd ===&lt;br /&gt;
{|&lt;br /&gt;
|&#039;&#039;&#039;Function&#039;&#039;&#039;&lt;br /&gt;
|hmt.runcmd(table, num)&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|Send a command directly as sending command to the Smart LCD terminal (no command head and command tail) &lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Parameter&#039;&#039;&#039;&lt;br /&gt;
|table is the command byte array to be send, num is the number of byte to be send&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Return Value&#039;&#039;&#039;&lt;br /&gt;
|Integer&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Example&#039;&#039;&#039;&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Lua Script&lt;br /&gt;
!Descriptions&lt;br /&gt;
|-&lt;br /&gt;
|local cmdtab = {0x5F, 0x04}&amp;lt;br&amp;gt;hmt.runcmd(cmdtab, 2)&lt;br /&gt;
|&lt;br /&gt;
* define a local variable array and put 0x5F, 0x04 inside&lt;br /&gt;
* use hmt.runcmd to send 2 byte of local variable array to Smart LCD&lt;br /&gt;
* it will adjust the backlight of the display to dim down&lt;br /&gt;
|}&lt;br /&gt;
Note. 0x5F is backlight control command; please also refer to Smart LCD handbook for command details&lt;br /&gt;
&lt;br /&gt;
=== hmt.bypass ===&lt;br /&gt;
{|&lt;br /&gt;
|&#039;&#039;&#039;Function&#039;&#039;&#039;&lt;br /&gt;
|hmt.bypass(is)&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|Disable Smart LCD terminal command execution (I/O), And prevent data stream corruption while Lua accessing the UART0 &lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Parameter&#039;&#039;&#039;&lt;br /&gt;
|is=1 for disable; is=0 for enable(normal)&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Return Value&#039;&#039;&#039;&lt;br /&gt;
|Nil&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Example&#039;&#039;&#039;&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Lua Script&lt;br /&gt;
!Descriptions&lt;br /&gt;
|-&lt;br /&gt;
|hmt.bypass(1)&lt;br /&gt;
hmt.bypass(0)&lt;br /&gt;
|&lt;br /&gt;
* Disable Smart LCD terminal command execution&lt;br /&gt;
* Send AA 5F 03 CC 33 C3 3C to Smart LCD terminal to dim down the backlight&lt;br /&gt;
* No response&lt;br /&gt;
* Enable Smart LCD terminal command execution&lt;br /&gt;
* Send AA 5F 03 CC 33 C3 3C to Smart LCD terminal to dim down the backlight&lt;br /&gt;
* Display dim down accordingly&lt;br /&gt;
|}&lt;br /&gt;
Note. 0x5F is backlight control command; please also refer to Smart LCD handbook for command details&lt;br /&gt;
&lt;br /&gt;
=== hmt.crc16calc ===&lt;br /&gt;
{|&lt;br /&gt;
|&#039;&#039;&#039;Function&#039;&#039;&#039;&lt;br /&gt;
|hmt.crc16calc(table, num)&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|Generate a CRC value form given num of bytes &lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Parameter&#039;&#039;&#039;&lt;br /&gt;
|table is the byte array to be input, num is the number of byte to be taken form the table (see appendix for reference)&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Return Value&#039;&#039;&#039;&lt;br /&gt;
|Integer&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Example&#039;&#039;&#039;&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Lua Script&lt;br /&gt;
!Descriptions&lt;br /&gt;
|-&lt;br /&gt;
|local padcmd = {0x82, 0x00, 0x08, 0x05}&amp;lt;br&amp;gt;local crcreturn = 0&amp;lt;br&amp;gt;crcreturn = hmt.crc16calc(padcmd, 4)&amp;lt;br&amp;gt;print(“crcreturn:”, crcreturn)&lt;br /&gt;
|&lt;br /&gt;
* define a local variable array and put 0x82, 0x00, 0x08, 0x05 inside&lt;br /&gt;
* define a local variable and put 0 inside&lt;br /&gt;
* calculate a CRC value of the 4 bytes form the array&lt;br /&gt;
* print to UART0&lt;br /&gt;
* it should find the following at the UART0&lt;br /&gt;
* &#039;&#039;&#039;crcreturn:6134316&#039;&#039;&#039;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== hmt.formatdisk2 ===&lt;br /&gt;
{|&lt;br /&gt;
|&#039;&#039;&#039;Function&#039;&#039;&#039;&lt;br /&gt;
|hmt.formatdisk2()&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|Format Smart LCD 2nd FLASH partition (&amp;quot;disk2&amp;quot; is the 2nd partition for Lua File I/O) &lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Parameter&#039;&#039;&#039;&lt;br /&gt;
|Nil&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Return Value&#039;&#039;&#039;&lt;br /&gt;
|Nil&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Example&#039;&#039;&#039;&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Lua Script&lt;br /&gt;
!Descriptions&lt;br /&gt;
|-&lt;br /&gt;
|hmt.formatdisk2()&lt;br /&gt;
|&lt;br /&gt;
* Format Smart LCD 2nd FLASH partition.&lt;br /&gt;
* All the files in this partition will be eased.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== hmt.inituart ===&lt;br /&gt;
{|&lt;br /&gt;
|&#039;&#039;&#039;Function&#039;&#039;&#039;&lt;br /&gt;
|hmt.inituart(baudrate,parity)&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|Initialize baud rate and parity parameters of UART0 and UART1 &lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Parameter&#039;&#039;&#039;&lt;br /&gt;
|Baudrate: 0=1200bps, 1=2400bps, 2=4800bps, 3=9600bps, 4=19200bps, 5=38400bps, 6=57600bps, 7=115200bps; Parity: 0=none, 1=odd, 2=even&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Return Value&#039;&#039;&#039;&lt;br /&gt;
|Nil&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Example&#039;&#039;&#039;&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Lua Script&lt;br /&gt;
!Descriptions&lt;br /&gt;
|-&lt;br /&gt;
|hmt.inituart(7,0)&lt;br /&gt;
|&lt;br /&gt;
* Set the baud rate of UART0 and UART1 to 115200, 8N1&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Thread functions ==&lt;br /&gt;
Other than Lua main loop, maximum two threads can be executed at the same time for multi-tasking purpose in TOPWAY Smart LCD Lua script environment. Threads can be control easily with suspend, resume and terminate command. It is recommended to add a delay inside the thread to avoid allocating the CPU continuously, which may affect the display performance.&lt;br /&gt;
&lt;br /&gt;
=== hmt.createthread ===&lt;br /&gt;
{|&lt;br /&gt;
|&#039;&#039;&#039;Function&#039;&#039;&#039;&lt;br /&gt;
|hmt.createthread(function())&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|Create a thread and return a thread object&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Parameter&#039;&#039;&#039;&lt;br /&gt;
|a callback function&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Return Value&#039;&#039;&#039;&lt;br /&gt;
|If successful, return a thread object; If failed, return nil&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Example&#039;&#039;&#039;&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Lua Script&lt;br /&gt;
!Descriptions&lt;br /&gt;
|-&lt;br /&gt;
|FUN_PRINT_THREAD = function(arg)&amp;lt;br&amp;gt;while(1) do&amp;lt;br&amp;gt;print(arg)&amp;lt;br&amp;gt;hmt.delayms(3000)&amp;lt;br&amp;gt;end&amp;lt;br&amp;gt;end&amp;lt;br&amp;gt;Thread_object = hmt.createthread(FUN_PRINT_THREAD, “TOPWAY”)&lt;br /&gt;
|&lt;br /&gt;
* Define a function named FUN_PRINT_THREAD,  &lt;br /&gt;
* This function prints the parameters of the input function every 3 seconds.&lt;br /&gt;
* Create a thread and pass the defined callback function as a parameter.&lt;br /&gt;
* “Thread_object ” is the object of the function&#039;s return value.&lt;br /&gt;
* The thread will be executed immediately after created successfully.&lt;br /&gt;
|}&lt;br /&gt;
Note. Maximum two threads can be executed in lua_main&lt;br /&gt;
&lt;br /&gt;
=== thread_object:suspend ===&lt;br /&gt;
{|&lt;br /&gt;
|&#039;&#039;&#039;Function&#039;&#039;&#039;&lt;br /&gt;
|thread_object:suspend()&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|Suspend thread(pause thread execution); this function can only be called after a thread was created&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Parameter&#039;&#039;&#039;&lt;br /&gt;
|Nil&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Return Value&#039;&#039;&#039;&lt;br /&gt;
|Nil&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Example&#039;&#039;&#039;&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Lua Script&lt;br /&gt;
!Descriptions&lt;br /&gt;
|-&lt;br /&gt;
|FUN_PRINT_THREAD = function()&amp;lt;BR&amp;gt;while(1) do&amp;lt;BR&amp;gt;print(“THREAD IS RUNNING”)&amp;lt;BR&amp;gt;hmt.delayms(3000)&amp;lt;BR&amp;gt;end&amp;lt;BR&amp;gt;end&amp;lt;BR&amp;gt;Thread_object = hmt.createthread(FUN_PRINT_THREAD)&amp;lt;BR&amp;gt;Thread_object:suspend()&lt;br /&gt;
|&lt;br /&gt;
* Define a function named FUN_PRINT_THREAD,  &lt;br /&gt;
* This function prints the parameters of the input function every 3 seconds.&lt;br /&gt;
* Thread_object is an object returned by the hmt.creatthread&lt;br /&gt;
* pause the thread execution&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== thread_object:resume ===&lt;br /&gt;
{|&lt;br /&gt;
|&#039;&#039;&#039;Function&#039;&#039;&#039;&lt;br /&gt;
|thread_object:resume()&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|Restart thread ; this function can only be called after a thread was created&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Parameter&#039;&#039;&#039;&lt;br /&gt;
|Nil&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Return Value&#039;&#039;&#039;&lt;br /&gt;
|Nil&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Example&#039;&#039;&#039;&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Lua Script&lt;br /&gt;
!Descriptions&lt;br /&gt;
|-&lt;br /&gt;
|FUN_PRINT_THREAD = function()&amp;lt;BR&amp;gt;while(1) do&amp;lt;BR&amp;gt;Thread_object:suspend()&amp;lt;BR&amp;gt;print(“THREAD IS RUNNING”)&amp;lt;BR&amp;gt;hmt.delayms(3000)&amp;lt;BR&amp;gt;end&amp;lt;BR&amp;gt;end&amp;lt;BR&amp;gt;Thread_object = hmt.createthread(FUN_PRINT_THREAD)&amp;lt;BR&amp;gt;Thread_object:resume()&lt;br /&gt;
|&lt;br /&gt;
* Define a function named FUN_PRINT_THREAD,  &lt;br /&gt;
* This function prints the parameters of the input function every 3 seconds.&lt;br /&gt;
* Thread_object is an object returned by the hmt.creatthread&lt;br /&gt;
* resume the thread execution&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== thread_object:terminate ===&lt;br /&gt;
{|&lt;br /&gt;
|&#039;&#039;&#039;Function&#039;&#039;&#039;&lt;br /&gt;
|thread_object:terminate()&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|Terminate thread, terminate thread execution (this function can only be called after creating a thread)&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Parameter&#039;&#039;&#039;&lt;br /&gt;
|Nil&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Return Value&#039;&#039;&#039;&lt;br /&gt;
|Nil&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Example&#039;&#039;&#039;&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Lua Script&lt;br /&gt;
!Descriptions&lt;br /&gt;
|-&lt;br /&gt;
|FUN_PRINT_THREAD = function()&amp;lt;BR&amp;gt;while(1) do&amp;lt;BR&amp;gt;print(“THREAD IS RUNNING”)&amp;lt;BR&amp;gt;hmt.delayms(3000)&amp;lt;BR&amp;gt;end&amp;lt;BR&amp;gt;end&amp;lt;BR&amp;gt;Thread_object = hmt.createthread(FUN_PRINT_THREAD)&amp;lt;BR&amp;gt;local value = instance_thread:terminate()&amp;lt;BR&amp;gt;Thread_object = nil&lt;br /&gt;
|&lt;br /&gt;
* Define a function named FUN_PRINT_THREAD&lt;br /&gt;
* This function prints the parameters of the input function every 3 seconds.&lt;br /&gt;
* Thread_object is an object returned by the hmt.creatthread&lt;br /&gt;
* terminate the thread execution&lt;br /&gt;
* clear the object&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== thread_object:getid ===&lt;br /&gt;
{|&lt;br /&gt;
|&#039;&#039;&#039;Function&#039;&#039;&#039;&lt;br /&gt;
|thread_object:getid()&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|Get thread ID and handle (this function can only be called after creating a thread)&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Parameter&#039;&#039;&#039;&lt;br /&gt;
|Nil&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Return Value&#039;&#039;&#039;&lt;br /&gt;
|Return callback function id and callback handle value. If the handle value is 0, the thread execution is completed&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Example&#039;&#039;&#039;&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Lua Script&lt;br /&gt;
!Descriptions&lt;br /&gt;
|-&lt;br /&gt;
|FUN_PRINT_THREAD = function()&amp;lt;BR&amp;gt;while(1) do&amp;lt;BR&amp;gt;print(“THREAD IS RUNNING”)&amp;lt;BR&amp;gt;hmt.delayms(3000)&amp;lt;BR&amp;gt;end&amp;lt;BR&amp;gt;end&amp;lt;BR&amp;gt;Thread_object = hmt.createthread(FUN_PRINT_THREAD)&amp;lt;BR&amp;gt;local id, handle = Thread_object:getid()&amp;lt;BR&amp;gt;print(“id=”,id)&amp;lt;BR&amp;gt;print(“handle=”,handle)&lt;br /&gt;
|&lt;br /&gt;
* Define a function named FUN_PRINT_THREAD,  &lt;br /&gt;
* This function prints the parameters of the input function every 3 seconds.&lt;br /&gt;
* Thread_object is an object returned by the hmt.creatthread&lt;br /&gt;
* get its id and handle value&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== UART0 functions ==&lt;br /&gt;
UART0 is the default command terminal of the Smart LCD. It may be RS-232C or UART(3.3V) depends on model. Lua print function also using UART0 for default output. Some of the Smart LCD equipped with a second terminal UART1. It may be RS-232C or UART(3.3V) depends on model.&lt;br /&gt;
&lt;br /&gt;
=== hmt.uartisempty ===&lt;br /&gt;
{|&lt;br /&gt;
|&#039;&#039;&#039;Function&#039;&#039;&#039;&lt;br /&gt;
|hmt.uartisempty()&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|Check the UART0 buffer status&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Parameter&#039;&#039;&#039;&lt;br /&gt;
|Nil&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Return Value&#039;&#039;&#039;&lt;br /&gt;
|Integer; Return 1 for buffer empty;  0 for data in buffer&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Example&#039;&#039;&#039;&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Lua Script&lt;br /&gt;
!Descriptions&lt;br /&gt;
|-&lt;br /&gt;
|local Uart0state = 0&amp;lt;BR&amp;gt;Uart0state = hmt.uartisempty()&amp;lt;BR&amp;gt;print(“Uart0state:”, Uart0state)&lt;br /&gt;
|&lt;br /&gt;
* define a local variable Uart0state and put 0 inside&lt;br /&gt;
* copy the current UART is empty result to Uart0state&lt;br /&gt;
* print to UART0&lt;br /&gt;
* it should find the following at the UART0 &#039;&#039;&#039;Uart0state:1&#039;&#039;&#039; (as there is no data received form UART0)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== hmt.uartclearbuf ===&lt;br /&gt;
{|&lt;br /&gt;
|&#039;&#039;&#039;Function&#039;&#039;&#039;&lt;br /&gt;
|hmt.uartclearbuf()&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|Clear the UART0 buffer&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Parameter&#039;&#039;&#039;&lt;br /&gt;
|Nil&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Return Value&#039;&#039;&#039;&lt;br /&gt;
|Nil&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Example&#039;&#039;&#039;&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Lua Script&lt;br /&gt;
!Descriptions&lt;br /&gt;
|-&lt;br /&gt;
|hmt.uartclearbuf()&amp;lt;BR&amp;gt;print(“Uart0state:”, hmt.uartisempty())&lt;br /&gt;
|&lt;br /&gt;
* use command to clear the UART0 buffer&lt;br /&gt;
* print to UART0&lt;br /&gt;
* it should find the following at the UART0 &#039;&#039;&#039;Uart0state:1&#039;&#039;&#039; (as there is no data send to the UART0)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== hmt.getchar ===&lt;br /&gt;
{|&lt;br /&gt;
|&#039;&#039;&#039;Function&#039;&#039;&#039;&lt;br /&gt;
|hmt.getchar()&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|Receive one byte of data form UART0 buffer&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Parameter&#039;&#039;&#039;&lt;br /&gt;
|Nil&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Return Value&#039;&#039;&#039;&lt;br /&gt;
|Integer&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Example&#039;&#039;&#039;&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Lua Script&lt;br /&gt;
!Descriptions&lt;br /&gt;
|-&lt;br /&gt;
|local getdata = 0&amp;lt;BR&amp;gt;getdata = hmt.getchar()&amp;lt;BR&amp;gt;print(“getdata:”, getdata)&lt;br /&gt;
|&lt;br /&gt;
* Send one byte of data 0x99 to the Smart LCD terminal&lt;br /&gt;
* define a local variable getdata and put 0 inside&lt;br /&gt;
* get one byte of data form the UART0 buffer and put it into getdata&lt;br /&gt;
* print to UART0&lt;br /&gt;
* it should find the following at the UART0 &#039;&#039;&#039;getdata:153&#039;&#039;&#039; (0x99 is 153(d))&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== hmt.putchar ===&lt;br /&gt;
{|&lt;br /&gt;
|&#039;&#039;&#039;Function&#039;&#039;&#039;&lt;br /&gt;
|hmt.putchar(char)&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|Send one byte of data to UART0 &lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Parameter&#039;&#039;&#039;&lt;br /&gt;
|char is the byte of data to be sent (it should be a byte value, not string char)&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Return Value&#039;&#039;&#039;&lt;br /&gt;
|Integer&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Example&#039;&#039;&#039;&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Lua Script&lt;br /&gt;
!Descriptions&lt;br /&gt;
|-&lt;br /&gt;
|hmt.putchar(0x41)&amp;lt;BR&amp;gt;hmt.putchar(66)&lt;br /&gt;
|&lt;br /&gt;
* it should find the following at the UART0 &#039;&#039;&#039;0x41 0x42&#039;&#039;&#039; (in hex)  or  &#039;&#039;&#039;AB&#039;&#039;&#039; (in ASCII)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== hmt.uartsendbytes ===&lt;br /&gt;
{|&lt;br /&gt;
|&#039;&#039;&#039;Function&#039;&#039;&#039;&lt;br /&gt;
|hmt.uartsendbytes(table, num)&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|Send bytes of data to UART0 &lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Parameter&#039;&#039;&#039;&lt;br /&gt;
|table is the data byte array to be send, num is the number of byte to be send&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Return Value&#039;&#039;&#039;&lt;br /&gt;
|Nil&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Example&#039;&#039;&#039;&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Lua Script&lt;br /&gt;
!Descriptions&lt;br /&gt;
|-&lt;br /&gt;
|local sendbuff = {0xab, 0xcd, 0xef}&amp;lt;BR&amp;gt;hmt.uartsendbytes(sendbuff, 3)&lt;br /&gt;
|&lt;br /&gt;
* define a local variable array and put 0xab, 0xcd, 0xef inside&lt;br /&gt;
* use hmt.uartsendbytes to send 3 byte of local variable array to UART0&lt;br /&gt;
* it should find the following at the UART0 &#039;&#039;&#039;0xab 0xcd 0xef&#039;&#039;&#039; (in hex)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== hmt.uartlock ===&lt;br /&gt;
{|&lt;br /&gt;
|&#039;&#039;&#039;Function&#039;&#039;&#039;&lt;br /&gt;
|hmt.uartlock()&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|Lock the UART0 before Lua send data to UART0&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Parameter&#039;&#039;&#039;&lt;br /&gt;
|Nil&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Return Value&#039;&#039;&#039;&lt;br /&gt;
|Nil&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Example&#039;&#039;&#039;&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Lua Script&lt;br /&gt;
!Descriptions&lt;br /&gt;
|-&lt;br /&gt;
|hmt.uartlock()&amp;lt;BR&amp;gt;hmt.putchar(0xaa)&amp;lt;BR&amp;gt;hmt.putchar(0x02)&amp;lt;BR&amp;gt;hmt.putchar(0x31)&amp;lt;BR&amp;gt;hmt.uartunlock()&lt;br /&gt;
|&lt;br /&gt;
* Lock the UART0 for Lua use&lt;br /&gt;
* Send 0xaa to UART0&lt;br /&gt;
* Send 0x02 to UART0&lt;br /&gt;
* Send 0x31 to UART0&lt;br /&gt;
* it should find the following at the UART0 &#039;&#039;&#039;0xaa 0x02 0x31&#039;&#039;&#039; (in hex)&lt;br /&gt;
* Release the UART0 for Smart LCD normal operation&lt;br /&gt;
|}&lt;br /&gt;
Note. It is necessary to lock the UART for Lua access, if hmt.bypass is not enabled. Generally hmt.uartlock() and hmt.uartunlock() should be used in pair.&lt;br /&gt;
&lt;br /&gt;
=== hmt.uartunlock ===&lt;br /&gt;
{|&lt;br /&gt;
|&#039;&#039;&#039;Function&#039;&#039;&#039;&lt;br /&gt;
|hmt.uartunlock()&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|unlock the UART0 after Lua send data to UART0&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Parameter&#039;&#039;&#039;&lt;br /&gt;
|Nil&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Return Value&#039;&#039;&#039;&lt;br /&gt;
|Nil&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Example&#039;&#039;&#039;&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Lua Script&lt;br /&gt;
!Descriptions&lt;br /&gt;
|-&lt;br /&gt;
|hmt.uartlock()&amp;lt;BR&amp;gt;hmt.putchar(0xaa)&amp;lt;BR&amp;gt;hmt.putchar(0x02)&amp;lt;BR&amp;gt;hmt.putchar(0x31)&amp;lt;BR&amp;gt;hmt.uartunlock()&lt;br /&gt;
|&lt;br /&gt;
*Lock the UART0 for Lua use&lt;br /&gt;
*Send 0xaa to UART0&lt;br /&gt;
* Send 0x02 to UART0&lt;br /&gt;
* Send 0x31 to UART0&lt;br /&gt;
* it should find the following at the UART0 &#039;&#039;&#039;0xaa 0x02 0x31&#039;&#039;&#039; (in hex)&lt;br /&gt;
* Release the UART0 for Smart LCD normal operation&lt;br /&gt;
|}&lt;br /&gt;
Note. It is necessary to lock the UART for Lua access, if hmt.bypass is not enabled. Generally hmt.uartlock() and hmt.uartunlock() should be used in pair.&lt;br /&gt;
&lt;br /&gt;
== UART1 functions ==&lt;br /&gt;
UART1 is the extend terminal of some of the Smart LCD. It may be RS-232C or UART(3.3V) depends on model.&lt;br /&gt;
&lt;br /&gt;
=== hmt.uart1isempty ===&lt;br /&gt;
{|&lt;br /&gt;
|&#039;&#039;&#039;Function&#039;&#039;&#039;&lt;br /&gt;
|hmt.uart1isempty()&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|Check the UART1 buffer status&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Parameter&#039;&#039;&#039;&lt;br /&gt;
|Nil&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Return Value&#039;&#039;&#039;&lt;br /&gt;
|Integer; Return 1 for buffer empty;  0 for data in buffer&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Example&#039;&#039;&#039;&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Lua Script&lt;br /&gt;
!Descriptions&lt;br /&gt;
|-&lt;br /&gt;
|local Uart1state = 0&amp;lt;BR&amp;gt;Uart1state = hmt.uart1isempty()&amp;lt;BR&amp;gt;print(“Uart1state:”, Uart1state)&lt;br /&gt;
|&lt;br /&gt;
* define a local variable Uart1state and put 0 inside&lt;br /&gt;
* copy the current UART is empty result to Uart1state&lt;br /&gt;
* print to UART0&lt;br /&gt;
* it should find the following at the UART0 &#039;&#039;&#039;Uart1state:1&#039;&#039;&#039; (as there is no data received form UART1)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== hmt.uart1clearbuf ===&lt;br /&gt;
{|&lt;br /&gt;
|&#039;&#039;&#039;Function&#039;&#039;&#039;&lt;br /&gt;
|hmt.uart1clearbuf()&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|Clear the UART1 buffer&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Parameter&#039;&#039;&#039;&lt;br /&gt;
|Nil&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Return Value&#039;&#039;&#039;&lt;br /&gt;
|Nil&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Example&#039;&#039;&#039;&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Lua Script&lt;br /&gt;
!Descriptions&lt;br /&gt;
|-&lt;br /&gt;
|hmt.uart1clearbuf()&amp;lt;BR&amp;gt;print(“Uart1state:”, hmt.uart1isempty())&lt;br /&gt;
|&lt;br /&gt;
* use command to clear the UART1 buffer&lt;br /&gt;
* print to UART0&lt;br /&gt;
* it should find the following at the UART0 &#039;&#039;&#039;Uart1state:1&#039;&#039;&#039; (as there is no data send to the UART1)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== hmt.uart1getchar ===&lt;br /&gt;
{|&lt;br /&gt;
|&#039;&#039;&#039;Function&#039;&#039;&#039;&lt;br /&gt;
|hmt.uart1getchar()&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|Receive one byte of data form UART1 buffer&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Parameter&#039;&#039;&#039;&lt;br /&gt;
|Nil&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Return Value&#039;&#039;&#039;&lt;br /&gt;
|Integer&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Example&#039;&#039;&#039;&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Lua Script&lt;br /&gt;
!Descriptions&lt;br /&gt;
|-&lt;br /&gt;
|local getdata = 0&amp;lt;BR&amp;gt;getdata = hmt.uart1getchar()&amp;lt;BR&amp;gt;print(“getdata:”, getdata)&lt;br /&gt;
|&lt;br /&gt;
* Send one byte of data 0xaa to the Smart LCD terminal&lt;br /&gt;
* define a local variable getdata and put 0 inside&lt;br /&gt;
* get one byte of data form the UART1 buffer and put it into getdata&lt;br /&gt;
* print to UART0&lt;br /&gt;
* it should find the following at the UART0 &#039;&#039;&#039;getdata:170&#039;&#039;&#039; (0xaa is 170(d))&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== hmt.uart1putchar ===&lt;br /&gt;
{|&lt;br /&gt;
|&#039;&#039;&#039;Function&#039;&#039;&#039;&lt;br /&gt;
|hmt.uart1putchar(char)&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|Send one byte of data to UART1 &lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Parameter&#039;&#039;&#039;&lt;br /&gt;
|char is the byte of data to be sent (it should be a byte value, not string char)&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Return Value&#039;&#039;&#039;&lt;br /&gt;
|Integer&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Example&#039;&#039;&#039;&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Lua Script&lt;br /&gt;
!Descriptions&lt;br /&gt;
|-&lt;br /&gt;
|hmt.uart1putchar(0x61)&amp;lt;BR&amp;gt;hmt.uart1putchar(97)&lt;br /&gt;
|&lt;br /&gt;
* it should find the following at the UART1 &#039;&#039;&#039;0x61 0x62&#039;&#039;&#039; (in hex)  or  &#039;&#039;&#039;ab&#039;&#039;&#039; (in ASCII)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== hmt.uart1sendbytes ===&lt;br /&gt;
{|&lt;br /&gt;
|&#039;&#039;&#039;Function&#039;&#039;&#039;&lt;br /&gt;
|hmt.uart1sendbytes(table, num)&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|Send bytes of data to UART1 &lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Parameter&#039;&#039;&#039;&lt;br /&gt;
|table is the data byte array to be send, num is the number of byte to be send&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Return Value&#039;&#039;&#039;&lt;br /&gt;
|Nil&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Example&#039;&#039;&#039;&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Lua Script&lt;br /&gt;
!Descriptions&lt;br /&gt;
|-&lt;br /&gt;
|local sendbuff = {0xab, 0xcd, 0xef}&amp;lt;BR&amp;gt;hmt.uart1sendbytes(sendbuff, 3)&lt;br /&gt;
|&lt;br /&gt;
* define a local variable array and put 0xab, 0xcd, 0xef inside&lt;br /&gt;
* use hmt.uart1sendbytes to send 3 byte of local variable array to UART1&lt;br /&gt;
* it should find the following at the UART1 &#039;&#039;&#039;0xab 0xcd 0xef&#039;&#039;&#039; (in hex)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== hmt.uart1lock ===&lt;br /&gt;
{|&lt;br /&gt;
|&#039;&#039;&#039;Function&#039;&#039;&#039;&lt;br /&gt;
|hmt.uart1lock()&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|Lock the UART1 before Lua send data to UART1&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Parameter&#039;&#039;&#039;&lt;br /&gt;
|Nil&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Return Value&#039;&#039;&#039;&lt;br /&gt;
|Nil&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Example&#039;&#039;&#039;&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Lua Script&lt;br /&gt;
!Descriptions&lt;br /&gt;
|-&lt;br /&gt;
|hmt.uart1lock()&amp;lt;BR&amp;gt;hmt.uart1putchar(0xaa)&amp;lt;BR&amp;gt;hmt.uart1putchar(0x02)&amp;lt;BR&amp;gt;hmt.uart1putchar(0x31)&amp;lt;BR&amp;gt;hmt.uart1unlock()&lt;br /&gt;
|&lt;br /&gt;
* Lock the UART1 for Lua use&lt;br /&gt;
* Send 0xaa to UART1&lt;br /&gt;
* Send 0x02 to UART1&lt;br /&gt;
* Send 0x31 to UART1&lt;br /&gt;
* it should find the following at the UART1 &#039;&#039;&#039;0xaa 0x02 0x31&#039;&#039;&#039; (in hex)&lt;br /&gt;
* Release the UART1 for Smart LCD normal operation&lt;br /&gt;
|}&lt;br /&gt;
Note. It is necessary to lock the UART for Lua access, if hmt.bypass is not enabled. Generally hmt.uart1lock() and hmt.uart1unlock() should be used in pair.&lt;br /&gt;
&lt;br /&gt;
=== hmt.uart1unlock ===&lt;br /&gt;
{|&lt;br /&gt;
|&#039;&#039;&#039;Function&#039;&#039;&#039;&lt;br /&gt;
|hmt.uart1unlock()&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|unlock the UART1 after Lua send data to UART1&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Parameter&#039;&#039;&#039;&lt;br /&gt;
|Nil&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Return Value&#039;&#039;&#039;&lt;br /&gt;
|Nil&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Example&#039;&#039;&#039;&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Lua Script&lt;br /&gt;
!Descriptions&lt;br /&gt;
|-&lt;br /&gt;
|hmt.uart1lock()&amp;lt;BR&amp;gt;hmt.uart1putchar(0xaa)&amp;lt;BR&amp;gt;hmt.uart1putchar(0x02)&amp;lt;BR&amp;gt;hmt.uart1putchar(0x31)&amp;lt;BR&amp;gt;hmt.uart1unlock()&lt;br /&gt;
|&lt;br /&gt;
*Lock the UART1 for Lua use&lt;br /&gt;
*Send 0xaa to UART1&lt;br /&gt;
* Send 0x02 to UART1&lt;br /&gt;
* Send 0x31 to UART1&lt;br /&gt;
* it should find the following at the UART1 &#039;&#039;&#039;0xaa 0x02 0x31&#039;&#039;&#039; (in hex)&lt;br /&gt;
* Release the UART1 for Smart LCD normal operation&lt;br /&gt;
|}&lt;br /&gt;
Note. It is necessary to lock the UART for Lua access, if hmt.bypass is not enabled. Generally hmt.uart1lock() and hmt.uart1unlock() should be used in pair.&lt;br /&gt;
&lt;br /&gt;
== Main Loop and Hooks ==&lt;br /&gt;
&lt;br /&gt;
=== luamain ===&lt;br /&gt;
{|&lt;br /&gt;
|&#039;&#039;&#039;Function&#039;&#039;&#039;&lt;br /&gt;
|luamain = function(void)&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|A loop routine run continuously. Looping cycle 10ms(MIN)&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Parameter&#039;&#039;&#039;&lt;br /&gt;
|Nil&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Return Value&#039;&#039;&#039;&lt;br /&gt;
|nil&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Example&#039;&#039;&#039;&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Lua Script&lt;br /&gt;
!Descriptions&lt;br /&gt;
|-&lt;br /&gt;
|luamain = function(void)&amp;lt;BR&amp;gt;print(“TOPWAY”)&amp;lt;BR&amp;gt;return 0&amp;lt;BR&amp;gt;end &lt;br /&gt;
|&lt;br /&gt;
* Beginning of the luamain&lt;br /&gt;
* print to UART0, it should find the following at the UART0, &#039;&#039;&#039;TOPWAY&#039;&#039;&#039;&lt;br /&gt;
* no return value&lt;br /&gt;
* end of the luamain&lt;br /&gt;
* it will loop back to the beginning of the luamain continuously&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== tpkhook ===&lt;br /&gt;
{|&lt;br /&gt;
|&#039;&#039;&#039;Function&#039;&#039;&#039;&lt;br /&gt;
|tpkhook = function(page, id, state)&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|A hook routine that will be trigged while any of the touch key status that defined in the Smart LCD UI is being changed&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Parameter&#039;&#039;&#039;&lt;br /&gt;
|page is the touched touch key’s PAGE; id is the touch key’s ID; state is the statues of the touch key (0 for released; 1 for touched; 2 for moved out)&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Return Value&#039;&#039;&#039;&lt;br /&gt;
|return 0 tell Smart LCD UI continue to execute the touch key predefined operations; return 1 tell Smart LCD UI not to execute the touch key predefined operations&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Example&#039;&#039;&#039;&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Lua Script&lt;br /&gt;
!Descriptions&lt;br /&gt;
|-&lt;br /&gt;
|tpkhook = function(page, id, state)&amp;lt;BR&amp;gt;print(“PageID=”, page,“  TPKID=”, id,“  state=”, state)&amp;lt;BR&amp;gt;return 0&amp;lt;br&amp;gt;end &lt;br /&gt;
|&lt;br /&gt;
* On page 0 touch the touch key (ID=2)&lt;br /&gt;
* Beginning of the tpkhopok&lt;br /&gt;
* print to UART0, it should find the following at the UART0,,&#039;&#039;&#039;PageID=0  TPKID=2  state=1&#039;&#039;&#039;&lt;br /&gt;
* return 0 for UI normal continue run&lt;br /&gt;
* end of the tpkhook&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== pagechangehook ===&lt;br /&gt;
{|&lt;br /&gt;
|&#039;&#039;&#039;Function&#039;&#039;&#039;&lt;br /&gt;
|pagechangehook = function(pageid)&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|A hook routine that will be trigged when page changed (before showing the page)&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Parameter&#039;&#039;&#039;&lt;br /&gt;
|pageid is the target PAGE ID&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Return Value&#039;&#039;&#039;&lt;br /&gt;
|return 0 tell Smart LCD UI continue to showing up the target page; return 1 tell Smart LCD UI staying at the previous page&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Example&#039;&#039;&#039;&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Lua Script&lt;br /&gt;
!Descriptions&lt;br /&gt;
|-&lt;br /&gt;
|pagechangehook = function(pageid)&amp;lt;br&amp;gt;print(“PageID=”, pageid)&amp;lt;br&amp;gt;return 0&amp;lt;BR&amp;gt;end&lt;br /&gt;
|&lt;br /&gt;
* On page 0 touch the touch key to jump to page 1&lt;br /&gt;
* Beginning of the pagechangehook&lt;br /&gt;
* print to UART0, it should find the following at the UART0 &#039;&#039;&#039;PageID=1&#039;&#039;&#039;&lt;br /&gt;
* return 0 for UI normal continue run&lt;br /&gt;
* end of the pagechangehook&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&lt;br /&gt;
=== Built an alarm clock function with Lua ===&lt;br /&gt;
set up a default alarm (alarmhour, alarmminute, alarmsecond) and alarm duration (alarmend)&amp;lt;br&amp;gt;continue checking the Smart LCD compare the RTC with the alarm; if match then sound the buzzer on the Smart LCD.&amp;lt;br&amp;gt;set up a touch key monitor, when it is touched, assign the alarm with value store in the smart LCD (those values, can be assign with the user interface)&lt;br /&gt;
&lt;br /&gt;
 -- define variable(s)&lt;br /&gt;
 Alarmhour = 0x7&lt;br /&gt;
 alarmminute = 0x14&lt;br /&gt;
 alarmsecond = 0x0&lt;br /&gt;
 alarmend = 0&lt;br /&gt;
 &lt;br /&gt;
 -- main loop&lt;br /&gt;
 luamain = function(void)&lt;br /&gt;
 if((hmt.readvpreg(0xffff13) == alarmhour) and (hmt.readvpreg(0xffff14) == alarmminute) and (hmt.readvpreg(0xffff15) == alarmsecond))&lt;br /&gt;
 then&lt;br /&gt;
 alarmend = hmt.gettick() + 60000&lt;br /&gt;
 end&lt;br /&gt;
 if(alarmend &amp;gt; hmt.gettick())then&lt;br /&gt;
 local buzzercmd = {0x7a, 0x01, 0x01, 0x01, 0x05, 0x08}&lt;br /&gt;
 hmt.runcmd(buzzercmd,6)&lt;br /&gt;
 hmt.delayms(200)&lt;br /&gt;
 end&lt;br /&gt;
 return 0&lt;br /&gt;
 end&lt;br /&gt;
 &lt;br /&gt;
 -- touch key hook&lt;br /&gt;
 tpkhook = function(page, id, state)&lt;br /&gt;
 if((page == 1)and(id == 2)and(state == 1))then&lt;br /&gt;
 alarmhour = hmt.readvp16(0x080002)&lt;br /&gt;
 alarmminute = hmt.readvp16(0x080004)&lt;br /&gt;
 alarmsecond = hmt.readvp16(0x080006)&lt;br /&gt;
 end&lt;br /&gt;
 if((page == 1)and(id == 4)and(state == 1))then&lt;br /&gt;
 alarmend = hmt.gettick()&lt;br /&gt;
 end&lt;br /&gt;
 return 0&lt;br /&gt;
 end&lt;br /&gt;
 &lt;br /&gt;
 -- page hook&lt;br /&gt;
 pagechangehook = function(pageid)&lt;br /&gt;
 return 0&lt;br /&gt;
 end&lt;br /&gt;
Note: “wait loop” is not allowed in the script!&lt;br /&gt;
&lt;br /&gt;
== Reference ==&lt;br /&gt;
&lt;br /&gt;
=== hmt.crc16calc(table, num) ===&lt;br /&gt;
 uint16_t const CRC16[256]={&lt;br /&gt;
 /* 16: 8005 reflected */&lt;br /&gt;
 0x0000,0xc0c1,0xc181,0x0140,0xc301,0x03c0,0x0280,0xc241,0xc601,0x06c0,0x0780,0xc741,0x0500,0xc5c1,0xc481,0x0440,&lt;br /&gt;
 0xcc01,0x0cc0,0x0d80,0xcd41,0x0f00,0xcfc1,0xce81,0x0e40,0x0a00,0xcac1,0xcb81,0x0b40,0xc901,0x09c0,0x0880,0xc841,&lt;br /&gt;
 0xd801,0x18c0,0x1980,0xd941,0x1b00,0xdbc1,0xda81,0x1a40,0x1e00,0xdec1,0xdf81,0x1f40,0xdd01,0x1dc0,0x1c80,0xdc41,&lt;br /&gt;
 0x1400,0xd4c1,0xd581,0x1540,0xd701,0x17c0,0x1680,0xd641,0xd201,0x12c0,0x1380,0xd341,0x1100,0xd1c1,0xd081,0x1040,&lt;br /&gt;
 0xf001,0x30c0,0x3180,0xf141,0x3300,0xf3c1,0xf281,0x3240,0x3600,0xf6c1,0xf781,0x3740,0xf501,0x35c0,0x3480,0xf441,&lt;br /&gt;
 0x3c00,0xfcc1,0xfd81,0x3d40,0xff01,0x3fc0,0x3e80,0xfe41,0xfa01,0x3ac0,0x3b80,0xfb41,0x3900,0xf9c1,0xf881,0x3840,&lt;br /&gt;
 0x2800,0xe8c1,0xe981,0x2940,0xeb01,0x2bc0,0x2a80,0xea41,0xee01,0x2ec0,0x2f80,0xef41,0x2d00,0xedc1,0xec81,0x2c40,&lt;br /&gt;
 0xe401,0x24c0,0x2580,0xe541,0x2700,0xe7c1,0xe681,0x2640,0x2200,0xe2c1,0xe381,0x2340,0xe101,0x21c0,0x2080,0xe041,&lt;br /&gt;
 0xa001,0x60c0,0x6180,0xa141,0x6300,0xa3c1,0xa281,0x6240,0x6600,0xa6c1,0xa781,0x6740,0xa501,0x65c0,0x6480,0xa441,&lt;br /&gt;
 0x6c00,0xacc1,0xad81,0x6d40,0xaf01,0x6fc0,0x6e80,0xae41,0xaa01,0x6ac0,0x6b80,0xab41,0x6900,0xa9c1,0xa881,0x6840,&lt;br /&gt;
 0x7800,0xb8c1,0xb981,0x7940,0xbb01,0x7bc0,0x7a80,0xba41,0xbe01,0x7ec0,0x7f80,0xbf41,0x7d00,0xbdc1,0xbc81,0x7c40,&lt;br /&gt;
 0xb401,0x74c0,0x7580,0xb541,0x7700,0xb7c1,0xb681,0x7640,0x7200,0xb2c1,0xb381,0x7340,0xb101,0x71c0,0x7080,0xb041,&lt;br /&gt;
 0x5000,0x90c1,0x9181,0x5140,0x9301,0x53c0,0x5280,0x9241,0x9601,0x56c0,0x5780,0x9741,0x5500,0x95c1,0x9481,0x5440,&lt;br /&gt;
 0x9c01,0x5cc0,0x5d80,0x9d41,0x5f00,0x9fc1,0x9e81,0x5e40,0x5a00,0x9ac1,0x9b81,0x5b40,0x9901,0x59c0,0x5880,0x9841,&lt;br /&gt;
 0x8801,0x48c0,0x4980,0x8941,0x4b00,0x8bc1,0x8a81,0x4a40,0x4e00,0x8ec1,0x8f81,0x4f40,0x8d01,0x4dc0,0x4c80,0x8c41,&lt;br /&gt;
 0x4400,0x84c1,0x8581,0x4540,0x8701,0x47c0,0x4680,0x8641,0x8201,0x42c0,0x4380,0x8341,0x4100,0x81c1,0x8081,0x4040,&lt;br /&gt;
 };&lt;br /&gt;
 &lt;br /&gt;
 static __inline uint16_t rshiftu16(uint16_t value, int nb) &lt;br /&gt;
 { &lt;br /&gt;
 return (uint16_t)((value &amp;gt;&amp;gt; nb) &amp;amp; ~((( uint16_t) 0x8000) &amp;gt;&amp;gt; (nb-1))); &lt;br /&gt;
 } &lt;br /&gt;
 &lt;br /&gt;
 uint16_t crc16_calc(unsigned char *q, int len)&lt;br /&gt;
 {&lt;br /&gt;
 uint16_t crc = 0xffff;&lt;br /&gt;
 while (len-- &amp;gt; 0)&lt;br /&gt;
 crc=(rshiftu16(crc,8) ^ CRC16[(crc ^ *q++) &amp;amp; 0xff]); &lt;br /&gt;
 return crc;&lt;br /&gt;
 }&lt;/div&gt;</summary>
		<author><name>Usr255</name></author>
	</entry>
	<entry>
		<id>https://topway.app/sld_doc/en/index.php?title=Copy_a_page_during_editing&amp;diff=1089</id>
		<title>Copy a page during editing</title>
		<link rel="alternate" type="text/html" href="https://topway.app/sld_doc/en/index.php?title=Copy_a_page_during_editing&amp;diff=1089"/>
		<updated>2025-09-17T11:55:18Z</updated>

		<summary type="html">&lt;p&gt;Usr255: Created page with &amp;quot;=== background === When developing Smart LCD project, it may need to built several similar pages to give a structuralized pages.  Using page copy can help and speed up the project development.  === how to ===  * right click on a page in the Project Resources and select Copy  File:SAN--0615 page copy01.png  * right click on the Page group and select Paste Page  File:SAN--0615 page copy02.png  === e.g. ===  * in this case the source page is PG0001 * it will be past...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== background ===&lt;br /&gt;
When developing Smart LCD project, it may need to built several similar pages to give a structuralized pages.&lt;br /&gt;
&lt;br /&gt;
Using page copy can help and speed up the project development.&lt;br /&gt;
&lt;br /&gt;
=== how to ===&lt;br /&gt;
&lt;br /&gt;
* right click on a page in the Project Resources and select Copy&lt;br /&gt;
&lt;br /&gt;
[[File:SAN--0615 page copy01.png]]&lt;br /&gt;
&lt;br /&gt;
* right click on the Page group and select Paste Page&lt;br /&gt;
&lt;br /&gt;
[[File:SAN--0615 page copy02.png]]&lt;br /&gt;
&lt;br /&gt;
=== e.g. ===&lt;br /&gt;
&lt;br /&gt;
* in this case the source page is PG0001&lt;br /&gt;
* it will be paste as a new page named as @PG0001 (source page ID, with &amp;quot;@&amp;quot;)&lt;br /&gt;
* it can be renamed later&lt;br /&gt;
&lt;br /&gt;
[[File:SAN--0615 page copy03.png]]&lt;br /&gt;
&lt;br /&gt;
=== download ===&lt;br /&gt;
nil&lt;/div&gt;</summary>
		<author><name>Usr255</name></author>
	</entry>
	<entry>
		<id>https://topway.app/sld_doc/en/index.php?title=File:SAN--0615_page_copy03.png&amp;diff=1088</id>
		<title>File:SAN--0615 page copy03.png</title>
		<link rel="alternate" type="text/html" href="https://topway.app/sld_doc/en/index.php?title=File:SAN--0615_page_copy03.png&amp;diff=1088"/>
		<updated>2025-09-17T11:54:11Z</updated>

		<summary type="html">&lt;p&gt;Usr255: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;SAN--0615 page copy03&lt;/div&gt;</summary>
		<author><name>Usr255</name></author>
	</entry>
	<entry>
		<id>https://topway.app/sld_doc/en/index.php?title=File:SAN--0615_page_copy02.png&amp;diff=1087</id>
		<title>File:SAN--0615 page copy02.png</title>
		<link rel="alternate" type="text/html" href="https://topway.app/sld_doc/en/index.php?title=File:SAN--0615_page_copy02.png&amp;diff=1087"/>
		<updated>2025-09-17T11:50:39Z</updated>

		<summary type="html">&lt;p&gt;Usr255: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;SAN--0615 page copy02&lt;/div&gt;</summary>
		<author><name>Usr255</name></author>
	</entry>
	<entry>
		<id>https://topway.app/sld_doc/en/index.php?title=File:SAN--0615_page_copy01.png&amp;diff=1086</id>
		<title>File:SAN--0615 page copy01.png</title>
		<link rel="alternate" type="text/html" href="https://topway.app/sld_doc/en/index.php?title=File:SAN--0615_page_copy01.png&amp;diff=1086"/>
		<updated>2025-09-17T11:48:30Z</updated>

		<summary type="html">&lt;p&gt;Usr255: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;SAN--0615 page copy01&lt;/div&gt;</summary>
		<author><name>Usr255</name></author>
	</entry>
	<entry>
		<id>https://topway.app/sld_doc/en/index.php?title=Tech-Memos-01&amp;diff=1085</id>
		<title>Tech-Memos-01</title>
		<link rel="alternate" type="text/html" href="https://topway.app/sld_doc/en/index.php?title=Tech-Memos-01&amp;diff=1085"/>
		<updated>2025-09-17T11:43:19Z</updated>

		<summary type="html">&lt;p&gt;Usr255: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* [[Floating point value input]]&lt;br /&gt;
* [[Floating point value display]]&lt;br /&gt;
* [[Ardunio (soft_serial) connect to Smart LCD]]&lt;br /&gt;
* [[hmt.gettick() function usage]]&lt;br /&gt;
* [[Touch_Key lock on touch]]&lt;br /&gt;
* [[Show Extended Code on Static String]]&lt;br /&gt;
* [[Assign VP value in page (init VP values)]]&lt;br /&gt;
* [[Copy a page during editing]]&lt;/div&gt;</summary>
		<author><name>Usr255</name></author>
	</entry>
	<entry>
		<id>https://topway.app/sld_doc/en/index.php?title=Assign_VP_value_in_page_(init_VP_values)&amp;diff=1084</id>
		<title>Assign VP value in page (init VP values)</title>
		<link rel="alternate" type="text/html" href="https://topway.app/sld_doc/en/index.php?title=Assign_VP_value_in_page_(init_VP_values)&amp;diff=1084"/>
		<updated>2025-09-17T11:39:34Z</updated>

		<summary type="html">&lt;p&gt;Usr255: /* note */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== background ===&lt;br /&gt;
When start up, all the VP will be clear to &amp;quot;0&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
In some cases, it need to init some VP values at power on start up. it can be realize by defining page function in the start up page. Moreover, page function can call an operation just before a page to be display.&lt;br /&gt;
&lt;br /&gt;
=== how to ===&lt;br /&gt;
&lt;br /&gt;
* right click on the start up page or right click to the page that need to init a VP&lt;br /&gt;
* select Page Functions&lt;br /&gt;
* click &amp;quot;Add&amp;quot; to add a function&lt;br /&gt;
* select an operation to be &amp;quot;call&amp;quot;&lt;br /&gt;
&lt;br /&gt;
[[File:SAN-21-0422 Page Func Add Call.png|800x800px]]&lt;br /&gt;
&lt;br /&gt;
* multiple page function can be added to a page&lt;br /&gt;
* all the function will be execute just before a page to be shown on screen&lt;br /&gt;
* all the pages can use page function&lt;br /&gt;
* all the pages have their own page function&lt;br /&gt;
&lt;br /&gt;
=== e.g. ===&lt;br /&gt;
Every time, jump from page_A to page_B or jump form page_C to page_B. page_B&#039;s page function will be executed accordingly.&lt;br /&gt;
&lt;br /&gt;
=== download ===&lt;br /&gt;
nil&lt;/div&gt;</summary>
		<author><name>Usr255</name></author>
	</entry>
	<entry>
		<id>https://topway.app/sld_doc/en/index.php?title=Assign_VP_value_in_page_(init_VP_values)&amp;diff=1083</id>
		<title>Assign VP value in page (init VP values)</title>
		<link rel="alternate" type="text/html" href="https://topway.app/sld_doc/en/index.php?title=Assign_VP_value_in_page_(init_VP_values)&amp;diff=1083"/>
		<updated>2025-09-17T11:39:07Z</updated>

		<summary type="html">&lt;p&gt;Usr255: /* note */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== background ===&lt;br /&gt;
When start up, all the VP will be clear to &amp;quot;0&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
In some cases, it need to init some VP values at power on start up. it can be realize by defining page function in the start up page. Moreover, page function can call an operation just before a page to be display.&lt;br /&gt;
&lt;br /&gt;
=== how to ===&lt;br /&gt;
&lt;br /&gt;
* right click on the start up page or right click to the page that need to init a VP&lt;br /&gt;
* select Page Functions&lt;br /&gt;
* click &amp;quot;Add&amp;quot; to add a function&lt;br /&gt;
* select an operation to be &amp;quot;call&amp;quot;&lt;br /&gt;
&lt;br /&gt;
[[File:SAN-21-0422 Page Func Add Call.png|800x800px]]&lt;br /&gt;
&lt;br /&gt;
=== note ===&lt;br /&gt;
&lt;br /&gt;
* multiple page function can be added to a page&lt;br /&gt;
* all the function will be execute just before a page to be shown on screen&lt;br /&gt;
* all the pages can use page function&lt;br /&gt;
* all the pages have their own page function&lt;br /&gt;
&lt;br /&gt;
=== e.g. ===&lt;br /&gt;
Every time, jump from page_A to page_B or jump form page_C to page_B. page_B&#039;s page function will be executed accordingly.&lt;br /&gt;
&lt;br /&gt;
=== download ===&lt;br /&gt;
nil&lt;/div&gt;</summary>
		<author><name>Usr255</name></author>
	</entry>
	<entry>
		<id>https://topway.app/sld_doc/en/index.php?title=Assign_VP_value_in_page_(init_VP_values)&amp;diff=1082</id>
		<title>Assign VP value in page (init VP values)</title>
		<link rel="alternate" type="text/html" href="https://topway.app/sld_doc/en/index.php?title=Assign_VP_value_in_page_(init_VP_values)&amp;diff=1082"/>
		<updated>2025-09-17T11:38:00Z</updated>

		<summary type="html">&lt;p&gt;Usr255: Created page with &amp;quot;=== background === When start up, all the VP will be clear to &amp;quot;0&amp;quot;.   In some cases, it need to init some VP values at power on start up. it can be realize by defining page function in the start up page. Moreover, page function can call an operation just before a page to be display.  === how to ===  * right click on the start up page or right click to the page that need to init a VP * select Page Functions * click &amp;quot;Add&amp;quot; to add a function * select an operation to be &amp;quot;call&amp;quot;...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== background ===&lt;br /&gt;
When start up, all the VP will be clear to &amp;quot;0&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
In some cases, it need to init some VP values at power on start up. it can be realize by defining page function in the start up page. Moreover, page function can call an operation just before a page to be display.&lt;br /&gt;
&lt;br /&gt;
=== how to ===&lt;br /&gt;
&lt;br /&gt;
* right click on the start up page or right click to the page that need to init a VP&lt;br /&gt;
* select Page Functions&lt;br /&gt;
* click &amp;quot;Add&amp;quot; to add a function&lt;br /&gt;
* select an operation to be &amp;quot;call&amp;quot;&lt;br /&gt;
&lt;br /&gt;
[[File:SAN-21-0422 Page Func Add Call.png|800x800px]]&lt;br /&gt;
&lt;br /&gt;
=== note ===&lt;br /&gt;
&lt;br /&gt;
* multiple page function can be added to a page&lt;br /&gt;
* all the function will be execute just before a page to be shown on screen&lt;br /&gt;
* all the pages can use page function&lt;br /&gt;
* all the page have their own page function&lt;br /&gt;
&lt;br /&gt;
=== e.g. ===&lt;br /&gt;
every time, jump from page_A to page_B or jump form page_C to page_B. page_B&#039;s page function will be executed accordingly.&lt;br /&gt;
&lt;br /&gt;
=== download ===&lt;br /&gt;
nil&lt;/div&gt;</summary>
		<author><name>Usr255</name></author>
	</entry>
	<entry>
		<id>https://topway.app/sld_doc/en/index.php?title=File:SAN-21-0422_Page_Func_Add_Call.png&amp;diff=1081</id>
		<title>File:SAN-21-0422 Page Func Add Call.png</title>
		<link rel="alternate" type="text/html" href="https://topway.app/sld_doc/en/index.php?title=File:SAN-21-0422_Page_Func_Add_Call.png&amp;diff=1081"/>
		<updated>2025-09-17T11:25:25Z</updated>

		<summary type="html">&lt;p&gt;Usr255: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;SAN-21-0422 Page Func Add Call&lt;/div&gt;</summary>
		<author><name>Usr255</name></author>
	</entry>
	<entry>
		<id>https://topway.app/sld_doc/en/index.php?title=Tech-Memos-01&amp;diff=1080</id>
		<title>Tech-Memos-01</title>
		<link rel="alternate" type="text/html" href="https://topway.app/sld_doc/en/index.php?title=Tech-Memos-01&amp;diff=1080"/>
		<updated>2025-09-17T11:14:00Z</updated>

		<summary type="html">&lt;p&gt;Usr255: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* [[Floating point value input]]&lt;br /&gt;
* [[Floating point value display]]&lt;br /&gt;
* [[Ardunio (soft_serial) connect to Smart LCD]]&lt;br /&gt;
* [[hmt.gettick() function usage]]&lt;br /&gt;
* [[Touch_Key lock on touch]]&lt;br /&gt;
* [[Show Extended Code on Static String]]&lt;br /&gt;
* [[Assign VP value in page (init VP values)]]&lt;/div&gt;</summary>
		<author><name>Usr255</name></author>
	</entry>
	<entry>
		<id>https://topway.app/sld_doc/en/index.php?title=Tech-Memos-01&amp;diff=1079</id>
		<title>Tech-Memos-01</title>
		<link rel="alternate" type="text/html" href="https://topway.app/sld_doc/en/index.php?title=Tech-Memos-01&amp;diff=1079"/>
		<updated>2025-09-17T09:51:44Z</updated>

		<summary type="html">&lt;p&gt;Usr255: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* [[Floating point value input]]&lt;br /&gt;
* [[Floating point value display]]&lt;br /&gt;
* [[Ardunio (soft_serial) connect to Smart LCD]]&lt;br /&gt;
* [[hmt.gettick() function usage]]&lt;br /&gt;
* [[Touch_Key lock on touch]]&lt;br /&gt;
* [[Show Extended Code on Static String]]&lt;br /&gt;
* [[init VP values in project]]&lt;/div&gt;</summary>
		<author><name>Usr255</name></author>
	</entry>
	<entry>
		<id>https://topway.app/sld_doc/en/index.php?title=Floating_point_value_display&amp;diff=1078</id>
		<title>Floating point value display</title>
		<link rel="alternate" type="text/html" href="https://topway.app/sld_doc/en/index.php?title=Floating_point_value_display&amp;diff=1078"/>
		<updated>2025-09-17T09:49:59Z</updated>

		<summary type="html">&lt;p&gt;Usr255: /* e.g. */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== background ===&lt;br /&gt;
Smart LCD provide VP_N32 can holding a 32bit number value and show as integer or floating point value. Here give an example about how to show it in NUM element.&lt;br /&gt;
&lt;br /&gt;
=== how to ===&lt;br /&gt;
[[File:SAN-21-0623 VP N32 Float setting.png|right]]&lt;br /&gt;
&lt;br /&gt;
* VP_N32 is a variable in RAM area, it can hold a 32bit value, which can be an integer or a floating point value.&lt;br /&gt;
* For showing floating point value that hold in the VP, Data Type have to selected as &amp;quot;Float&amp;quot;&lt;br /&gt;
* See also [[Character Elements#Number Element (NUM)|Number Element (NUM)]] for details&lt;br /&gt;
&lt;br /&gt;
=== e.g. ===&lt;br /&gt;
&lt;br /&gt;
* send a value in to the VP_N32 by command&lt;br /&gt;
&lt;br /&gt;
 AA 44 00 02 00 00 444988F6 CC 33 C3 3C&lt;br /&gt;
* VP_N32  (Add 0x20000)&lt;br /&gt;
* 0x020000 := 0x444988f6 (806.4(d))&lt;br /&gt;
&lt;br /&gt;
=== downloads ===&lt;br /&gt;
nil.&lt;/div&gt;</summary>
		<author><name>Usr255</name></author>
	</entry>
	<entry>
		<id>https://topway.app/sld_doc/en/index.php?title=Floating_point_value_display&amp;diff=1077</id>
		<title>Floating point value display</title>
		<link rel="alternate" type="text/html" href="https://topway.app/sld_doc/en/index.php?title=Floating_point_value_display&amp;diff=1077"/>
		<updated>2025-09-17T08:59:58Z</updated>

		<summary type="html">&lt;p&gt;Usr255: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== background ===&lt;br /&gt;
Smart LCD provide VP_N32 can holding a 32bit number value and show as integer or floating point value. Here give an example about how to show it in NUM element.&lt;br /&gt;
&lt;br /&gt;
=== how to ===&lt;br /&gt;
[[File:SAN-21-0623 VP N32 Float setting.png|right]]&lt;br /&gt;
&lt;br /&gt;
* VP_N32 is a variable in RAM area, it can hold a 32bit value, which can be an integer or a floating point value.&lt;br /&gt;
* For showing floating point value that hold in the VP, Data Type have to selected as &amp;quot;Float&amp;quot;&lt;br /&gt;
* See also [[Character Elements#Number Element (NUM)|Number Element (NUM)]] for details&lt;br /&gt;
&lt;br /&gt;
=== e.g. ===&lt;br /&gt;
&lt;br /&gt;
* use command AA 44 00 02 00 00 444988F6 CC 33 C3 3C to send the value in to the VP_N32&lt;br /&gt;
* VP_N32  (Add 0x20000)&lt;br /&gt;
* 0x020000 := 0x444988f6 (806.4(d))&lt;/div&gt;</summary>
		<author><name>Usr255</name></author>
	</entry>
	<entry>
		<id>https://topway.app/sld_doc/en/index.php?title=Floating_point_value_display&amp;diff=1076</id>
		<title>Floating point value display</title>
		<link rel="alternate" type="text/html" href="https://topway.app/sld_doc/en/index.php?title=Floating_point_value_display&amp;diff=1076"/>
		<updated>2025-09-17T08:55:50Z</updated>

		<summary type="html">&lt;p&gt;Usr255: /* how to */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== background ===&lt;br /&gt;
Smart LCD provide VP_N32 can holding a 32bit number value and show as integer or floating point value. Here give an example about how to show it in NUM element.&lt;br /&gt;
&lt;br /&gt;
=== how to ===&lt;br /&gt;
[[File:SAN-21-0623 VP N32 Float setting.png|right]]&lt;br /&gt;
&lt;br /&gt;
* VP_N32 is a variable in RAM area, it can hold a 32bit value, which can be an integer or a floating point value.&lt;br /&gt;
* For showing floating point value that hold in the VP, Data Type have to selected as &amp;quot;Float&amp;quot;&lt;br /&gt;
[[Character Elements#Number Element (NUM)|Number Element (NUM)]]&lt;/div&gt;</summary>
		<author><name>Usr255</name></author>
	</entry>
	<entry>
		<id>https://topway.app/sld_doc/en/index.php?title=Floating_point_value_display&amp;diff=1075</id>
		<title>Floating point value display</title>
		<link rel="alternate" type="text/html" href="https://topway.app/sld_doc/en/index.php?title=Floating_point_value_display&amp;diff=1075"/>
		<updated>2025-09-17T08:52:04Z</updated>

		<summary type="html">&lt;p&gt;Usr255: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== background ===&lt;br /&gt;
Smart LCD provide VP_N32 can holding a 32bit number value and show as integer or floating point value. Here give an example about how to show it in NUM element.&lt;br /&gt;
&lt;br /&gt;
=== how to ===&lt;br /&gt;
[[File:SAN-21-0623 VP N32 Float setting.png|right]]&lt;br /&gt;
&lt;br /&gt;
* VP_N32 is a variable in RAM area, it can hold a 32bit value, which can be an integer or a floating point value.&lt;br /&gt;
* For showing floating point value that hold in the VP, Data Type have to selected as &amp;quot;Float&amp;quot;&lt;br /&gt;
[[Character Elements:Number Element (NUM)|Number Element (NUM)]]&lt;/div&gt;</summary>
		<author><name>Usr255</name></author>
	</entry>
	<entry>
		<id>https://topway.app/sld_doc/en/index.php?title=Floating_point_value_display&amp;diff=1074</id>
		<title>Floating point value display</title>
		<link rel="alternate" type="text/html" href="https://topway.app/sld_doc/en/index.php?title=Floating_point_value_display&amp;diff=1074"/>
		<updated>2025-09-17T08:50:46Z</updated>

		<summary type="html">&lt;p&gt;Usr255: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== background ===&lt;br /&gt;
Smart LCD provide VP_N32 can holding a 32bit number value and show as integer or floating point value. Here give an example about how to show it in NUM element.&lt;br /&gt;
&lt;br /&gt;
=== how to ===&lt;br /&gt;
[[File:SAN-21-0623 VP N32 Float setting.png|right]]&lt;br /&gt;
&lt;br /&gt;
* VP_N32 is a variable in RAM area, it can hold a 32bit value, which can be an integer or a floating point value.&lt;br /&gt;
* For showing floating point value that hold in the VP, Data Type have to selected as &amp;quot;Float&amp;quot;&lt;br /&gt;
[[Character Element:Number Element (NUM)|Number Element (NUM)]]&lt;/div&gt;</summary>
		<author><name>Usr255</name></author>
	</entry>
	<entry>
		<id>https://topway.app/sld_doc/en/index.php?title=Floating_point_value_display&amp;diff=1073</id>
		<title>Floating point value display</title>
		<link rel="alternate" type="text/html" href="https://topway.app/sld_doc/en/index.php?title=Floating_point_value_display&amp;diff=1073"/>
		<updated>2025-09-17T08:37:47Z</updated>

		<summary type="html">&lt;p&gt;Usr255: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== background ===&lt;br /&gt;
Smart LCD provide VP_N32 can holding a 32bit number value and show as integer or floating point value. Here give an example about how to show it in NUM element.&lt;br /&gt;
&lt;br /&gt;
=== how to ===&lt;br /&gt;
[[File:SAN-21-0623 VP N32 Float setting.png|right]]&lt;br /&gt;
&lt;br /&gt;
* VP_N32 is a variable in RAM area, it can hold a 32bit value, which can be an integer or a floating point value.&lt;br /&gt;
* For showing floating point value that hold in the VP, Data Type have to selected as &amp;quot;Float&amp;quot;&lt;br /&gt;
[[Number Element (NUM)]]&lt;/div&gt;</summary>
		<author><name>Usr255</name></author>
	</entry>
	<entry>
		<id>https://topway.app/sld_doc/en/index.php?title=Floating_point_value_display&amp;diff=1072</id>
		<title>Floating point value display</title>
		<link rel="alternate" type="text/html" href="https://topway.app/sld_doc/en/index.php?title=Floating_point_value_display&amp;diff=1072"/>
		<updated>2025-09-17T08:33:22Z</updated>

		<summary type="html">&lt;p&gt;Usr255: Created page with &amp;quot;=== background === Smart LCD provide VP_N32 can holding a 32bit number value and show as integer or floating point value. Here give an example about how to show it in NUM element.  === how to === right  * VP_N32 is a variable in RAM area, it can hold a 32bit value, which can be an integer or a floating point value. * For showing floating point value that hold in the VP, Data Type have to selected as &amp;quot;Float&amp;quot;&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== background ===&lt;br /&gt;
Smart LCD provide VP_N32 can holding a 32bit number value and show as integer or floating point value. Here give an example about how to show it in NUM element.&lt;br /&gt;
&lt;br /&gt;
=== how to ===&lt;br /&gt;
[[File:SAN-21-0623 VP N32 Float setting.png|right]]&lt;br /&gt;
&lt;br /&gt;
* VP_N32 is a variable in RAM area, it can hold a 32bit value, which can be an integer or a floating point value.&lt;br /&gt;
* For showing floating point value that hold in the VP, Data Type have to selected as &amp;quot;Float&amp;quot;&lt;/div&gt;</summary>
		<author><name>Usr255</name></author>
	</entry>
	<entry>
		<id>https://topway.app/sld_doc/en/index.php?title=File:SAN-21-0623_VP_N32_Float_setting.png&amp;diff=1071</id>
		<title>File:SAN-21-0623 VP N32 Float setting.png</title>
		<link rel="alternate" type="text/html" href="https://topway.app/sld_doc/en/index.php?title=File:SAN-21-0623_VP_N32_Float_setting.png&amp;diff=1071"/>
		<updated>2025-09-17T08:22:55Z</updated>

		<summary type="html">&lt;p&gt;Usr255: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;SAN-21-0623 VP N32 Float setting&lt;/div&gt;</summary>
		<author><name>Usr255</name></author>
	</entry>
	<entry>
		<id>https://topway.app/sld_doc/en/index.php?title=Tech-Memos-01&amp;diff=1070</id>
		<title>Tech-Memos-01</title>
		<link rel="alternate" type="text/html" href="https://topway.app/sld_doc/en/index.php?title=Tech-Memos-01&amp;diff=1070"/>
		<updated>2025-09-17T07:49:43Z</updated>

		<summary type="html">&lt;p&gt;Usr255: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* [[Floating point value input]]&lt;br /&gt;
* [[Floating point value display]]&lt;br /&gt;
* [[Ardunio (soft_serial) connect to Smart LCD]]&lt;br /&gt;
* [[hmt.gettick() function usage]]&lt;br /&gt;
* [[Touch_Key lock on touch]]&lt;br /&gt;
* [[Show Extended Code on Static String]]&lt;/div&gt;</summary>
		<author><name>Usr255</name></author>
	</entry>
	<entry>
		<id>https://topway.app/sld_doc/en/index.php?title=MediaWiki:Sidebar&amp;diff=1067</id>
		<title>MediaWiki:Sidebar</title>
		<link rel="alternate" type="text/html" href="https://topway.app/sld_doc/en/index.php?title=MediaWiki:Sidebar&amp;diff=1067"/>
		<updated>2025-09-03T13:15:22Z</updated>

		<summary type="html">&lt;p&gt;Usr255: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
* Smart LCD (SLD)&lt;br /&gt;
** SLD Introduction|SLD Introduction&lt;br /&gt;
** Quick Start|Quick Start&lt;br /&gt;
** Operations|Operations&lt;br /&gt;
** Function Features|Function Features&lt;br /&gt;
** http://192.168.10.3/_P8/sld_doc/zh | [Chinese Site]&lt;br /&gt;
* Development Tools&lt;br /&gt;
** SGTools|SGTools&lt;br /&gt;
** Action Elements|Action Elements&lt;br /&gt;
** Character Elements|Character Elements&lt;br /&gt;
** Image Elements|Image Elements&lt;br /&gt;
** Graphics Elements|Graphics Elements&lt;br /&gt;
** Keyboard Elements|Keyboard Elements&lt;br /&gt;
** Elements Sub Func|Elements Sub Func&lt;br /&gt;
** Page Func|Page Func&lt;br /&gt;
** Display UI Download|Display UI Download&lt;br /&gt;
* Communication&lt;br /&gt;
** Communication Interface|Communication Interface&lt;br /&gt;
** Serial Commands Protocol|Serial Commands Protocol&lt;br /&gt;
** MODBUS Slave Protocol|MODBUS Slave Protocol&lt;br /&gt;
** MODBUS Master Protocol|MODBUS Master Protocol&lt;br /&gt;
* Others&lt;br /&gt;
** Lua Script|Lua Script&lt;br /&gt;
** Memory Area|Memory Area&lt;br /&gt;
** Memory &amp;amp; Limits |Memory &amp;amp; Limits&lt;br /&gt;
** FAQ-01|FAQ-01&lt;br /&gt;
** FAQ-02|FAQ-02&lt;br /&gt;
* Display Project&lt;br /&gt;
** Tutorials|Tutorials&lt;br /&gt;
** Examples-01|Examples-01&lt;br /&gt;
** Examples-02|Examples-02&lt;br /&gt;
** Tech-Memos-01|Tech-Memos-01&lt;/div&gt;</summary>
		<author><name>Usr255</name></author>
	</entry>
	<entry>
		<id>https://topway.app/sld_doc/en/index.php?title=Show_Extended_Code_on_Static_String&amp;diff=1062</id>
		<title>Show Extended Code on Static String</title>
		<link rel="alternate" type="text/html" href="https://topway.app/sld_doc/en/index.php?title=Show_Extended_Code_on_Static_String&amp;diff=1062"/>
		<updated>2025-09-02T12:33:26Z</updated>

		<summary type="html">&lt;p&gt;Usr255: /* download */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== background ===&lt;br /&gt;
UI designer normally put the static text onto the background picture to provide fine visual result. Smart LCD also provide various text font option with character elements. &lt;br /&gt;
&lt;br /&gt;
To show ASCII text on screen with Static String (STS), it is quite straight forward.  While it is also possible to show Extended Code on Static String.&lt;br /&gt;
&lt;br /&gt;
=== how to ===&lt;br /&gt;
1. Generate font library in Font Config &amp;lt;2&amp;gt;,  select &amp;quot;Extended [0x80-0xFF] codepage&amp;quot; to include into the font library.&lt;br /&gt;
&lt;br /&gt;
[[File:SDM-21-0011 build font.png|480x480px]]&lt;br /&gt;
&lt;br /&gt;
2. Select a corresponding extended codepage in Project Setting &lt;br /&gt;
&lt;br /&gt;
[[File:SDM-21-0011 project cp.png|480x480px]]&lt;br /&gt;
&lt;br /&gt;
3. Built a project with a Static String (STS) element&lt;br /&gt;
&lt;br /&gt;
4. Put the desire extended char as hex in the element properties (CP250 CHAR(128(d)) = Euro sign, enter #80)&lt;br /&gt;
&lt;br /&gt;
[[File:SDM-21-0011 editing.png|800x800px]]&lt;br /&gt;
[[File:SDM-21-0011 display.jpg|800x800px]]&lt;br /&gt;
&lt;br /&gt;
=== note ===&lt;br /&gt;
&lt;br /&gt;
* Some of the font face may not provide all the extended char &lt;br /&gt;
* code page setting can also be assigned via serial command, Set_codepage (0xE7 command)&lt;br /&gt;
&lt;br /&gt;
=== download ===&lt;br /&gt;
&lt;br /&gt;
* example model: HMT070DTA-D&lt;br /&gt;
* demo project: [[Media:SDM-21-0011(Ext code page char in static string).zip|SDM-21-0011(Ext_code_page_char_in_static_string).zip]]&lt;/div&gt;</summary>
		<author><name>Usr255</name></author>
	</entry>
	<entry>
		<id>https://topway.app/sld_doc/en/index.php?title=Show_Extended_Code_on_Static_String&amp;diff=1061</id>
		<title>Show Extended Code on Static String</title>
		<link rel="alternate" type="text/html" href="https://topway.app/sld_doc/en/index.php?title=Show_Extended_Code_on_Static_String&amp;diff=1061"/>
		<updated>2025-09-02T12:31:16Z</updated>

		<summary type="html">&lt;p&gt;Usr255: /* download */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== background ===&lt;br /&gt;
UI designer normally put the text onto the background picture to provide fine visual result. Smart LCD also provide various text font option with character elements. &lt;br /&gt;
&lt;br /&gt;
To show ASCII text on screen with Static String (STS), it is quite straight forward.  While it is also possible to show Extended Code on Static String.&lt;br /&gt;
&lt;br /&gt;
=== how to ===&lt;br /&gt;
1. Generate font library in Font Config &amp;lt;2&amp;gt;,  select &amp;quot;Extended [0x80-0xFF] codepage&amp;quot; to include into the font library.&lt;br /&gt;
&lt;br /&gt;
[[File:SDM-21-0011 build font.png|480x480px]]&lt;br /&gt;
&lt;br /&gt;
2. Select a corresponding extended codepage in Project Setting &lt;br /&gt;
&lt;br /&gt;
[[File:SDM-21-0011 project cp.png|480x480px]]&lt;br /&gt;
&lt;br /&gt;
3. Built a project with a Static String (STS) element&lt;br /&gt;
&lt;br /&gt;
4. Put the desire extended char as hex in the element properties (CP250 CHAR(128(d)) = Euro sign, enter #80)&lt;br /&gt;
&lt;br /&gt;
[[File:SDM-21-0011 editing.png|800x800px]]&lt;br /&gt;
[[File:SDM-21-0011 display.jpg|800x800px]]&lt;br /&gt;
&lt;br /&gt;
=== note ===&lt;br /&gt;
&lt;br /&gt;
* Some of the font face may not provide all the extended char &lt;br /&gt;
* code page setting can also be assigned via serial command, Set_codepage (0xE7 command)&lt;br /&gt;
&lt;br /&gt;
=== download ===&lt;br /&gt;
&lt;br /&gt;
* example model: HMT070DTA-D&lt;br /&gt;
* demo project: [[Media:SDM-21-0011(Ext code page char in static string).zip|SDM-21-0011(Ext_code_page_char_in_static_string).zip]]&lt;/div&gt;</summary>
		<author><name>Usr255</name></author>
	</entry>
	<entry>
		<id>https://topway.app/sld_doc/en/index.php?title=File:SDM-21-0011(Ext_code_page_char_in_static_string).zip&amp;diff=1060</id>
		<title>File:SDM-21-0011(Ext code page char in static string).zip</title>
		<link rel="alternate" type="text/html" href="https://topway.app/sld_doc/en/index.php?title=File:SDM-21-0011(Ext_code_page_char_in_static_string).zip&amp;diff=1060"/>
		<updated>2025-09-02T12:30:42Z</updated>

		<summary type="html">&lt;p&gt;Usr255: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Usr255</name></author>
	</entry>
	<entry>
		<id>https://topway.app/sld_doc/en/index.php?title=Show_Extended_Code_on_Static_String&amp;diff=1059</id>
		<title>Show Extended Code on Static String</title>
		<link rel="alternate" type="text/html" href="https://topway.app/sld_doc/en/index.php?title=Show_Extended_Code_on_Static_String&amp;diff=1059"/>
		<updated>2025-09-02T12:29:49Z</updated>

		<summary type="html">&lt;p&gt;Usr255: /* note */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== background ===&lt;br /&gt;
UI designer normally put the text onto the background picture to provide fine visual result. Smart LCD also provide various text font option with character elements. &lt;br /&gt;
&lt;br /&gt;
To show ASCII text on screen with Static String (STS), it is quite straight forward.  While it is also possible to show Extended Code on Static String.&lt;br /&gt;
&lt;br /&gt;
=== how to ===&lt;br /&gt;
1. Generate font library in Font Config &amp;lt;2&amp;gt;,  select &amp;quot;Extended [0x80-0xFF] codepage&amp;quot; to include into the font library.&lt;br /&gt;
&lt;br /&gt;
[[File:SDM-21-0011 build font.png|480x480px]]&lt;br /&gt;
&lt;br /&gt;
2. Select a corresponding extended codepage in Project Setting &lt;br /&gt;
&lt;br /&gt;
[[File:SDM-21-0011 project cp.png|480x480px]]&lt;br /&gt;
&lt;br /&gt;
3. Built a project with a Static String (STS) element&lt;br /&gt;
&lt;br /&gt;
4. Put the desire extended char as hex in the element properties (CP250 CHAR(128(d)) = Euro sign, enter #80)&lt;br /&gt;
&lt;br /&gt;
[[File:SDM-21-0011 editing.png|800x800px]]&lt;br /&gt;
[[File:SDM-21-0011 display.jpg|800x800px]]&lt;br /&gt;
&lt;br /&gt;
=== note ===&lt;br /&gt;
&lt;br /&gt;
* Some of the font face may not provide all the extended char &lt;br /&gt;
* code page setting can also be assigned via serial command, Set_codepage (0xE7 command)&lt;br /&gt;
&lt;br /&gt;
=== download ===&lt;br /&gt;
&lt;br /&gt;
* example model: HMT070DTA-D&lt;br /&gt;
* demo project: SDM-21-0011(Ext_code_page_char_in_static_string).zip&lt;/div&gt;</summary>
		<author><name>Usr255</name></author>
	</entry>
	<entry>
		<id>https://topway.app/sld_doc/en/index.php?title=Show_Extended_Code_on_Static_String&amp;diff=1058</id>
		<title>Show Extended Code on Static String</title>
		<link rel="alternate" type="text/html" href="https://topway.app/sld_doc/en/index.php?title=Show_Extended_Code_on_Static_String&amp;diff=1058"/>
		<updated>2025-09-02T12:25:38Z</updated>

		<summary type="html">&lt;p&gt;Usr255: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== background ===&lt;br /&gt;
UI designer normally put the text onto the background picture to provide fine visual result. Smart LCD also provide various text font option with character elements. &lt;br /&gt;
&lt;br /&gt;
To show ASCII text on screen with Static String (STS), it is quite straight forward.  While it is also possible to show Extended Code on Static String.&lt;br /&gt;
&lt;br /&gt;
=== how to ===&lt;br /&gt;
1. Generate font library in Font Config &amp;lt;2&amp;gt;,  select &amp;quot;Extended [0x80-0xFF] codepage&amp;quot; to include into the font library.&lt;br /&gt;
&lt;br /&gt;
[[File:SDM-21-0011 build font.png|480x480px]]&lt;br /&gt;
&lt;br /&gt;
2. Select a corresponding extended codepage in Project Setting &lt;br /&gt;
&lt;br /&gt;
[[File:SDM-21-0011 project cp.png|480x480px]]&lt;br /&gt;
&lt;br /&gt;
3. Built a project with a Static String (STS) element&lt;br /&gt;
&lt;br /&gt;
4. Put the desire extended char as hex in the element properties (CP250 CHAR(128(d)) = Euro sign, enter #80)&lt;br /&gt;
&lt;br /&gt;
[[File:SDM-21-0011 editing.png|800x800px]]&lt;br /&gt;
[[File:SDM-21-0011 display.jpg|800x800px]]&lt;br /&gt;
&lt;br /&gt;
=== note ===&lt;br /&gt;
&lt;br /&gt;
* Some of the font face may not provide all the extended char &lt;br /&gt;
* code page setting can also be assigned via serial command&lt;br /&gt;
*&lt;/div&gt;</summary>
		<author><name>Usr255</name></author>
	</entry>
</feed>