Catalog excerpts
SMART LCD Lua Functions Reference Note
Open the catalog to page 1Reference Note
Open the catalog to page 2Reference Note 1 Basic 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 and file I/O. (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. 2 TOPWAY Smart LCD script and variable 2.1 Lua Scrip structure Basic structure -- define variable(s) Script_Variable01 = 0x00 Advance structure with hooks -- define...
Open the catalog to page 3Reference Note 3 hmt library 3.1 hmt functions Summary Category VP read/write Function Name hmt.readvpstr(addr) hmt.writevpstr(addr, string) hmt.readvp16(addr) hmt.writevp16(addr, value) hmt.readvp32(addr) hmt.readvp32f(addr) hmt.writevp32(addr, value) hmt.readvp64(addr) hmt.readvp64f(addr) hmt.writevp64(addr, value) hmt.readvpreg(addr) hmt.writevpreg(addr, value) hmt.changepage(pageid) hmt.readpage() hmt.gettick() hmt.delayms(time) hmt.runcmd(table, num) hmt.bypass(is) hmt.uartclearbuf() hmt.getchar() hmt.putchar(char) hmt.uartsendbytes(table, num) hmt.uartlock() hmt.uartunlock()...
Open the catalog to page 4Reference Note 3.2.1 hmt.readvpstr Function hmt.readvpstr(addr) Description Read VP_STR value Parameter addr is the VP_STR address (*1) Return Value String Example Lua script local strvalue = ““ strvalue = hmt.readvpstr(0x000080) print(“strvalue=”, strvalue) Descriptions Put “TOPWAY” into VP_STR 0x000080 via SmartLCD UI define a local variable strvalue and put ““ inside copy value in VP_STR at 0x000080 to strvalue print to UART0 it should find the following at the UART0 strvalue=TOPWAY 3.2.2 hmt.writevpstr Function hmt.writevpstr(addr, string) Description Write a value to VP_STR Parameter...
Open the catalog to page 5Reference Note 3.2.5 hmt.readvp32 Function hmt.readvp32(addr) Description Read VP_N32 value Parameter addr is the VP_N32 address (*1) Return Value Integer Example Lua script local N32value = 0 N32value = hmt.readvp32(0x020004) print(“N32value:”, N32value) Descriptions Put 1108410368 into VP_N32 0x020004 via SmartLCD UI define a local variable N32value and put 0 inside copy value in VP_N32 at 0x020004 to N32value print to UART0 it should find the following at the UART0 N32value:1108410368 3.2.6 hmt.readvp32f Function hmt.readvp32f(addr) Description Read VP_N32 value with floating value...
Open the catalog to page 6Reference Note 3.2.9 hmt.readvp64f Function hmt.readvp64f(addr) Description Read VP_N64 value with floating value inside Parameter addr is the VP_N64 address (*1) Return Value Floating point Example Lua script local N64value = 0.0 N64value = hmt.readvp64f(0x030000) print(“N64value:”, N64value) Descriptions Put a floating point value 118.37 into VP_N64 0x030000 via SmartLCD UI define a local variable N64value and put 0.0 inside copy floating point value in VP_N64 at 0x030000 to N64value print to UART0 it should find the following at the UART0 N64value:118.37 3.2.10 hmt.writevp64 Function...
Open the catalog to page 7Reference Note 3.3 System Functions 3.3.1 hmt.changepage Function hmt.changepage(pageid) Description Change the Smart LCD UI display PAGE Parameter pageid is the target display PAGE to be shown Return Value Nil Example Lua script hmt.changepage(0x02) Descriptions UI show up the PAGE 2 3.3.2 hmt.readpage Function hmt.readpage() Description Read the current display page id Parameter Nil Return Value Integer Example Lua script local pageid = 0 pageid = hmt.readpage() print(“pageid:”, pageid) Descriptions SmartLCD UI is showing PAGE 3 define a local variable pageid and put 0 inside copy the...
Open the catalog to page 8Reference Note 3.3.5 hmt.runcmd Function hmt.runcmd(table, num) Description Send a command directly as sending command to the Smart LCD terminal (no command head and command tail) Parameter table is the command byte array to be send num is the number of byte to be send Return Value Nil Example Lua script local cmdtab = {0x5F, 0x04} hmt.runcmd(cmdtab, 2) Descriptions define a local variable array and put 0x5F, 0x04 inside use hmt.runcmd to send 2 byte of local variable array to Smart LCD it will adjust the backlight of the display to dim down Note. 0xF5 is backlight control command; please...
Open the catalog to page 9Reference Note UART0 functions 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. 3.4.1 hmt.uartisempty Function hmt.uartisempty() Description Check the UART0 buffer status Parameter Nil Return Value Integer Return 1 for buffer empty; 0 for data in buffer Example Lua script local Uart0state = 0 Uart0state = hmt.uartisempty() print(“Uart0state:”, Uart0state) Descriptions...
Open the catalog to page 10Reference Note 3.4.4 hmt.putchar Function hmt.putchar(char) Description Send one byte of data to UART0 Parameter char is the byte of data to be sent (it should be a byte value, not string char) Return Value Integer Example Lua script hmt.putchar(0x41) hmt.putchar(66) Descriptions it should find the following at the UART0 0x41 0x42 (in hex) or AB (in ASCII) 3.4.5 hmt.uartsendbytes Function hmt.uartsendbytes(table, num) Description Send bytes of data to UART0 Parameter table is the data byte array to be send num is the number of byte to be send Return Value Nil Example Lua script local...
Open the catalog to page 11Reference Note UART1 functions UART1 is the extend terminal of some of the Smart LCD. It may be RS-232C or UART(3.3V) depends on model. 3.5.1 hmt.uart1isempty Function hmt.uart1isempty() Description Check the UART1 buffer status Parameter Nil Return Value Integer Return 1 for buffer empty; 0 for data in buffer Example Lua script local Uart1state = 0 Uart1state = hmt.uart1isempty() print(“Uart1state:”, Uart1state) Descriptions define a local variable Uart1state and put 0 inside copy the current UART is empty result to Uart1state print to UART0 it should find the following at the UART0...
Open the catalog to page 12All TOPWAY LCD catalogs and technical brochures
-
10.1" TFT LCD Module
1 Pages
-
MONO Product
2 Pages
-
LMT050DNCFWU-NNA-2
15 Pages
-
LMT080TDGP01
16 Pages
-
HKT035BTB-1D
36 Pages
-
HMT050AMC-C
17 Pages
-
HMT043ATA-6C
31 Pages
-
TM035PDHG09
42 Pages
-
TM035PDHG03
31 Pages
-
TM028HDZP01
28 Pages
-
LM256160DCW-1
14 Pages
-
LM12896FCW-1
17 Pages
-
LM12832KCW
13 Pages
-
LM2088EFW-9
12 Pages
-
LM3122AGG-2
12 Pages
-
LM240160YCW
18 Pages
-
LM6093ACW
14 Pages
-
HMT104ATA-C
11 Pages
-
HMT101ATA-D
36 Pages
-
HKT080ATA-C
1 Pages
-
HMT080ATA
1 Pages
-
HKT070DTA-1C
11 Pages
-
HMT070DTA-D
1 Pages
-
HKT070DMC-2C
19 Pages
-
HMT070ETD-C
31 Pages
-
HMT070ETD-1D
34 Pages
-
HMT056ATA-C
1 Pages
-
HMT050CB-1C
31 Pages
-
HMT050DTA-D
1 Pages
-
HKT050ATA-C
1 Pages
-
HMT043ATA-7C
32 Pages
-
HMT043GTA-1D
37 Pages
-
HKT043BMC-2C
17 Pages
-
HMT043ATA-3C
11 Pages
-
HMT043BMC-C
1 Pages
-
HMT043ATA-4C
11 Pages
-
HKT043BMC-C
1 Pages
-
HKT043ATA-1C
12 Pages
-
HMT035ATA-D
13 Pages
-
HMT028ATB-C
12 Pages
-
HKT104ATA-C
31 Pages
-
HMT068BTA-C
33 Pages
-
HMT070ATA-1C
32 Pages
-
HMT080ATA-C
33 Pages
-
HMT090ATA-C
30 Pages
-
HMT101ATA-C
33 Pages
-
HMT050ATA-2C
31 Pages
-
HMT043ATA-2C
32 Pages
-
IC Raio RA6963 LCD Controller
42 Pages
-
IC Epson S1D13L01 LCD Controller
118 Pages
-
IC EPSON S1D13700 LCD Controller
133 Pages
-
EPSON S1D13709 LCD Controller
192 Pages
-
Samsung S6B0108 LCD Driver
23 Pages
-
Avant SBN0064G LCD Driver
37 Pages
-
Avant SBN6400G LCD Driver
34 Pages
-
EPSON SED1335 LCD Controller
95 Pages
-
SGS-THOMSON ST7282
23 Pages
-
Raio RA6963 LCD Controller
42 Pages
-
Raio RA8875 TFT LCD Controller
174 Pages
-
Raio RA8835 LCD Controller
93 Pages
-
RAIO RA8803 LCD Controller
8 Pages
-
HMT035ATA-1C
1 Pages
-
Smart LCD introduction
14 Pages
-
Topway company introduction
14 Pages
-
TFT module in bezel
1 Pages
-
Topway TFT LCD
1 Pages
-
LM12864L Series
1 Pages
-
LM12864T Series
1 Pages
-
LM12864F Series
1 Pages
-
LM6060C Series
1 Pages
-
LM12864M Series
1 Pages
-
LM6029A Series
1 Pages
-
LM6059B Series
1 Pages
-
LM24048A Series
1 Pages
-
LM13232A Series
1 Pages
-
LM160160A Series
1 Pages
-
LMB402C Series
1 Pages
-
LMB242A Series
1 Pages
-
LMB204C Series
1 Pages
-
LM3121 Series
1 Pages
-
LMB404A Series
1 Pages
-
HMT043FC-1C
1 Pages
-
LM3123 Series
1 Pages
-
LMB204B Series
1 Pages
-
LMB202E Series
1 Pages
-
LMB202D Series
1 Pages
-
LMB164A Series
1 Pages
-
LMB162G Series
1 Pages
-
LMB162H Series
1 Pages
-
LMB162N Series
1 Pages
-
LMB162A Series
1 Pages
-
LMB0820D Series
1 Pages
-
LMB0820C Series
1 Pages
-
LMB0820A Series
1 Pages
-
LMB081N Series
1 Pages
-
LMB081A Series
1 Pages
-
LMB162X series
1 Pages
-
LMT057DNAFWU-AAN series
1 Pages
-
LMT057DNAFWU-AAA series
1 Pages
-
LMT104SDH01 Series
1 Pages
-
TOPWAY Product List (Y2012)
4 Pages
-
TFT LCD module
1 Pages
-
Without controller
1 Pages
-
Chinese fonts
1 Pages
-
Built-in controller
1 Pages
-
Character module
1 Pages