Embedded handheld entertainment system design

Under the UP-TECH S3C2410 DVK1.1 development platform, a touch-based embedded handheld entertainment system design was proposed. This system mainly includes the basic functions of multimedia players and games. The system can play most of the existing audio and video files; the embedded game is designed to increase the entertainment of the system. The touch screen is convenient as a platform for human-computer interaction. The application and human-machine interface are designed with Qt4 with good cross-platform performance. The interface is friendly, Chinese display, beautiful, easy to operate and smooth. The modular design of the whole system fully considers the storage space and scalability of the software system itself, and has broad market prospects.

This article refers to the address: http://

The embedded system is a dedicated computer system centered on the application, based on computer technology, and the software and hardware can be tailored to meet the strict requirements of the application system for function, reliability, cost, size and power consumption. In recent years, with the development of microprocessor technology, DSP technology, multimedia codec technology and embedded technology, multimedia entertainment terminals have become a hot spot in consumer electronics products. At the same time, the mature market will continue to grow rapidly in the next few years with the great success of MP3 in the market and the start of related technologies such as MP4, digital TV and 3G communication. Multimedia terminals are an important part of the digital information industry, so in this context, MultimediaTerminal has great potential for development. This paper is based on the Linux embedded operating system and designed and implemented a high-performance, low-power, low-cost embedded handheld entertainment system under the UP-TECHS3C2410 DVK1.1 development platform.

1 System Overview

This system uses UP-TECH S3C2410 DVK1.1 as the development platform and uses embedded linux as the operating system.

The implementation of this system includes two aspects, one is the construction of the underlying system. The system is appropriately tailored on the general embedded Linux operating system to conform to the system hardware platform, and initializes the underlying driver to realize the control of the system and the storage and transmission of data. The second is the implementation of the application layer.

The bottom layer of the system includes the construction of the file system and the drivers for various interface components. These drivers are called by the embedded Linux operating system, and then the functions of the application are completed to provide services for the upper interface layer and application layer [5].

The embedded GUI in the middle is the interface layer, and QT4 is used as the interface library of the user GUI. QT4 is a server-client-based user interface middleware that provides rich functional controls and beautiful interface design features to easily design the various functional modules required.

The top layer of the system is the application layer that is directly facing the user. This layer uses QT4 design to provide users with a beautiful user interface, and users can easily call related functions through the touch screen. The software structure block diagram of the system is shown in Figure 1:

1.jpg

Figure 1 System software block diagram

The design of the application layer is the main development work of this paper, which mainly includes the following functional modules:

1 Multimedia function module: Call the MPlayer player to locate the body file corresponding to the external memory in the system memory or USB interface, and decode it; the video and video files can be played in full screen/minimum playback. Almost all audio and video files that are available on the market can be played.

2 Entertainment Game Features: Provides several user-friendly and fun games to increase the entertainment of the system.

2 development platform

2.1 Introduction to Hardware Development Platform

The hardware platform adopts Borch UP-TECH S3C2410 DVK1.1 development board, processor type: Samsung S3C2410. Main frequency: 203MHZ.

It is suitable for industrial control, mobile communication equipment, medical equipment and other occasions, expands 64MB NAND FLASH and 64M SDRAM, provides USB2.0 interface and computer for high-speed communication; the platform integrates large-size LCD touch screen, model: LQ080V3DG01, Resolution: 640 * 480 pixels, which is also an important reason to choose it as a development platform. The system hardware block diagram is shown in Figure 2.

2.jpg

Figure 2 system hardware block diagram

2.2 Introduction to Software Development Platform

At the system level, the UP-TECH S3C2410 DVK1.1 development board provides a low version of the original system (vivi, linux-2.4, root.cramfs). Therefore, for the multimedia entertainment system, Uboot-1.1 is suitable for the system. 6, linux-2.6.24 kernel and yaffs file system. The system uses a more general bootloader: UBoot, kernel linux2.6 with more network resources and readable and writable yaffs file system, which is easy to develop. It is equipped with LCD screen driver, network card driver, SD card and other drivers.

At the application level, all applications are designed using the QT SDK.

Qt is a cross-platform C++ graphical user interface (GUI) library that includes cross-platform libraries, integrated development tools, and cross-platform IDEs. Using Qt "once development, multiple compilations", you can cross differently without having to rewrite source code These applications are deployed on desktop and embedded operating systems.

3 realization principle

The design of the application layer software mainly includes two modules: a multimedia player and a game module. The user's main interface is designed with a main frame, and then the icons of other functional modules are placed in the frame to complete the overall planning and design. The design and implementation of these two functional modules are described in detail below.

3.1 Player implementation

