Embedded system LCD interactive menu design
In recent years, the popularity of the LCD monitor and microprocessors to the bulk of the development of embedded systems of human-computer interaction feature has been significantly improved.
In many occasions, a good graphical user interface (GUI) and convenient operating environment that impact on the product one of the key factors to success or failure. How to take full advantage of the low cost, low resource of SCM system to achieve perfection in human-computer interaction functionality has become the single chip designers need to solve a problem.At present, domestic and foreign many advanced intelligent instrument not only in measuring accuracy and sample rate and a higher degree of performance indicators, in human-computer interaction of friendliness also has many advantages.
The author is Germany TOX stamping technology co., Ltd. developed intelligent pressure monitor, has accumulated some embedded systems, human-computer interaction technique didn't count experience. This article on this instance, a general description of the design methods.1 intelligent pressure monitor overview
Intelligent pressure monitor for Germany TOX stamping technology co., Ltd. developed by special instruments.
The company specializes in production of sheet metal stamping device connected, in order to guarantee the connection quality, you need to punch in pressure monitoring; and will be measured value and the set of upper and lower pressure pressure, according to this judgment is qualified. Figure l-TOX intelligent pressure monitor hardware system block diagram of the structure. It to machine, equipped with pressure and displacement sensors, signal conditioning circuits, LCD display circuit, keystrokes, RS232 and RS485 communication interface, as well as PLC connection of input/output interfaces, etc.
TOX intelligent pressure Pro control instrument in addition to the normal intelligent instrument with a measuring function, data processing and communication capabilities, but also provides users with a friendly man-machine interactive menu.
By pressing the key and the LCD monitor offers the flexibility to set and query the following information: the measurement procedures, and the corresponding pressure on the lower value; sensor type, specifications, and sensitivity; sensor zero offset and allow the maximum offset; automatic zero point calibration feature is enabled; the communication interface is enabled; communication interface mode and address; the latest 10 set of measurement data; the user password; text description (Chinese or English); equipment maintenance cycle and operating frequency. In addition, there are memory protection.2 Control Panel and user interface
Figure 2 shows the TOX intelligent pressure monitor control panel, the Panel has 1 160 × 80 dot matrix LCD display and 6 key.
LCD monitors can display per row 20 English or Chinese symbols, lO 5 lines; six key respectively 0, ENTER and ESC. Take advantage of the 6 key, the user can toggle the "measure" and "menu" interface, enter the menu interface, users can also easily set and query the information.
Power is on, the device will display the version number, followed by "sensor calibration" (you can turn off this feature), then enter the figure 3 for the "measure" interface.
Measuring interface, if you receive comes from PLC measurement commands, or the user presses the "F1" or "F2" key, then start on channel 1 or channel 2 pressure measurement, processing and displaying measurement results; if the user presses the "ESC" key, then enter the network 4 "main menu" interface.
Enter main menu interface, press the "keys to move the cursor, press the" ESC "key to return to the parent menu (i.e.," measurement "menu); press" ENTER "key to enter the selected sub-menu.
For example, when the cursor is in the "measurement program" option, if you press the "ENTER" key, then enter the figure 5 "measurement procedures" to enter the submenu.
"Measuring program" submenu has five options, namely the program number and channel 1 and channel 2 's pressure on the lower value (that is, the minimum and maximum values), the user selected the set value is also given.
Again, press the key you can move the cursor, press the "ESC" key to return to the parent menu (main menu); press "ENTER" key to enter the the cursor below the submenu. For example, when the cursor is in the channel l "minimum" option, if you press the "ENTER" key, then enter the shown in Figure 6 of the "minimum" set interface.
Figure 6, "said passage l" 30.00 pressure minimum 30.00, "_" as the cursor prompt.
If the user wants to modify the set value, you can press, keys to move the cursor to the corresponding bit, and then press the key to modify the set value. For example, when the cursor is in position, if by "▲" key, set the value from 30.00 become 31.00; if the key is pressed, the setpoint 30.00 by become 29.00. In this way, with only four buttons, you can easily enter the set value.The main menu under "sensor" and "data" and "other" option under nested a different number of level II or multilevel submenu, for users to query and modify data, and configuration parameters.
Thus, although the instrument six action buttons and 1 LCD monitor, but TOX intelligent pressure monitor still gives the operator provides a user-friendly environment for human-computer interaction.
3 human-machine interaction design of the menu
This design, the main menu and submenus up to 20 pages, and in 2 languages for the user to select, thereby increasing the application-layer program design more difficult.
The program has a modular structure, mainly includes the following modulesBlock:Interface switching control module: as requested by the user to toggle operation interface, defines a Page_Point image register, its value in O ~ P-l changes between, p is the number of interface.
If Page_Point = O, the LCD display shows 0 page form (as shown in Figure 3 the measurement interface); if Page_Point = l, the LCD monitor displays the 1-page form (as shown in Figure 4 main menu interface). When users press the "ENTER" or "ESC" key, depending on the options at the cursor location to modify Page_Point value, and then updates the display form, the realization of human-computer interaction.Press the scan module: 6 actions button to scan the results exist Key_Status image register.
The register 6 digits, Key_Up, Key_Down, Key_Left, Key_Right, Key_Esc and Key_Enter, corresponding to the operation panel of six key "ESC" and "ENTER". If the sign bit is l, it means that the corresponding key is pressed; otherwise, the release.Options management control module: If the current operation interface belongs to the "options interface" (shown in Figure 4 and menu interface shown in Figure 5 of the measurement program interface are options interface), then press the key, the cursor ">" position up or down to move the l key.
To do this, define a Option_Point image register, 0 ~ N-1 (n is the number of options). If the main menu has four options, N = 4, then 3 for O ~ Option_Point; if measurement procedures sub menu with five options, N = 5, then Option_Point 0 ~ 4. Figure 7 as options management control module of program flow chart.
Data import module: If the current operation interface belongs to "reset several interface" (shown in Figure 6, the smallest value sets the number of interface belonging to reset interface), then press the and keys, cursor "_" is located to the left or the right one.
To do this, define a Bit_Point images registers for recording you can modify the location of the data bits. Press the key, you can set the current cursor data bits of the value with "l" or minus "l", for example, in Figure 6 shows the minimum value of the set interface, if by "▲" key, set the value from 30.00 become 31.00; if by "v" key, set the value by 30.OO become 29.00. With four key, you can easily enter any meet user requirements. Figure 8 is a data entry module program flowchart.Use this module, you only need a small amount of code you can flexibly implement option, modify data and switch operation interface and other functions.
This design uses the Assembly language programming, the chip-chip for j lower-performance PICl6F877A, despite its program memory only 8KB, but achieving a 20 page interface display and switching, as well as dozens of data sets and u asked, human-computer interaction capabilities while also implements the measurement, control and communication functions.
4 conclusions
Embedded system in human-computer interaction technology even better.
Through the LCD monitor and a small amount of a few keys, use of software in embedded system design for parameters setting and data management, and other interactive features that enhance the operation of fun and functionality to help improve the system of value added.
No comments:
Post a Comment