Location:
Search - IO多路复用
Search list
Description: 这是一个完整的项目文件,程序我已经全部调试完毕,现将软硬件资料全部上传,供大家参考学习。里面包含了M16的AD、EEPROM、定时器、中断、看门狗等内部资源的使用,以及菜单程序、浮点数的存放与取出和显示、液晶显示、数字滤波、按键复用等内容。项目硬件比较简单,AD0、AD1读取两路4-20ma电流信号(由RCV420转换成0-5V的电压信号),AD2读取电压信号
该系统主要完成这样一个工作,从AD0读出温度、AD1读取差压,由这两个值根据一个公式计算出流量并显示,AD2读出全压并显示。系统有4个按键,分别接在4个IO口上,这是个按键是 “设置/退出”、“向上/加1”、“向下/右移”、“确认/保存”,这些按键用于设置3路模拟量的上下限值和其他的一些系统参数。整个系统不算复杂,但程序稍微繁琐,调试较费时。PCB绘制好,正准备制版,等焊好了再发上来吧
因为赶时间,并且项目对运行时间无要求,程序中使用了较多的浮点数,导致HEX文件较大。菜单程序使用了全局变量screen_status来记录菜单的状态。
对于AD值的处理,我使用了一种自己摸索出来的滤波方法,对于AD值在正负2以内的跳动非常有效。具体如下实现:用一个全局变量last_ad来存放上一次AD转换的值,每次显示AD值时都要拿本次的AD值与last_ad做比较,若比last_ad大1,则本次值减1,大2则减2,依此类推,并把处理之后的AD值放入last_ad中作为下次比较的值。这样就可以滤出正负2以内的跳动(对于这样的跳动,平均值滤波是*为力的,具体原因嘛,自己试验一下便知道了)
使用ATMANAVR4.5编译通过,GCC版本为3.4.1 GCC提供了较为丰富的库函数,这个程序中的AD、浮点、EEPROM等都是使用函数完成的,稍后我会贴一篇专门介绍浮点数应用的文章,敬请关注。
另外我把12864液晶的驱动单独做了一个范例文件,放在另一个帖子里了
注:仅供学习使用,请勿用于其他用途
Platform: |
Size: 303407 |
Author: lh20032008@163.com |
Hits:
Description: IO的多路复用(Select函数) 注:为了解决创建子进程带来的系统资源消耗而采用多路I/O模型 一般来说当我们在向文件读写时,进程有可能读写出阻塞,如果我们不希望阻塞,我们的一个选择是用select系统调用。只要我们设置好select的各个参数那么文件可以读写的时候select通知我们说可以读写,在我们调用select时进程会一直阻塞到以下一种情况发生 1) 有文件可以读 2) 有文件可以写 3) 超过所设置的时间
Platform: |
Size: 30720 |
Author: yjw312yjw@yahoo.com.cn |
Hits:
Description: 飞思卡尔S12 系列单片机系统硬件设计,详细介绍了该单片机的硬件使用,为全中文,MC9S12DG128B 有16路AD 转换,精度最高可设置为10 位;有8 路8 位PWM 并可两两级联为16 位精度PWM,特别适合用于控制多电机系统。它的串行通信端口也非常丰富,有2 路SCI,2 路SPI 此外还有IIC,CAN总线等端口,并且采用了引角复用功能,使得这些功能引角也可设置为普通的IO 端口使用。此外
它内部还集成了完整的模糊逻辑指令,可大大简化我们的程序设计。-Freescale s S12 family of single-chip microcomputer system hardware design, detail the use of single-chip hardware for the whole Chinese, MC9S12DG128B 16 Road AD conversion, the highest precision can be set to 10 are 8 and 8 PWM 22 Alliance for the 16-bit precision PWM, is particularly suitable for controlling multi-motor system. Its serial communication ports are also very rich 2-way SCI, 2 road SPI in addition to IIC, CAN bus, such as ports, and using the primers angle multiplexing function, so that these functions can also be cited angle is set to normal IO port to use. In addition, it also integrates the internal integrity of the fuzzy logic instructions, can greatly simplify the design of our procedures.
Platform: |
Size: 1227776 |
Author: 宁海 |
Hits:
Description: 使用IO多路复用完成聊天室功能,Linux C完成-Multiplexing using the IO completion chat function, Linux C complete. .
Platform: |
Size: 73728 |
Author: 杨少宁 |
Hits:
Description: LINUX下的网络聊天程序,其中利用select函数,实现服务端IO口多路复用-LINUX network chat program, select function IO port multiplexer server
Platform: |
Size: 46080 |
Author: 零度 |
Hits:
Description: 多路IO复用实现的并发服务器程序,在Linux上实现,GCC编译。-IO multiplexing multiple concurrent server program realization, implemented on Linux, GCC compiler.
Platform: |
Size: 3072 |
Author: easy |
Hits:
Description: TCP服务器 IO的多路复用 -TCP Server
Platform: |
Size: 10316800 |
Author: smith |
Hits:
Description: TCP并发服务器,使用IO多路复用来实现,对初学者学习有很大作用-TCP concurrent server, using IO multiplexing to achieve, there is a significant role for beginners to learn
Platform: |
Size: 11264 |
Author: 常秀清 |
Hits:
Description: 利用epoll实现IO多路复用。C/S模型有,客户端循环发送数据,服务器循环接收。-Implementation of IO multiplexer with epoll. C/S model.
Platform: |
Size: 2048 |
Author: 钟志强 |
Hits:
Description: select实现io多路复用,希望对初学网络编程的有帮助.-Select implementation of IO multiplexer,I hope to help beginners network programming
Platform: |
Size: 9216 |
Author: xujian |
Hits:
Description: IO多路复用之epoll总结,客户端和服务器端-IO multiplexing epoll summary, client and server side
Platform: |
Size: 796672 |
Author: jie |
Hits:
Description: io多路复用用于一个服务器端接收多个客户端请求,实现非阻塞数据传输(IO multiplexing is used to receive multiple client requests at one server to achieve non blocking data transmission)
Platform: |
Size: 10240 |
Author: farsight_suifeng
|
Hits:
Description: 该代码在Linux实现了一个类似于windows上的QQ的聊天工具。主要是基于TCP/IP协议的socket通信。包括服务器端和客户端两部分,其中客户端使用了select的IO多路复用技术,服务器端由于要监听多个客户端,因此使用了epoll的IO多路复用技术。整个项目目前可以实现的功能有用户的注册与登录,添加好友,发送聊天消息,发送与接收文件等。(The code implements a chat tool similar to windows on QQ in Linux. Socket communication is mainly based on TCP/IP protocol. Including server and client two parts, in which the client uses the select IO multiplexing technology, the server side to monitor a number of clients, so the use of epoll IO multiplexing technology. The functions of the whole project can be registered and logged by users, add friends, send chat messages, send and receive files, etc..)
Platform: |
Size: 41984 |
Author: 零下10度C
|
Hits:
Description: 基于linux平台的多路IO复用,使用了select和poll来实现(Multiplexing of multiplex IO based on Linux platform)
Platform: |
Size: 1024 |
Author: albertsjc
|
Hits:
Description: 此资源是一个基于TCP以及IO多路复用技术select()的一个简易且可靠的多人聊天室。可运行在windows平台,开发软件为VS2013,具体功能实现为多个client可以连接到一个server,具有较强的抗并发能力,并且可以互相发送文本信息,有掉线、发送、接收等完善的提示功能。代码注释较为完善且是英文。(This resource is a simple and reliable multi - person chat room based on TCP and the IO multiplexing technology select (). It can run on the windows platform,develop software for VS2013, realize specific functions to multiple client can connect to a server, has strong anti concurrent ability, and can send text messages to each other, with perfect reminder function such as dropping, sending and receiving. The code notes are more perfect and English.)
Platform: |
Size: 1466368 |
Author: weifeng727 |
Hits:
Description: epoll是Linux内核为处理大批量文件描述符而作了改进的poll,是Linux下多路复用IO接口select/poll的增强版本,它能显著提高程序在大量并发连接中只有少量活跃的情况下的系统CPU利用率。另一点原因就是获取事件的时候,它无须遍历整个被侦听的描述符集,只要遍历那些被内核IO事件异步唤醒而加入Ready队列的描述符集合就行了。epoll除了提供select/poll那种IO事件的水平触发(Level Triggered)外,还提供了边缘触发(Edge Triggered),这就使得用户空间程序有可能缓存IO状态,减少epoll_wait/epoll_pwait的调用,提高应用程序效率(Epoll is an improved poll for the Linux kernel to handle large batch file descriptors, an enhanced version of the multiplexed IO interface select/poll under Linux, which can significantly improve the application rate of the system CPU in a large number of concurrent connections in a large number of concurrent connections. Another reason is that when an event is obtained, it does not need to traverse the entire set of listener descriptors, just traversing the descriptor sets that are added to the Ready queue asynchronously by the kernel IO event. In addition to providing the level trigger (Level Triggered) of the select/poll IO event (Level Triggered), epoll provides the edge trigger (Edge Triggered), which makes the user space program likely to cache the IO state, reduce the call of the epoll_wait/epoll_pwait, and improve the efficiency of the application)
Platform: |
Size: 299008 |
Author: Q-Q |
Hits: