Simple digital photo frame based on ARM9

Publisher:精品古钱斋Latest update time:2012-08-07 Source: 21ic Keywords:ARM9 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

Although digital photo frames have been around for several years, they are still a new concept for many people. Digital photo frames display digital photos through LCD screens, can obtain digital photo information from SD cards through card reader interfaces, and can be set to display in a loop. They are more flexible and versatile than ordinary photo frames, and also provide a new display space for the increasing number of digital photos. This article introduces an embedded simple digital photo frame based on the mini2440 ARM9 development system. Its hardware including keyboard, IO port, display software including LINUX operating system are all resources of mini2440, which will not be described in detail here.

1. Main functions

After booting up, the boot picture will be displayed. Click the icon on the touch screen to enter the setting interface or on-demand interface. In the setting interface, you can adjust the volume of the background music and set the switching time when playing the slide show. Click the play interface to enter the playback of pictures in the USB.

2. Development environment and hardware circuit

1. Host environment

In the virtual machine, Fedora9 is used to enable the smaba service.

Use Source Insight to edit and view the code under Windows, and compile under Linux environment.

2. Development board environment

The Linux system uses the 2.6.26 kernel. The kernel contains key underlying drivers, such as LCD, sound card, network card, etc. Designers should have some basic knowledge of the Linux operating system.

3. Hardware

The mini2440 is a low-cost and practical ARM9 development board, which is a very cost-effective learning board. It uses Samsung S3C2440 as the microprocessor, and uses professional and stable CPU core power chip and reset chip to ensure the stability of system operation. The development board provides support for sound card, network card, USB, etc., which is very convenient for the production of digital photo frame.

Its main technical parameters are as follows:

(1) CPU processor: Samsung S3C2440A, main frequency 400MHz, maximum 533Mhz;

(2) SDRAM memory: 64M SDRAM on board; 32-bit data bus; SDRAM clock frequency up to 100MHz;

(3) FLASH storage: on-board 64M Nand Flash;

(4) Main interfaces and resources:

- 1 100M Ethernet RJ-45 interface (using DM9000 network chip);

- 3 serial ports; - 1 USB Host;

- 1 USB Slave Type B port;

- 1 SD card storage interface;

- 1 stereo audio output interface, 1 microphone interface;

(5) LCD display: 320×240 32-bit color LCD with touch screen; the board integrates a 4-wire resistive touch screen interface, which can be directly connected to a 4-wire resistive touch screen; supports black and white, 4-level grayscale, 16-level grayscale, 256-color, 4096-color STN LCD screens, with sizes ranging from 3.5 inches to 12.1 inches, and the screen resolution can reach 1024×768 pixels;

(6) With audio output, used to play music. [page]

3. Development and production process

1. Port QT (version is qt-embeddedfree-3.3.7)

QT is a cross-platform C++ graphical user interface library, which is an application framework and window system for providing graphical user interfaces for small devices. It provides a rich set of widgets, supports the customization of widgets, and can provide users with beautiful graphical interfaces. QT is an open source graphical interface software and one of the most popular graphical interfaces. The specific transplantation steps are as follows:

(1) Download the QT source code qt-embedded-free-3.3.7.tar.gz and qt-x11-free-3.3.7.tar.gz from ftp://ftp.trolltech.com/qt/source/.

(2) Compile qt-x11-free-3.3.7

① tar zxvf qt-x11-free-3.3.7

② cd qt-x11-free-3.3.7

③ ./configure

④ /usr/bin/gmake

(3) Cross-compile: compile qt-embedded-free-3.3.7

① tar zxvf qt-embedded-free-3.3.7

② c p q t - x 1 1 - f r e e - 3 . 3 . 7 / b i n / u i c q t -embedded-free-3.3.7/bin

③ c p q t - x 1 1 - f r e e - 3 . 3 . 7 / b i n / m o c q t -embedded-free-3.3.7/bin

④ cd qt-embedded-free-3.3.7

