1572 views|0 replies

2015

Posts

0

Resources
The OP
 

Development of User Graphical Interface (GUI) for Digital Oscilloscope Based on DSP [Copy link]

With the continuous expansion of the application field of embedded systems, the complexity of the system is also increasing. Therefore, it has become a general trend to implement user graphics (GUI) in embedded systems. In measuring instruments, graphical interfaces are also widely used. One is to embed the operating system. Most user graphical interfaces (GUI) are implemented by calling various API functions of the system with the support of the operating system (such as OS, WinCE, Linix). These operating systems provide a large number of library functions for the implementation of GUI, and also provide programmers with a good platform for interface design. However, this embedded technology has high hardware requirements, which is equivalent to embedding a computer. For example, using WinCE, it is very convenient to design a Windows-style graphical interface. Another is to directly use DSP technology to develop small systems. This system is streamlined and has low hardware requirements, but the functions are relatively simple. The
digital oscilloscope in this article is the DS1000 series, which is designed completely independently and is close to the usage habits of Chinese people. Its user graphical interface (GUI) is developed on the basis of VisualDSP++ 4.0 Kernel, and the interface style is closely related to the function of the instrument. On the basis of completing the display of the instrument's waveform and menu, the RIGOL team also made some universal user graphical interfaces, such as file managers, etc. Of course, the designed user graphical interface is far from being comparable to WinCE in terms of powerful functions, but it is convenient enough for instrument users - because after all, it is the user graphical interface of the instrument, not the user graphical interface of a handheld computer PDA.

The implementation principle
of the user interface requires the support of hardware and software. As shown in Figure 1, through the deployment of the operation platform, the display program is called, the display program refreshes the display cache, and then the display driver displays the content in the display cache on the LCD screen.

Figure 1 Schematic diagram of the user graphical interface implementation of the RIGOL DS1000 digital oscilloscope

The following is a brief introduction to the main components in Figure 1.

GUI Graphics Standard Library
To display various graphics and patterns on the user graphical interface, in addition to the support of hardware circuits, it also requires powerful software support. Among them, the (GUI) graphics standard library is the most basic and indispensable. The graphics standard library of the user graphical interface (GUI) includes the most basic functions of drawing points, drawing lines, drawing rectangles, filling rectangles, drawing circles, placing bmp format patterns, displaying Chinese and English, etc. The more powerful the graphics library is, the more complex the user graphical interface (GUI) can be supported.

The support of the GUI operating platform
is only provided by the standard graphics library for drawing graphics, which is far from enough to realize the user graphical interface. The graphics library is indispensable for a single screen, but to form an organic and operable user graphical interface, a stable and powerful operating system platform is also required in the background.
The operating platform determines the next state of the system based on the user's external input (usually the keyboard) and the current state of the system, and thus calls the corresponding GUI interface. In this way, the user graphical interface is realized.

The hardware principle of realizing graphics
RIGOL DS1000 series digital oscilloscope uses a 320×234 resolution TFT liquid crystal display. Through the liquid crystal driving circuit, the liquid crystal can display normally. Through the frame signal synchronization, line signal synchronization, and data signal clock synchronization, the data of the display dot matrix will be written from the SDRAM to the display buffer of the liquid crystal display, thereby displaying a color image. As
can be seen from Figure 1, if we want to update the content displayed on the liquid crystal display, we only need to update the display data in the LCD buffer.

Design ideas for graphical user interface (GUI) software

The design of the
graphical user interface (GUI) cannot be completed simply and uniformly. It is necessary to consider the user's operating interface in various situations. According to the common points of these interfaces, we divide these interfaces into the following categories. The same type of interface will have the same or similar functional areas. Each interface will have a corresponding processing program and a special data structure.
According to the different functions implemented, the following interface types are divided:
A. Background grid display interface; B. Waveform display interface; C. Help document browsing interface; D. Menu display interface; E. File management browser interface; F. File name input interface; J. Foreground content display interface (including various parameter display information, measurement information and prompt information, etc.).
The types of interfaces are shown in Figures 2 and 3.


Figure 2 RIGOL DS1000 digital oscilloscope graphical interface description 1

Figure 3 RIGOL DS1000 digital oscilloscope graphical interface description 2


The mutual coordination and response between the interface area and the external input
From the above, we can see that although the displayed graphics are of various shapes, they can all be abstracted into a certain data structure with common attributes. The data structure is like the soul of the graphical interface. If you master the data structure, you can change the graphical interface accordingly.
Then how to design, control, and change these data structures becomes the key to realizing the user graphical interface (GUI). To respond to the input of external users, we need to formulate a set of mechanism operation rules, and this set of mechanism operation rules is the state machine (system status machine), which is also the operation platform (operation platform) used by users to operate the instrument. According to this set of operation rules, our system changes the data structures used in various interfaces according to the external input, so as to realize the user's operation of the graphical interface.
Of course, in the actual design, the operation platform not only changes the data structure of the GUI, but also considers the changes in the data structure in task scheduling and other task modules.

Software Design Process of the User Graphical Interface (GUI) of Digital Oscilloscope
Designing a good user graphical interface is a huge and detailed project. It involves the interrelationships of various aspects and also involves many details in the implementation process.
How to sort out these numerous changing relationships is the key to the design. The RIGOL team used some global variables as signs of various states and modes to change the user's graphical interface. However, due to the large number of variables, the possibility of matching between variables has increased exponentially, and the state transfer relationship will also increase exponentially. For programmers, this is more like doing an extremely complex logical combination problem than programming.
Therefore, such a way of thinking is feasible in theory, but it is not advisable in practice. We should try to remove its branches and leaves and find variables or structures that can run through the entire system and mark different states and modes. In the end, we use the input key value of the keyboard as the main line, supplemented by various global variables, to control the changes in the system state. Although there are many key values, because there is only one variable as the state quantity, the changes in the system state can be controlled. Therefore, in this system, the key variable KEY_ID becomes the protagonist, and the user interface will change around it.
The key variable KEY_ID will change according to the user's input. Here we will not describe how the state variable is transferred. We will introduce how to complete the user graphical interface output for the given key variable KEY_ID. Figure 4 is a software flow chart for implementing the user graphical interface.


Figure 4: Software flow chart of the digital user graphical interface of the RIGOL DS1000 series oscilloscope


Conclusion

At present, in addition to the low performance indicators of measuring signals, domestic digital oscilloscopes are not as well considered as foreign products in terms of system integrity and user operability.
As the functions of the instrument increase, higher requirements will be placed on the user graphical interface (GUI), which requires the GUI to be more systematic, modular, and functional. Therefore, there is still a lot of work to be done in this regard.

This post is from Microcontroller MCU
 

Guess Your Favourite
Just looking around
Find a datasheet?

EEWorld Datasheet Technical Support

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号
快速回复 返回顶部 Return list