In the realm of the Internet of Things and embedded development, LCD screens are crucial components for human-machine interaction. The Hezhou LuatOS system, with its lightweight and highly flexible characteristics, provides developers with convenient LCD driver support.
▼ Click to view video demonstration ▼
This article will take the Air780EPM development board’s LCD application as an example to share practical points, helping you quickly get started with screen interaction development.
Currently, the LCDs supported by the Air780EPM include:
ST7796/ST7789/ST7735/ST7735V/ST7735SGC9A01/GC9106I/GC9306X/ILI9486…
For the latest development materials, visit:www.air780epm.cn
1
– Main Hardware Preparation –
1.1 Main Hardware
-
Hezhou Air780EPM development board kit;
-
USB data cable supporting data transmission;
-
PC with Windows 10 or above.
1.2 Wiring Instructions
Taking the Air780EPM development board with the ST7796 LCD screen as an example:
Simply connect through the onboard LCD interface, as shown in the wiring diagram below:
2
– Latest Source Code and Practical Tutorial –
This example can display images, characters, and draw lines, boxes, circles, etc., on the LCD screen of the Air780EPM development board. In practical applications, it can be flexibly extended according to needs.
For the latest source code and practical tutorial, visit:
https://docs.openluat.com/air780epm/luatos/app/multimedia/lcd
The example code is as follows:
3
– Related Precautions –
-
The Air780EPM currently only supports LCDs with SPI interfaces and only supports English character display.
-
The LCD module typically requires a 3.3V power supply; ensure the power is stable and the current is sufficient. If using a large or high-brightness LCD module, it is recommended to use an external power supply.
-
When using the SPI interface, ensure that the SPI communication mode and speed match the LCD module.
-
Displaying progressive JPEG images may lead to decoding failures; it is recommended to use standard format JPEG images.
-
If the auto-refresh function is disabled, you need to manually call lcd.flush() to refresh the screen.
-
Character display size can be selected as needed.
For example: to select font size 32, set in the code as lcd.setFont(lcd.font_opposansm32)
-
The latest development materials can be obtained from www.air780epm.cn.
As an important display device in embedded systems, the hardware configuration and driver implementation of LCDs are core skills that developers must master.
Through this article, you should have a relatively comprehensive understanding of the working principles, hardware connections, and code implementations of LCDs. Whether for smart home applications or industrial control, LCDs can provide powerful display support for your projects.
If you have questions about LCD applications or want to share your project experiences, feel free to leave a comment for discussion!
▼ Learn more about Hezhou ▼
4G+ positioning + WiFi + Bluetooth, Air8000 industrial engineNew Hezhou Air8101 development board now available
Low-power Open development solution Air780EPM