嵌入式相框
- 格式:doc
- 大小:1.54 MB
- 文档页数:12
题目:基于GEC6818开发板硬件平台的嵌入式电子相册摘要电子相册,在我们日常生活中主要存储一些自己的数字照片,随着电子产品日益更新换代,电子相册也不仅仅用于存储照片,可以做到存储文档、播放视频、阅读电子书、甚至玩大型游戏,俨然成为了多媒体娱乐终端设备。
其中硬件功能的升级换代功不可没,性能强大的芯片支持和存储设备使其不断成长。
而本次设计基于嵌入式LINUX系统的电子相册,就是一种在Linux嵌入式系统下的使用GEC6818开发板实现人机交互的集照片显示、视频播放功能和音乐收听等功能的多功能电子相册,此次使用的ARM芯片GEC6818开发板具有强悍的性能,具备许多市场上开发板常见功能接口,如触摸屏、VGA、SD卡、音频、RS串口等接口,可用于开发linux、安卓等系统。
目前市场上的主流电子相册软件都适用于手机和平板等终端设备,软件占用的内存较多、对硬件的要求高所以设计一个功能众多且体积较小的嵌入式Linux电子相册很有意义。
嵌入式系统作为新时代新兴系统,其前景什么广阔。
它具有操作简洁、方便、提供友好的图形GUI和图形界面,的优点,对入手学习的新手十分友好,从应用上讲现如今VR可视化设备、无人驾驶、智能家居等等新兴技术日复一日的出现在我们的生活中,它们都是智能电子产物里嵌入式技术的代表作。
Linux则是一种自由度非常高和开放源码的类Unix操作系统,在大学生涯也是作为学习的重点放入众多工科学生的课程中,其庞大的使用群体和开放的体系和丰富资源使得Linux将是日后普及和推广的重点。
关键词:多功能电子相册;Linux;GEC6818开发板;嵌入式系统;英文题目Embedded electronic album based on gec6818 development board hardware platformAbstractElectronic photo album is mainly used to store some of our own digital photos in our daily life. With the increasingly updated electronic products, electronic photo album is not only used to store photos, but also to store documents, play videos, read e-books and even play large games. It has become a multimedia entertainment terminal equipment. Among them, the upgrading of hardware function is indispensable, and the powerful chip support and storage device make it grow continuously. In this design, the electronic album based on Embedded Linux system is a kind of multi-functional electronic album which uses gec68118 development board to realize human-computer interaction under Linux embedded system, including photo display, video playback, music listening and other functions. The ARM chip gec6818 development board used in this design has strong performance, and has many common functional interfaces of development board in the market, such as Touch screen, VGA, SD card, audio, RS serial port and other interfaces can be used to develop Linux, Android and other systems. At present, the mainstream electronic album software in the market is suitable for mobile phones, flat-panel and other terminal devices. The software occupies more memory and requires high hardware, so it is very meaningful to design an embedded Linux electronic album with many functions and small volume. As a new system in the new era, embedded system has a bright future. It has the advantages of simple operation, convenient, friendly GUI and GUI, and is very friendly to the novice who starts to learn.From the application point of view, now VR visualization equipment, driverless, smart home and other emerging technologies appear in our life day by day, they are the representative of embedded technology in intelligent electronic products. Linux is a kind of UNIX like operating system with very high degree of freedom and open source. It is also put into the courses of many engineering students as the focus of learning in college. Its huge user groups and open system and rich resources make Linux the focus of popularization and promotion in the future.Keywords: Multifunctional electronic album; Linux; gec6818 development board; embedded system;目录1 前言 (1)1.1课题背景 (1)1.2本设计的目的、意义及应达到的技术要求 (1)1.3本设计在国内外的发展概况及存在的问题 (2)1.3.1国内外的发展概况: (2)1.3.2发展中存在的问题: (3)1.4本设计应解决的主要问题 (4)2.1总体设计 (4)2.2程序设计 (12)2.2.1 程序设计主要思路 (12)2.2.2 核心问题分析 (12)2.3方案选择 (20)2.3.1设计原理 (19)2.3.2设计过程 (21)3结论 (22)参考文献 (24)谢辞 ............................................................................................................................. 错误!未定义书签。
基于NIOS的SOPC设计
方茁;彭澄廉;陈泽文
【期刊名称】《计算机工程与设计》
【年(卷),期】2004(025)004
【摘要】SOPC是Altera公司提出的一种灵活、高效的片上系统设计方案.它将处理器、存储器、I/O口等系统设计需要的组件集成到一个PLD器件上,构建成一个可编程的片上系统.NIOS是Altera公司开发的可进行SOPC设计的处理器软核.通过一个实例,详细介绍了如何在Excalibur平台上实现一个基于NIOS的SOPC设计.
【总页数】4页(P504-507)
【作者】方茁;彭澄廉;陈泽文
【作者单位】复旦大学计算机与信息技术系,上海,200433;复旦大学计算机与信息技术系,上海,200433;复旦大学计算机与信息技术系,上海,200433
【正文语种】中文
【中图分类】TP301;TP391.7
【相关文献】
1.基于SOPC的FPGA NiosⅡ嵌入式等精度频率计设计 [J], 井新宇
2.基于SOPC和Nios Ⅱ的一种数码相框设计 [J], 张雷;王紫婷;王忠峰
3.基于SoPC和NIOSⅡ的SD卡文件系统的设计 [J], 陈侠;李开航
4.基于Nios Ⅱ的 SOPC 实验教学平台设计 [J], 陈晓静;吴爱平
5.基于NiosⅡ的液晶屏控制器SOPC设计 [J], 宋跃;卢俊平;雷瑞庭;陈卫;程博
因版权原因,仅展示原文概要,查看原文内容请购买。
安康学院电子技术课程设计报告书课题名称:嵌入式电子相框姓名:学号:院系:电子与信息工程系专业:指导教师:时间:设计项目成绩评定表一、设计任务及要求:1、设计任务:设计一个显示动态显示图片的嵌入式系统。
2、要求:1、在Linux 环境下搭建系统平台。
2、实现多张图片的动态显示。
3、通过修改代码获得不同的图片显示效果。
4、搭建虚拟机,安装linux 系统。
指导教师签名:年月日二、指导教师评语:指导教师签名:年月日三、成绩评定:指导教师签名:年月日四、系部意见:系部盖章:年月日嵌入式电子相框一、设计目的1、熟悉Linux 开发环境。
2、掌握用C语言编写图片动态显示模块代码。
3、掌握linux环境下,图像显示的基本原理,硬件显示的驱动和内存的关系。
4、学会在linux 下的常用命令。
5、熟悉Linux开发流程。
二、设计思路1、搭建linux 环境,利用Vmware 工具,在Window 操作系统下安装虚拟机,在虚拟机下新建linux Ubuntu 系统环境。
2、在Linux环境下,编写图像显示的可执行代码,已用Linux 本身环境下自带的驱动和内存可执行程序,编写可执行代码,将图像像素点写入Linux显示的缓存及内存,使其显示。
3、程序模块中,实现将图像数据做成一个个像素点,写入显示内存。
三、设计过程3.1、系统方案论证先将图片写入编写的可执行文件jpeg-8中,将内存显示路径指向文件jpeg-8文件包中,显示时,先调用用缓存framebuffer ,进而调用文件jpeg-8获得图像显示。
3.2、模块电路设计利用framebuffer 文件将图像像素点写入:Linux是工作在保护模式下,所以用户态进程是无法象DOS那样使用显卡BIOS里提供的中断调用来实现直接写屏,Linux抽象出FrameBuffer 这个设备来供用户态进程实现直接写屏。
Framebuffer机制模仿显卡的功能,将显卡硬件结构抽象掉,可以通过Framebuffer的读写直接对显存进行操作。
用户可以将Framebuffer看成是显示内存的一个映像,将其映射到进程地址空间之后,就可以直接进行读写操作,而写操作可以立即反应在屏幕上。
这种操作是抽象的,统一的。
用户不必关心物理显存的位置、换页机制等等具体细节,这些都是由Framebuffer设备驱动来完成的。
从用户的角度来看,Framebuffer设备与其它设备并没有什么不同。
Framebuffer设备位于/dev下,通常设备名为fb*,这里*的取值从0到31。
对于常见的计算机系统而言,32个Framebuffer设备已经绰绰有余了,最常用到的Framebuffer设备是/dev/fb0。
通常,使用Framebuffer的程序通过环境变量FRAMEBUFFER来取得要使用的Framebuffer设备,环境变量FRAMEBUFFER 通常被设置为”/dev/fb0”。
从程序员的角度来看,Framebuffer设备其实就是一个文件而已,可以像对待普通文件那样读写Framebuffer设备文件,可以通过mmap()将其映射到内存中,也可以通过ioctl()读取或者设置其参数,等等。
最常见的用法是将Framebuffer设备通过mmap()映射到内存中,这样可以大大提高IO效率。
执行显示C的顶层调用模块:主函数main.c#include <sys/mman.h>#include <stdio.h>#include <stdlib.h>#include "common.h"/* main function */int main(int argc, char *argv[]){if (argc < 6)argv[1] = "test.jpg";argv[2] = "test1.jpg";argv[3] = "test2.jpg";argv[4] = "test3.jpg";argv[5] = "test4.jpg";//argv[2] = "test1.jpg";fb_info fb_inf;if (init_fb(&fb_inf) < 0){fprintf(stderr, "Error initial framebuffer\n");return 1;}while(1){switch(rand()%5){case 0:display_jpeg(argv[1], fb_inf);break;case 1:display_jpeg(argv[2], fb_inf);break;case 2:display_jpeg(argv[3], fb_inf);break;case 3:display_jpeg(argv[4], fb_inf);break;case 4:display_jpeg(argv[5], fb_inf);break;}}#if 1if (init_ft("mao.ttf", 0) != 0){fprintf(stderr, "Error i-nitial font\n");return 1;}display_string("显示文字", 32, 400, fb_inf, 0xFF0000); #endif/* Test mouse */// test_mouse(fb_inf);munmap(fb_inf.fbmem, fb_inf.w * fb_inf.h * fb_inf.bpp / 8);return 0;}图像动态显示模块:disp-jepg.c#include <stdlib.h>#include <stdio.h>#include <unistd.h>#include <fcntl.h>#include <sys/mman.h>#include <math.h>#include <sys/stat.h>#include <string.h>#include "common.h"#define DEBUG 0#if DEBUG#endifint display_jpeg(char *filename, fb_info fb_inf){fb_info jpeg_inf;u8_t *buf24 = decode_jpeg(filename, &jpeg_inf);u8_t * scale_buf = scale24(buf24, fb_inf, jpeg_inf);u32_t *buf32 = rgb24to32(scale_buf, fb_inf);int i,R,r, j,k,m,n,t;switch(rand()%5){case 0:R=sqrt(fb_inf.w*fb_inf.w/4+fb_inf.h*fb_inf.h/4) ;for(r=fb_inf.w;r>0;r-=20){for (j = 0; j < fb_inf.h; ++j){for(i = 0; i < fb_inf.w; ++i){if(fabs(j-fb_inf.h/2)+fabs(i-fb_inf.w/2)>=r) fb_pixel(fb_inf, i, j, buf32[i + j * fb_inf.w]);}}usleep(5000);}break;case 1:R=sqrt(fb_inf.w*fb_inf.w/4+fb_inf.h*fb_inf.h/4) ;for(r=0;r<fb_inf.w;r+=20){for (j = 0; j < fb_inf.h; ++j){for(i = 0; i < fb_inf.w; ++i){if(fabs(j-fb_inf.h/2)+fabs(i-fb_inf.w/2)<=r) fb_pixel(fb_inf, i, j, buf32[i + j * fb_inf.w]);}}usleep(5000);}break;case 2:for(j = 0; j < fb_inf.h; ++j){for(k=0;k<20;k++)for (i = 0; i <=fb_inf.w/20; ++i){m=2*fb_inf.w*k/20+i;n=fb_inf.w*(2*k+1)/20+i;fb_pixel(fb_inf, m, j, buf32[m + j * fb_inf.w]);fb_pixel(fb_inf, n, fb_inf.h-j-1, buf32[n + (fb_inf.h-j-1)* fb_inf.w]);}usleep(5000);}break;case 3:j=0;for(i = 0; i < fb_inf.w/20; ++i){for(t=0;t<10;t++)for (j = 0; j < fb_inf.h/20; ++j){for(k=0;k<10;k++){ m=(2*k+1)*fb_inf.w/20+i;n=2*fb_inf.h*t/20+j;fb_pixel(fb_inf, m,n, buf32[m + n * fb_inf.w]);m=2*k*fb_inf.w/20+i;n=(2*t+1)*fb_inf.h/20+j;//n=2*fb_inf.h*t/20+j;fb_pixel(fb_inf, m,n, buf32[m + n * fb_inf.w]);}}usleep(5000);}break;case 4:j=0;for(i = fb_inf.w/20-1; i >=0 ; i--){for(t=0;t<10;t++)for (j = 0; j < fb_inf.h/20; ++j){for(k=0;k<10;k++){ n=(2*t+1)*fb_inf.h/20+j;m=(2*k+1)*fb_inf.w/20+i;//m=2*fb_inf.w*k/20+i;fb_pixel(fb_inf, m,n, buf32[m + n * fb_inf.w]);m=2*fb_inf.w*k/20+i;// m=(2*k+1)*fb_inf.w/20+i;n=2*t*fb_inf.h/20+j;fb_pixel(fb_inf, m,n, buf32[m + n * fb_inf.w]);}}usleep(5000);}break;free(buf24);free(scale_buf);free(buf32);return 0;}画一个点的程序,在类Unix系统中,一切东西都是文件。