⑤ . / c o n f i g u r e - s h a r e d - t h r e a d-embedded arm -qvfb -freetype -depths4 , 8 , 1 6 , 2 4 , 3 2 - q t - g i f - q t - l i b p n g - q t -libmng -qt-libjpeg -qtopia-sqlite -no-qvfb/usr/bin/gmake

(4) 运行qt-embedded-free-3.3.7/example/hello/hello :

#cd qt-embedded-free-3.3.7/example/hello./hello –qws

If the screen displays hello, it means the transplant is successful.

[page]

2. Porting the audio player

The player used is Madplay. Madplay is an open source player and is easy to use.

Main program for managing Madplay, including play, pause, resume, and stop.

system("madplay north.mp3 &");

// Use the system function to call the madplay player to play *.mp3 music

system("madplay north.mp3 -r &"); //Loop playback: parameter -r

system("killall -9 madplay");

// Use the system function to call the killall command to terminate madplay

system("killall -STOP madplay &");

// Use the system function to call the killall command to pause madplay

system("killall -CONT madplay &");

// Use the system function to call the killall command to resume madplay playback

The specific steps are:

(1) Madplay's official website is http://www .

underbit.com/products/mad/. According to the introduction on the website, it also requires two libraries, libmad and libid3tag. The download link can be found from the website: http://sourceforge.net/project/showfiles.php ?

group_id=12349, you will get the three files needed to port Madplay: madplay-0.15.2b.tar.gz, libmad-0.15.1b.tar.gz and libid3tag-0.15.1b.

tar.gz.

(2) Put these three files into the madplay folder. The specific operations are as follows:

#cd /

#mkdir madplay

#cd madplay

#mkdir src-arm target-arm

After decompression#cd madplay

#for f in $(ls *.tar.gz); do tar xvzf $f –C/src-arm ; done.

(3) Install libid3tag

#cd /src-x86/libid3tag-0.15.1b

# . / c o n f i g u r e - - p r e f i x = / m a d p l a y /target-x86

#make

#make install

(4) Install libmad

#cd / libmad-0.15.1b

#./configure --prefix= /target-arm

#make

#make install

[page]

(5) Compile and install madplay

#cd /madplay/madplay-0.15.2b

# . / c o n f i g u r e - - p r e f i x = / m a d p l a y /t a r g e t - x 8 6 - - C P P F L A G S = - I m a d p l a y /t a r g e t - a r m / i n c l u d e – L D F L A G S = - L /madplay/target-arm/lib

Generate the Makefile file required for compilation. Enter the following command to start compiling and installing:

#make

#make install

(6) After the execution is completed, the executable file is installed in the specified directory /madplay/target-arm/bin/madplay. Copy an MP3 file to the directory where madplay is located, and execute: #./madplay test.mp3, and you can hear the sound of the MP3.

3. Write a program

(1) Write operation process.

Create a mainwindow class in the main program to display the startup interface and receive click events on the startup interface.

① Create a setting class in the main program, initialize it as hidden, and use it to configure the background music, volume, and slide show format. When the boot interface is displayed, click the configuration icon, the object of this class is displayed, and the configuration interface is displayed. Click the hidden icon of the setting interface to hide the interface; the configuration interface sets the switching time, music, and volume of the slide show. ② Create a play class in the main program, initialize it as hidden.

After the startup interface is displayed, if you click the play button, the picture will start playing. During the playback process, click the on-demand interface to display the startup interface.

③ After setting, click the "Play" icon to start playing.

(2) Establish a program framework.

QT is easy to use and powerful. Using it to realize the functions of this work saves a lot of trouble in writing programs. It provides support for most popular image formats, such as BMP, PNG, JPEG, etc., and can process images. We can use QT programming to achieve image flipping, distortion, scaling, overlapping, and various switching effects of playing slides. Use the touch screen to realize input operations and switch interfaces.

(3) Edit and debug the program.

The program is written in C++, edited with source insight software in the Windows host system, and compiled in the virtual machine Linux environment through file sharing. The specific steps are as follows:

① In the shared directory of the Windows host and the Linux virtual machine, open the source insight software, create a project, import the QT source code into the source insight project, and then create a new digital photo frame file in this project. In this way, the class members will be automatically completed.

