P89C51RD2 customizable interface design, human-computer interaction
With the needs of society and scientific and technological development, the product of increasing competition, update cycle becomes shorter and therefore asked the designers to quickly design new products; and in the overall product design, human-computer interaction interface design is often occupy a large part of the work, so that will not only greatly increased the cost of product development and extend the product to market. This paper discusses the P89C51RD2-based human-machine interface is an interface can be customized, compact, inexpensive, easy to use, excellent performance of the universal man-machine interface can be a good solution to these problems.
1 system Works
1.1 Working Principle
The practical application of control systems in accordance with the needs and control systems and human-machine interface conventions, through the PC, visual human-machine interface, custom software, custom interface information better as a whole, then customize the interface information downloaded to a good man-machine interface system, you can easily achieve the man-machine interface customization. In the application, the man-machine interface via the serial interface and control systems to interact, send keys and other information to the control system, and receive the required variable information in order to complete the human-computer interaction.
With air compressor controller is part of the human-machine interface as an example to illustrate the concepts, interface system diagram shown in Figure 1. Related concepts as follows:
① screen, that is, LCD display area, by one or more items of the composition of the screen;
② the screen, that is inside the screen displays the contents of the nature of their differences in a month divided by the whole unit, such as a text entry screen, and so on;
③ screen, the classification of items according to their differences in the nature of the display is divided into text, integer, floating-point type, enumeration type, graphics and so on.
The human-machine interface system by the existence of a link between one screen composition, each screen to another by one or more items of the composition of the screen. The screen item has its own attributes, but also there are certain links between each other (for example, by a screen necklace was otherwise a screen). Thus, by right of the screen rational organization items constitute a linked network of the network and through the operation of this list to achieve human-machine interface operation, namely, the screen display operation.
1.2 The working process of the system
software portion of the system by the user to guide the composition of programs and applications. The system, the user interface to guide the implementation of the decision procedure to update the information or the normal operation. If the implementation of the interface to update the information, the system interface from the host computer through a serial interface to receive customized information, and through In-Application Programming (IAP) function to save the information received, and then read the new interface customization for local information on the establishment of linked network; if the normal operation directly from a local custom to read the old interface, the information network of the establishment of the list. application implemented key features include input, display and interface and control system of communication.
2 system hardware design and circuit diagram
The system uses Philips's powerful, resource-rich P89C51RD2 mcu as a micro-controller, through the expansion of LCD module and keypad module to form the man-machine interface. The system's hardware circuit principle shown in Figure 2.
About 2.1 P89C51RD2 SCM
P89C51RD2 is a Philips company's 8-bit 80C51 microcontroller core based on a derivative product, in complete retention 80C51 instruction set and hardware architecture of the large framework, carried out a wide range of strengthening, expansion and innovation. P89C51RD2 in parallel with a 64 KB non-volatile programmable flash program memory, and can realize the device serial in-system programming and applications programming.
2.2 LCD Module
The system uses a OCM12864 graphic dot matrix LCD display modules. OCM12864 liquid crystal display module is 128 × 64 points, formation liquid crystal display module can display a variety of characters and graphics, can be directly connected with the CPU; with the standard 8-bit data bus and six control lines and power cord.
2.3 Key Input Module
According to system requirements, the system need to be set at least the following six-screen action buttons: left, right, up and down, changing screen to determine the key. Among them, the left and right to switch the screen item; the upper and lower key is used to modify the variable-screen items; determine the key used to generate the selected item corresponds to the function screen action;-for-screen button for the link to enter the selected item screen, if the current screen does not select the item, then enter the first link of the screen. Of course, according to the need to expand the number keys and function keys.
The system uses an ordinary keypad matrix structure, also known as "the determinant of the keyboard structure." System design 4-line 4 of 16 keys, it only occupies 8 I / O port lines, keys and occupy more than a few I / O port line low. In addition to the six-screen action buttons, the remaining 10 keys by the user to customize the features, such as number keys or function keys.
3 System Software Design
As the function of the system realization is not particularly complicated, therefore, before and after the Taiwan-based control program of traditional design methods. System, the program flow shown in Figure 3.
3.1 user guide program design
The program flow can see by the system, the user on the system power-on boot program executed after. First, it checks whether the need to download the customizable interface information, when you examine the need to download, they came to receive the host through the serial port interface for custom data, start the IAP functions, to operate on the Flash to the received data into a predetermined position of . Then enter the interface system building phase. If not, download the request directly into the interface system building phase.
In the interface system building phase, by reading the information desired location at the establishment of a list style. Based on this list that is suffering from the operation of the network interface system operation.
3.1.1 Related Settings
Screen entry consists of: displaying information (such as the display position, type, content, etc.) and link information (such as links to screens, etc.). Taking all the needs, the main data set is structured as follows:
In which, back, ahead of two-way items used to build the screen circular list; next screen used to construct a one-way circular linked list; init screen with the screen used for the original link.
3.1.2 linked network of
Items constitute the same screen, two-way circular linked list, links, constitute a one-way screen circular list. Implementation method: first to the establishment of each screen display as a unit of horizontal two-way circular list; then traverse the screen two-way linked list, for each screen to establish links between items, thus forming a linked network. Such as the interface system diagram (Figure 1) shows, feature selection, maintenance information, fault records, user settings, the factory set 5-screen items constitute a screen of horizontal two-way linked list, and to protect the information, filter to use the time separator 3 where the use of time constitutes a link to screen a one-way screen circular list, the final composition as shown in Figure 4 lists the network diagram.
Concrete realization of the steps described below.
(1), the horizontal screen items to build a two-way circular linked list
Downloaded from the PC, due to human-machine interface to customize the interface information is scheduled according to the following format in Flash (which, among the various screens to SCREEN_END character constant as a dividing line), it is key in building a horizontal two-way linked list, the start with a predetermined location of each item of information to read and fill to the entry structure, inserted into the doubly linked list in the final.
Format Description: STA representative of start character, END behalf of terminator, L represent the length of the frame of bytes of data, x / y / LinkNo / SreenNo / Item_ID / Select / type, see data_t structure description.
① text entry format: STA + L + x, y, LinkNo, ScreenNo, Item_ID, Select, type (1), string (text) + END.
② integer, floating-point items: STA + L + x, y, LinkNo, ScreenNo, Item_ID, Select, type (2 / 3) + END.
③ enumeration items: STA + L + x, y, LinkNo, ScreenNo, Item_ID, Select, type (4), count (enumerate the number of items), string1 (string 1), string2 (string 2), ..., + END.
Correlation function: int add_item_node (link_t pNode, data_te); the entry node inserted into the horizontal two-way linked list.
(2) link-screen to build a one-way circular linked list
Traversal has generated a two-way linked list of all screens, for each screen to establish links between items, thus forming a linked network.
Correlation function: int create_net (link_t head); traverse the screen two-way linked list, the establishment of the network list.
3.2 Application Design
Responsible for completing the application button scanning and processing, interface, display, and control systems of communication.
By the system flow diagram we can see a good list to build the network after entering the application phase, the system enters the normal running state. Through the system to set the current screen pointer, the current entry pointer and linked networks have been built to achieve human-machine interface operation.
3.2.1 Man-Machine Interface and Control System communication format
Format Description: STA representative of start character, END behalf of terminator, type representative of the type.
(1) The Man-Machine Interface → Control System
① Request variable information: STA + type (1) + Item_ID (item ID) + END
② keys: STA + type (2) + number + key a button (, key 2, ...) 10 Item_ID (item ID) + END
Description: The Item_ID communication format can be ② 0.
When is 0, indicating the current non-selected item or function keys.
(2) control system → Man-Machine Interface
① Returns variable information: STA + type (1) + Item_ID (item ID) + content (content) + END
② Press to Confirm: STA + type (2) + END
③ Press to Confirm and return the modified variable information: STA + type (3) + content (content) + END
3.2.2 display interface
The current screen by traversing the horizontal two-way circular list to display items one by one. Of which deal with all types of items are as follows:
① When the screen item is text, directly read and displayed.
② When the screen item is an integer, floating point, through the control system to obtain its value and displayed.
③ When the screen when the item is enumerated by the control system to obtain the value, and then read the corresponding value is a string and displayed.
3.2.3 Key processing
All the buttons are first sent to the control system and wait for confirmation. There are following types of keys and the corresponding processing:
① When the functional key, sent directly to the control system, man-machine interface, no further processing.
② When the upper and lower keys, if there are selected items of the current screen and is a variable items (such as integer, floating point, etc.), then receives the processed information and displayed.
③ When the left and right, when, if options, then to the current screen option or switch the screen (through the operation of horizontal two-way circular linked list to implement).
④ When the key is to determine if the current screen, there are selected items, then enable this feature (by sending the key and the item ID to a control system).
⑤ When the screen button for the change, if there are selected items of the current screen, and such a link, then enter the link to the screen; If there is no selected item and the first screen, there are links, then enter this link to the screen (through the operation of link to screen a one-way circular linked list to implement).
From the data structure point of view, comprehensive utilization of PC machine, P89C51RD2 of the IAP functions, combined with control system, cleverly designed a general-purpose man-machine interface can be customized. The use of such man-machine interface, whether it is the development of new products, product updates, or upgrades, can reduce the development workload, shorten development time, in order to win precious time to market products, which can enhance the competitiveness of enterprises, so The system has a very broad market prospects.
The Design Innovation points:
① Use the IAP function P89C51RD2 a good interface to customize the information stored in Flash, the realization of interface information updates.
② Based on data structure, presents a list by creating a custom network to realize a good interface for dynamic organization, so as to realize the interface can be customized features. This feature makes machine interface design is more efficient, thereby reducing the workload of the development to shorten development time.
Micro Controller Unit Articles
- P89C51RD2 customizable interface design, human-computer interaction
- QST108 touch sensor interface design with PIC microcontroller
- Based on single chip car super capacitor test system design and implementation
- A simple microcontroller suitable for classroom teaching experiment DEVELOPER
- MCU for electric bicycles to provide an effective drive (Figure)
- Real-time kernel μC / OS-II under the Network Monitoring System
- Based on AT89C52 Microcontroller Design SD card reader
- Based on low-power MCU Intelligent Integrated Instrument Design
- A small, highly integrated intelligent design and realization of test device
- Freescale Flexis JM family of flexible controller to start the development of USB connections
- Intelligent design dumbbell
- Automotive Burglar Alarm Monitoring System
- A STC12C2052AD improved single-chip voltage regulator control circuit
- Embedded design using C8051F020 Tester
- Based on single-chip low-power active RFID tag design
- Based on OSEK / VDX the electric power system design
- Flexible framework for the realization of MCU products easily upgrade
- Wireless Remote Control LED Clock Screen Design
- ISP-based image processing system of the PLD hardware design
- A single-chip multi-machine communication system design
Can't Find What You're Looking For?
Rating: Not yet rated