ht1621 - LCD Driver(HT1621/HT1621B)#
Adapted Air780E/Air700E Air780EP Air601 Air101/Air103 Air105 ESP32C3 ESP32S3
Note
This page document is automatically generated by this file. If there is any error, please submit issue or help modify pr, thank you!
Example
-- Need to connect 3 GPIO pins, and then connect ht1621 to power supply
-- Assuming that the CS pin is connected to the module GPIO4
-- Assume that the DATA pin is connected to the module GPIO5
-- Assuming that the WR pin is connected to the module GPIO3
local seg = ht1621.setup(4, 5, 3)
ht1621.lcd(seg, true) -- Backlight on
ht1621.data(seg, 0, 0xeb) -- Position 0 display number 1
ht1621.setup(pin_cs, pin_data, pin_wr, cmd_com_mode, cmd_rc, cmd_sysen)#
Initialization ht1621
Parameters
Incoming Value Type |
Explanation |
---|---|
int |
Chip select pin, fill the GPIO code of the module |
int |
Data pins, fill the GPIO code of the module |
int |
WR Pin, fill the GPIO code of the module |
int |
Command mode, the default is 0x52 |
int |
Internal RC oscillator, default 0x30 |
int |
System Oscillator On, default 0x02 |
Return Value
return value type |
explanation |
---|---|
userdata |
Return ht1621 object |
Examples
local seg = ht1621.setup(4, 5, 3)
ht1621.data(seg, 0, 0xeb)
ht1621.lcd(seg, onoff)#
LCD Switch
Parameters
Incoming Value Type |
Explanation |
---|---|
userdata |
ht1621.setup The returned ht1621 object |
boolean |
true On, false off |
Return Value
return value type |
explanation |
---|---|
nil |
No return value |
Examples
local seg = ht1621.setup(4, 5, 3)
ht1621.lcd(seg, true)
ht1621.data(seg, addr, sdat)#
Show data
Parameters
Incoming Value Type |
Explanation |
---|---|
userdata |
ht1621.setup The returned ht1621 object |
int |
Address, 0-6, more than 6 invalid |
int |
Data, 0-255 |
Return Value
return value type |
explanation |
---|---|
nil |
No return value |
Examples
local seg = ht1621.setup(4, 5, 3)
ht1621.lcd(seg, true)
ht1621.data(seg, 0, 0xF1)
-- Table of values with numbers 0-9
-- 0,1,2,3,4,5,6,7,8,9
-- 0xeb,0x0a,0xad,0x8f,0x4e,0xc7,0xe7,0x8a,0xef,0xcf
ht1621.cmd(seg, cmd)#
Send Instruction
Parameters
Incoming Value Type |
Explanation |
---|---|
userdata |
ht1621.setup The returned ht1621 object |
int |
Instruction, 0-255 |
Return Value
return value type |
explanation |
---|---|
nil |
No return value |
Examples
-- Please refer to the hardware manual for specific instructions