PSHLY-B回路电阻测试仪介绍
上传时间: 2013-11-05
上传用户:木子叶1
假定从8位AD中读取数据(如果是更高位的AD可定义数据类型为int),子程序为get_ad(); 1、限幅滤波法(又称程序判断滤波法) A、方法: 根据经验判断,确定两次采样允许的最大偏差值(设为A) 每次检测到新值时判断: 如果本次值与上次值之差<=A,则本次值有效 如果本次值与上次值之差>A,则本次值无效,放弃本次值,用上次值代替本次值 B、优点: 能有效克服因偶然因素引起的脉冲干扰 C、缺点 无法抑制那种周期性的干扰 平滑度差 /* A值可根据实际情况调整 value为有效值,new_value为当前采样值 滤波程序返回有效的实际值 */ #define A 10 char value; char filter() { char new_value; new_value = get_ad(); if ( ( new_value - value > A ) || ( value - new_value > A ) return value; return new_value; } 2、中位值滤波法 A、方法: 连续采样N次(N取奇数) 把N次采样值按大小排列 取中间值为本次有效值 B、优点: 能有效克服因偶然因素引起的波动干扰 对温度、液位的变化缓慢的被测参数有良好的滤波效果 C、缺点: 对流量、速度等快速变化的参数不宜 /* N值可根据实际情况调整 排序采用冒泡法*/
上传时间: 2014-12-26
上传用户:nanshan
针对目前使用的RS232接口数字化B超键盘存在PC主机启动时不能设置BIOS,提出一种PS2键盘的设计方法。基于W78E052D单片机,采用8通道串行A/D转换器设计了8个TGC电位器信息采集电路,电位器位置信息以键盘扫描码序列形式发送,正交编码器信号通过XC9536XL转换为单片机可接收的中断信号,软件接收到中断信息后等效处理成按键。结果表明,在满足开机可设置BIOS同时,又可实现超声特有功能,不需要专门设计驱动程序,接口简单,成本低。 Abstract: Aiming at the problem of the digital ultrasonic diagnostic imaging system keyboard with RS232 interface currently used couldn?蒺t set the BIOS when the PC boot, this paper proposed a design method of PS2 keyboards. Based on W78E052D microcontroller,designed eight TGC potentiometers information acquisition circuit with 8-channel serial A/D converter, potentiometer position information sent out with keyboard scan code sequentially.The control circuit based on XC9536 CPLD is used for converting the mechanical actions of the encoders into the signals that can be identified by the MCU, software received interrupt information and equivalently treatmented as key. The results show that the BIOS can be set to meet the boot, ultrasound specific functionality can be achieved at the same time, it does not require specially designed driver,the interface is simple and low cost.
上传时间: 2013-10-10
上传用户:asdfasdfd
一个简单好用的B+树算法实现
上传时间: 2015-01-04
上传用户:缥缈
一个用Basic实现的B-Tree算法
上传时间: 2013-12-30
上传用户:ccclll
一个用Java applet实现的B-Tree算法
上传时间: 2013-12-25
上传用户:qiao8960
用C++实现的B-Tree算法
上传时间: 2014-01-20
上传用户:jiahao131
用Borland C写的B-Tree算法
上传时间: 2014-12-05
上传用户:xzt
快速排序程序
上传时间: 2015-01-04
上传用户:lacsx
链表的快速排序法
标签: 快速排序
上传时间: 2015-01-04
上传用户:363186