LCD human-computer interaction menu design for embedded systems

Publisher:光子梦境Latest update time:2012-03-31 Source: 单片机与嵌入式系统应用 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

In recent years, the popularity of LCD displays and the development of microprocessors to large capacity have significantly improved the human-computer interaction function of embedded systems. In many cases, a good graphical user interface (GUI) and a convenient operating environment are one of the key factors affecting the success or failure of a product. How to make full use of low-cost, low-resource single-chip microcomputer systems to achieve perfect human-computer interaction functions has become a problem that single-chip microcomputer designers need to solve.

At present, many advanced intelligent instruments at home and abroad not only have high performance indicators in terms of measurement accuracy and sampling rate, but also have many unique features in terms of the friendliness of human-computer interaction. In the process of developing an intelligent pressure monitor for German TOX Stamping Technology Co., Ltd., the author has accumulated some design experience in human-computer interaction technology for embedded systems. This article takes this as an example to introduce its design method.

1 Overview of Intelligent Pressure Monitor
The intelligent pressure monitor is a special instrument developed for TOX Stamping Technology Co., Ltd. in Germany. The company specializes in the production of metal sheet connection stamping equipment. In order to ensure the quality of the connection, it is necessary to monitor the pressure during the stamping process; and compare the measured value with the set upper and lower pressure limits to determine whether it is qualified. Figure 1 is a block diagram of the hardware system of the TOX intelligent pressure monitor. It is based on the microcontroller and is equipped with pressure and displacement sensors, signal conditioning circuits, LCD display circuits, buttons, RS232 and RS485 communication interfaces, and input/output interfaces connected to PLCs.

In addition to the measurement, data processing and communication functions of ordinary intelligent instruments, the TOX intelligent pressure controller also provides users with a friendly human-computer interaction menu. Through the buttons and LCD display, the following information can be flexibly set and queried: the measurement program number and the corresponding upper and lower pressure limits; the type, specification and sensitivity of the sensor; the zero offset of the sensor and the maximum allowable offset range; whether the automatic zero calibration function is enabled; whether the communication interface is enabled; the mode and address of the communication interface; the latest 10 sets of measurement data; user password; text type (Chinese or English); equipment maintenance cycle and number of operations, etc. In addition, there is a memory protection function. [page]

2 Control panel and operation interface
Figure 2 shows the control panel of the TOX intelligent pressure monitor. The panel has a 160×80 dot matrix LCD display and 6 buttons. The LCD display can display 20 English or 10 Chinese symbols per line, a total of 5 lines; the 6 buttons are 0, ENTER and ESC. Using these 6 buttons, users can switch between the "measurement" and "menu" interfaces at will. After entering the menu interface, users can also easily set and query relevant information.

After turning on the power, the device will display the version number, then perform "Sensor Calibration" (this function can be turned off), and then enter the "Measurement" interface shown in Figure 3.

In the measurement interface, if a measurement command is received from the PLC, or the user presses the "F1" or "F2" key, the pressure of channel 1 or channel 2 will be measured, and then the measurement results will be processed and displayed; if the user presses the "ESC" key, the "Main Menu" interface shown in Figure 4 will be entered.
After entering the main menu interface, press the " key to move the cursor; press the "ESC" key to return to the upper menu (i.e., the "Measurement" menu); press the "ENTER" key to enter the selected submenu. For example, when the cursor is on the "Measurement Program" option, if the "ENTER" key is pressed, the "Measurement Program" input submenu shown in Figure 5 will be entered.

The "Measurement Program" submenu has 5 options, namely the program number and the upper and lower pressure limits (i.e., minimum and maximum values) of channel 1 and channel 2, and the set value selected by the user is also given at the same time. Similarly, press the key to move the cursor; press the "ESC" key to return to the upper menu (i.e., main menu); press the "ENTER" key to enter the submenu under the cursor position. For example, when the cursor is on the "Minimum Value" option of channel 1, if you press the "ENTER" key, you will enter the "Minimum Value" setting interface shown in Figure 6. [page]

In Figure 6, "30.00" indicates that the minimum pressure value of channel 1 is 30.00, and "_" is the cursor prompt. If the user wants to modify the set value, he can press the and keys to move the cursor to the corresponding position, and then press the key to modify the set value. For example, when the cursor is at the current position, if you press the "▲" key, the set value changes from 30.00 to 31.00; if you press the key, the set value 30.00 changes to 29.00. In this way, you can easily enter the set value with only 4 keys.
Different numbers of first-level, second-level or even multi-level submenus are also nested under the "Sensor Configuration", "Data" and "Other" options under the main menu for users to query, modify data and configure parameters.
It can be seen that although the instrument has 6 operating buttons and 1 LCD display, the TOX intelligent pressure monitor still provides a friendly operating environment for the operator and realizes human-computer interaction.