For audio and video playback, the system uses QT to design a front-end playback and control interface, and uses Mplayer as a back-end program to play mp3, ogg, ogm, wma, wav, asf, au, avi, mpeg, mpg, mv1. Audio and video formats such as mov, wmv, pls, m3u, mp4, m4a. The structure of the player module is shown in Figure 3. The player uses Mplayer as the backend program (red part) and uses QT4 to develop the front-end program (green part).

3.jpg

Figure 3 player structure diagram

3.1.1 Introduction to the backend program

This system uses Mplayer as its backend program. MPlayer is rated as the best media player for Linux, and can play a variety of media including video, audio, streaming, radio, TV, etc. without any system decoder.

Another important feature of Mplayer is its open source.

Realplayer, Windows Media Player, Quick Time and many other playback softwares are excellent performance playback software, but because they are not open source code, it brings trouble to the transplant. At the same time, MPlayer is also portable, can be ported to many non-X86 platforms, and the MPlayer package contains optimized code for the ARM architecture, which uses ARM features to speed up the processing of the media.

Based on the above reasons, the system selected MPlayer as the playback software of the entertainment terminal. The system realizes the function of playing video by transplanting Mplayer. Mplayer editing and decoding module is the audio and video processing center of the system. It contains a large number of audio and video format processing programs in the mplayer codec library. The compiled and optimized mplayer can complete most audio and video formats. Codec work.

3.1.2 Design of the front-end program and implementation of the player

The main interface window has a display and some control buttons, including play, pause, next, previous, volume adjustment, and playback progress bar. The file operation window allows the user to select a file to play.

The playlist is used to play multimedia files loaded by the user.

MPlayer plays by default in full screen, but in the GUI it is usually specified area or control to play. This is beautiful, MPlayer supports the ability to play in the specified X window. Use the -wid parameter to tell the window ID. For example: mplayer test.mpg -wid 0x00029 #0x0029 is XID, and QT controls are inherited from QWidget, so it also has wid, so as long as you use QWidget::winID() to remove WID, you can play in the specified window. The function of the video.

This module is to build a Qt GUI program. Then use a label control to play the video screen, use a progress bar to display the progress of the playback, use the button to play, pause, last, next, stop and add resource files. Then use a Qprocess to execute MPlayer in the background and pass the WID of the label to it. Then, the MPlayer's input and output are redirected, and the original received command from the standard input is changed to the receiving command from the GUI.

3.1.3 Playback function design

The software flow chart implemented by the player is shown in Figure 4:

4.jpg

Figure 4 player software flow chart

The compiled Mplayer is called by defining a QProcess object.

QProcess *process = new QProcess();

Process->setProcessChannelMode(QProcess::MergedChannels);

Process->start("mplayer –ac –mad xxxxx");

Add -slave and -quiet to the command to set the Mplayer to achieve the corresponding function. Process->start("mplayer–slave –quiet –ac –mad xxxxx").

The player's pause playback function and volume adjustment are described below.

1 play pause function design

This code can be used to set the Mplayer pause: process->write("pause "); when this code is executed, it will pause in the playback state, and will continue to play in the pause state.

2 volume adjustment

The following code can be used to adjust the volume:

Process->write("volume -1 "); //Volume down;

Process->write("volume +1 "); //Volume increase;

Process->write("volume XX 1 "); //Volume is set to the specified value

The system uses the following code to achieve volume adjustment:

QString cmd="volume" +QString::number(value)+" 1 ";

Process->write(cmd.toLocal8Bit().data());

The experimental results of the final implementation of the system are shown in Figure 5:

5.jpg

Figure 5 player module experiment results

3.2 Design of the game module

This system has designed a brick-breaking game. By creating a brick-breaking game class CannonField, including angle int angle, velocity int force, whether to shoot bool isShooting and other members, with set angle setAngle (int angle), set velocity setForce (intforce), shoot shoot (), motion Trajectory shotRect(), game control newTarget(), setGameOver(), restartGame() and other slot functions, can hit hit(), missed missed(), angle change angleChanged(int newAngle) force change force Changed(int newForce) and other signals.

The game starts with a random function that displays a brick in the specified area, clicks the angle and velocity set by setAngle and setForce when the shooting button is clicked, shoots with shoot(), hits hit() or misses missed (by hitting) ) Signal to make the corresponding action. The simulation effect diagram is shown in Figure 6:

6.jpg

Figure 6 game module experiment results

4 Summary

The system uses open source Linux operating system and QT4 interface design tools. The whole system adopts modular design and has good scalability. The hardware platform adopts UP-TECH S3C2410 DVK1.1 embedded system. The chip adopts ARM architecture. Its unique architecture design has low power consumption and strong function, so it is very suitable for handheld devices; LCD touch screen is used. The user interacts and is simple to use, in line with the development trend of portable terminals.

Solar Power

Easy Electronic Technology Co.,Ltd , https://www.nbpcelectronicgroup.com

Posted on