《基于ARM的指纹识别门禁系统设计.doc》由会员分享,可在线阅读,更多相关《基于ARM的指纹识别门禁系统设计.doc(48页珍藏版)》请在taowenge.com淘文阁网|工程机械CAD图纸|机械工程制图|CAD装配图下载|SolidWorks_CaTia_CAD_UG_PROE_设计图分享下载上搜索。
1、课程设计任务书学生姓名: 廖年强 专业班级: 06自动化 指导教师: 谢川 工作单位: 重庆工商大学 计信学院 题 目: 基于ARM指纹识别门禁系统设计 已知技术参数与设计要求:1、 硬件主要选择基于Xscale内核PXA255处理器;2、 传感器为美国豪威公司CMOS图像传感器FPS200;3、 设计系统硬件与软件部分;4、 硬件包括指纹识别模块、数据处理模块等;5、 软件部分包括系统初始化, 指纹处理识别, 电控锁控制部分等;6、 以小组为单位完成本任务,每个小组最多5人;要求完成主要任务: (包括课程设计工作量及其技术要求,以及说明书撰写等具体要求)1、 完成元器件选型,设计硬件电路,并
2、提供protel电路图;2、 设计中给出最小系统电路图扩展相应电路,并根据要求最终形成一个完整电路图,并完成所有源代码;3、 每个组员完成不少于3000字课程设计报告且报告内容不同。4、 课题指标从学生实际出发,难易适中,经过努力都能够完成任务,并有所收获。时间安排:20092010学年第一学期1718周指导教师签名: 年 月 日教研室主任签名: 年 月 日重庆工商大学课程设计成绩评定表学院:计信学院 班级:06自动化2班 学生姓名:廖年强 学号:2006003921 项目分值优秀(100x90良好(90x80中等(80x70及格(70x60不及格(xflag = 1;void fps_get
3、_image(voidint i = 0;int j = 0;FPS_INDEX = FPS_CTRLA;FPS_DATA = FPS_CTRLA_GETIMG;for(i=0; i300; i+ FPS_INDEX = FPS_CTRLB;while(!(FPS_CTRLB_RDY&FPS_DATAudelay(1;for(j=0; jdata+i*256+j=FPS_DATA;int fps200_open(struct inode *inode, struct file *filpMOD_INC_USE_COUNT;return(0;int fps200_release(struct i
4、node *inode, struct file *filpMOD_DEC_USE_COUNT;return(0;int fps200_ioctl(struct inode *inode, struct file *filp,unsigned int cmd, unsigned long argint err = 0;int ret = 0;unsigned char tmp;if(_IOC_TYPE(cmd != FPS200_IOC_MAGICreturn -ENOTTY;if(_IOC_NR(cmd FPS200_IOC_MAXNRreturn -ENOTTY;if (_IOC_DIR(
5、cmd & _IOC_READerr = verify_area(VERIFY_WRITE, (void *arg,_IOC_SIZE(cmd;else if (_IOC_DIR(cmd & _IOC_WRITEerr = verify_area(VERIFY_READ, (void *arg,_IOC_SIZE(cmd;if (errreturn err;switch(cmdcase FPS200_IOCSDTR:ret = _get_user(tmp, (unsigned char *arg;if(tmp 0x7ftmp = 0x7f;FPS_INDEX = FPS_DTR;FPS_DAT
6、A = tmp;break;case FPS200_IOCSDCR:ret = _get_user(tmp, (unsigned char *arg;if(tmp 0x1ftmp = 0x1f;FPS_INDEX = FPS_DCR;FPS_DATA = tmp;break;case FPS200_IOCSPGC:ret = _get_user(tmp, (unsigned char *arg;if(tmp 0x0ftmp = 0x0f;FPS_INDEX = FPS_PGC;FPS_DATA = tmp;break;case FPS200_IOCGDTR:FPS_INDEX = FPS_DT
7、R;tmp = FPS_DATA;ret = _put_user(tmp, (unsigned char *arg;break;case FPS200_IOCGDCR:FPS_INDEX = FPS_DCR;tmp = FPS_DATA;ret = _put_user(tmp, (unsigned char *arg;break;case FPS200_IOCGPGC:FPS_INDEX = FPS_PGC;tmp = FPS_DATA;ret = _put_user(tmp, (unsigned char *arg;break;case FPS200_IOCEINT:enable_irq(F
8、PS200_IRQ;break;case FPS200_IOCDINT:disable_irq(FPS200_IRQ;break;case FPS200_IOCFCAP:fps_get_image(;case FPS200_IOCGDATA:copy_to_user(void *arg, fps200_device-data,FPS200_DATASIZE;ret = 0;fps200_device-flag = 0;break;case FPS200_IOCCLR:memset(fps200_device-data, 0, FPS200_DATASIZE;fps200_device-flag
9、 = 0;break;case FPS200_IOCCINT:if(clps_readw(INTSR1&0x40 = 0udelay(100;if(clps_readw(INTSR1&0x40 = 0ret = _put_user(0x01, (unsigned char *arg;elseret = _put_user(0x0, (unsigned char *arg;elseret = _put_user(0x0, (unsigned char *arg;break;case FPS200_IOCCRDY:ret = _put_user(fps200_device-flag, (unsig
10、ned char*arg;break;default:return -ENOTTY;return ret;static int _init fps200_init_module(voidint result;char tmp;if(result = check_region (FPS200_VR,2printk ( cant get I/O port address n;return (result;if (!request_region (FPS200_VR,2,fps200return -EBUSY;SET_MODULE_OWNER(&fps200_fops;result = regist
11、er_chrdev(fps200_major, fps200,&fps200_fops;if(result 0printk(fps200: cant get major %dn,fps200_major;return result;if(fps200_major = 0fps200_major = result; /* dynamic */* read chip id first, if not equal 0x20xx, print error*/FPS_INDEX = FPS_CIDH;tmp = FPS_DATA;if(tmp != 0x20printk(wrong chip ID, i
12、nsmod fail.n;return -EIO;/* row auto inc. inner 12MHz vibrator. no low-power state*/void main(voidBYTE temp;WORD port = 1001;LocalMACAddr0=0x52;LocalMACAddr1=0x54;LocalMACAddr2=0x4c;LocalMACAddr3=0x30;LocalMACAddr4=0x2e;LocalMACAddr5=0x2f;LocalIPAddress = 0xc0a8020d;/* 本地地址192.168.2.14*/ServerIPAddr
13、ess = 0xc0a8020e;/* 目地址192.168.2.13*/*初始化 */SerialInitial(;MemInitial(;NetInInitial(;RTLInitial(;Start8019(;InterruptInitial(;/ 建立一个ARP包p0 =0xff;p1 =0xff;p2 =0xff;p3 = 0xff;p4 = 0xff;p5 = 0xff;p6 = 0x52;p7 =0x54;p8 =0x4c;p9 =0x30;p10 =0x2e;p11 =0x2f;p12 = 0x08;p13 = 0x06;p14 = 0x00;p15 = 0x01;p16 =
14、0x08;p17 = 0x00;p18 = 0x06;p19 = 0x04;p20 = 0x00;p21 = 0x01;/ 发送ARP包RTLSendPacket(p,60;while(1;#ifdef DEBUGprintf(n-bigine-;#endif/* 处理 */TCPBind(port;if(TCPConnect(ServerIPAddress,1001 = TRUEwhile(UserFunc(;/* 延时 */for(temp;temp255;temp+;#ifdef DEBUGprintf(n run over!;#endif/* 存储 */Stop8019(;while(1;第 48 页