② After editing, save.

③ Enter the digital photo frame project path of the virtual machine and execute the following command to compile.

/bin/qmake –project

/bin/qmake

make

④ Mount the development board and debug (using NFS). Enter the development board terminal, execute relevant commands, and view the program execution effect.

Repeat the above steps until the program is debugged satisfactorily, then burn the debugged program into the flash chip of the board and run it offline.

IV. Conclusion

Digital photo frames require simplicity and practicality, beautiful interface, and strive to give people spiritual enjoyment. This production focuses on this goal and highlights the beautification of the interface, such as the slide switching and volume adjustment interface. The digital photo frame has simple functions and a general framework. On this basis, many modifications and upgrades can be made, such as connecting to the network, playing videos, displaying calendars, alarm clocks, etc.

Keywords:ARM9 Reference address:Simple digital photo frame based on ARM9

Previous article:Development of Traffic Violation Capture System Based on ARM9
Next article:Research on SIM card detection system based on ARM

Recommended ReadingLatest update time:2024-11-16 16:54

Porting OpenCV2.0.0 to ARM9 (III) (JZ2440----S3c2440)
We have cross-compiled and generated OpenCV libraries and libjpeg-related libraries. Now let's try to write and cross-compile an OpenCV application. 1. Opencv test program test.cpp program code: #include stdio.h #include highgui.h #include imgproc.h int main(int argc,char *argv ) { IplImage* img = cvLoadIma
[Microcontroller]
Porting OpenCV2.0.0 to ARM9 (III) (JZ2440----S3c2440)
Key interruption---We played mini2440 (arm9) bare metal together in those years
ARM interrupt control system Key driver design 1. Arm interrupt control system 1. Query method The program continuously queries the status of the device and responds accordingly. This method is relatively simple to implement and is often used in relatively simple systems. For example, a temperature control system can
[Microcontroller]
Key interruption---We played mini2440 (arm9) bare metal together in those years
Design and implementation of USB communication based on embedded ARM9
introduction USB (Universal Serial Bus) is the abbreviation of universal serial bus. It has become the mainstream interface of computers because of its convenience, dynamic bandwidth allocation, excellent fault tolerance and high cost performance. With the widespread application of embedded systems, various small
[Microcontroller]
Design and implementation of USB communication based on embedded ARM9
Design of ECG Simulation Waveform Generator System Based on ARM9
0 Preface   With the development of society, people are paying more and more attention to the development of health care, and the requirements for medical technology are getting higher and higher. In reality, many cases cannot be learned through real cases, and more doctors can only be trained through simulation equ
[Microcontroller]
Design of ECG Simulation Waveform Generator System Based on ARM9
Design of remote monitoring terminal based on ARM and GPRS
With the development of modern production technology, the requirements for monitoring technology are getting higher and higher, and the forms are becoming more diversified. In unmanned substations, hydrological stations, meteorological stations and other field monitoring or in transportation and other industries, due t
[Microcontroller]
Design of remote monitoring terminal based on ARM and GPRS
Solution of ECG Defibrillation Simulation Generation System Based on ARM9
With the development of society, people's awareness of medical care is getting stronger and stronger, so the training of doctors has become a very important link. As a major aspect of doctor training, ECG defibrillation technology can often save people from danger in an emergency if the operation is standardized and
[Microcontroller]
Solution of ECG Defibrillation Simulation Generation System Based on ARM9
Embedded Web Server Transplantation and Testing
With the continuous development of computer technology and modern communication technology, the device is the network is the objective requirement for embedded systems in the post-PC era, so it is also necessary to establish a network Web server for embedded devices. Embedded Web can realize remote control in various f
[Microcontroller]
Embedded Web Server Transplantation and Testing
ARM9(S3C2440) LCD
LCD is the abbreviation of liquid crystal display. Liquid crystal displays are divided into static drive, simple matrix drive and active matrix drive according to the driving mode. Simple matrix drive is divided into two types: twisted nematic (TN) and super twisted nematic (STN). Active matrix drive is mainly bas
[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号