3 Design of human-computer interaction menu
In this design, the main menu and submenus have more than 20 pages, and there are two languages ​​​​in Chinese and English for users to choose from, which increases the difficulty of application layer program design. The program adopts a modular structure, mainly including the following modules:
Interface switching control module: In order to switch the operation interface according to user requirements, a Page_Point image register is defined, and its value varies between O and Pl, where P is the number of operation interfaces. If Page_Point=O, the LCD display will display the page 0 form (the measurement interface shown in Figure 3); if Page_Point=l, the LCD display will display the page 1 form (the main menu interface shown in Figure 4). When the user presses the "ENTER" or "ESC" key, the value of Page_Point is modified according to the position of the option cursor, and then the display form is updated to realize human-computer interaction.
Key scanning module: Scan the 6 operation keys and store the results in the Key_Status image register. This register has 6 valid bits, namely Key_Up, Key_Down, Key_Left, Key_Right, Key_Esc and Key_Enter, which correspond to the 6 keys "ESC" and "ENTER" on the operation panel. If the flag bit is 1, it means that the corresponding key is pressed; otherwise, it is released.
Option management control module: If the current operation interface belongs to the "option interface" (the main menu interface shown in Figure 4 and the measurement program sub-interface shown in Figure 5 both belong to the option interface), press the key, and the position of the cursor ">" moves up or down by 1 item. For this purpose, an Option_Point image register is defined, and its value is 0 to N-1 (N is the number of options). If the main menu has 4 options, then N=4, and Option_Point is 0 to 3; if the measurement program submenu has 5 options, then N=5, and Option_Point is 0 to 4.

Data input module: If the current operation interface belongs to the "number setting interface" (the minimum value setting interface shown in Figure 6 belongs to the number setting interface), press the and keys to move the cursor "_" to the left or right by 1 bit. For this purpose, a Bit_Point image register is defined to record the position of the data bit that can be modified. Press the key to add "1" or subtract "1" from the value at the data bit where the current cursor is located. For example, in the minimum value setting interface shown in Figure 6, if the "▲" key is pressed, the set value changes from 30.00 to 31.00; if the "v" key is pressed, the set value changes from 30.00 to 29.00. With 4 keys, any value that meets the user's requirements can be easily entered. Figure 8 is a program flow chart of the data input module.
Using the above module, only a small amount of program code is needed to flexibly implement functions such as options, data modification, and switching operation interfaces.
This design is programmed in assembly language. The microcontroller used is the low-performance PICl6F877A. Although its program memory is only 8KB, it can realize the display and switching of more than 20 pages of operation interfaces, as well as human-computer interaction functions such as setting and querying dozens of data. It also realizes measurement, monitoring and communication functions.

4 Conclusion
The human-computer interaction technology of embedded systems is becoming more and more perfect. Through LCD display and a few buttons, the human-computer interaction functions such as parameter setting and data management are realized in the embedded system design by software, which enhances the fun and functionality of the operation and helps to improve the added value of the system.

Reference address:LCD human-computer interaction menu design for embedded systems

Previous article:A Brief Analysis of Optimization Problems in Embedded Programming
Next article:Reliability Design of Military Embedded Systems

Recommended ReadingLatest update time:2024-11-16 19:46

u-boot supports LCD display (based on TQ2440)
Platform introduction Linux version: Linux-3.14 u-boot version: u-boot-2015.04 Hardware: TQ2440 (Memory: 64MB NandFlash: 256MB) Author: Peng Donglin Email: pengdonglin137@163.com Summary This version of u-boot supports LCD very easily. During this period, we referred to the LCD driver in tq2440 official u-boot. We on
[Microcontroller]
s3c2440 bare metal-LCD programming (1. LCD hardware principle)
1.LCD diagram The picture below is a schematic diagram of an LCD. Each point in it is a pixel. It has an electron gun inside that emits light of various colors as it moves. The dynamic diagram is expressed as follows: How does the electron gun move?  There is a CLK clock line connected to the LCD. Every time CLK
[Microcontroller]
s3c2440 bare metal-LCD programming (1. LCD hardware principle)
LCD display text function-ARM system-2440
/* * LCD displays Chinese characters *Input parameters: * x: starting position horizontal coordinate * y: starting position ordinate * color: font color * ch : text * */   void Draw_Text16(int x, int y, int color, const unsigned char ch )   {       unsigned short i, j ;       unsigned char mask, tem;       for(i=0; i
[Microcontroller]
MSP430F2274 LCD1602 Display Module
/********************************************************************************************************** * Function: Make LCD1602 display "Welcome to!" * * Description: The three control pins of LCD1602 are reversely controlled by NPN transistors, and D0~D7 are directly connected to MSP430. * * LCD1602 read opera
[Microcontroller]
Advanced Gamma Calibration System for TFT-LCD Panels
As market competition becomes increasingly fierce, the time to market of LCD products has become a key factor restricting product market sales. In the past, it took engineering designers a week to obtain the best Gamma voltage and VCOM voltage for a specific TFT-LCD panel . However, using AGCS
[Home Electronics]
Advanced Gamma Calibration System for TFT-LCD Panels
The love triangle between Micro LED, LCD and OLED
According to incomplete statistics from LED inside, from the beginning of 2019 to May 2020, the total amount of projects in mainland China with Mini/Micro LED as the investment direction has reached 22.08 billion yuan.   With the news that Apple uses Mini LED screens on iPods and Samsung will launch home Micro LED TVs
[Power Management]
The love triangle between Micro LED, LCD and OLED
Analysis of the advantages of LCD splicing technology
With the widespread use of large-screen splicing walls for commercial purposes, the market for splicing technology is becoming increasingly broad. In this promising industry, DLP technology has always been the leader in the field of large-screen splicing. However, at the same time, the emerging LCD splicing technolo
[Power Management]
Analysis of the advantages of LCD splicing technology
FSMC driving TFTLCD principle, timing and register introduction
1. Introduction to FSMC FSMC: Flexible Static Storage Controller Capable of interfacing with synchronous or asynchronous memories and 16-bit PC memory cards The FSMC interface of STM32 supports memories including SRAM, NAND FLASH, NOR FLASH and PSRAM STM32 407 and 103 do not support SD RAM, 429, 439 support SD RAM ope
[Microcontroller]
Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号