用中断方式实现监控机串口通信

来源 :微计算机应用 | 被引量 : 0次 | 上传用户:guocheng2244
下载到本地 , 更方便阅读
声明 : 本文档内容版权归属内容提供方 , 如果您对本文有版权争议 , 可与客服联系进行内容授权或下架
论文部分内容阅读
在计算机系统中,CPU响应外设有三种方法:①查询法:CPU不停地扫描外设,看相应标识位有没有置位,如果有则表明外设已经发送了数据,等待CPU处理。查询法需将进程置于死等状态,会耗费大量CPU资源,仅适合于功能单一,任务量不大的系统。②中断法:当外设发送完数据后产生中断,通知CPU来读取数据。这种方法的效率明显高于查询法,但每次中断CPU都要进行保存断点和恢复断点的操作,如果外设发送数据的间隔小于这一时间,就会造成数据丢失。中断法适合外设通信不太频繁,软件功能较多的情况。③ In the computer system, the CPU responds to peripherals in three ways: ① query method: CPU constantly scan peripherals to see if the corresponding flag bit is set, if there is that the peripheral has sent the data, waiting for CPU processing. Query method needs to put the process in the dead state, will spend a lot of CPU resources, only suitable for a single function, the task is not a small amount of system. ② interrupt method: When the peripheral sends an interrupt after the completion of the data to inform the CPU to read the data. The efficiency of this method is significantly higher than the query method, but each interrupt CPU to save the breakpoint and restore the breakpoint operation, peripherals send data less than the interval, it will result in data loss. Interrupt method suitable for peripheral communication is not frequent, more software features. ③
其他文献
电力企业营销需要在不断变化的电力市场中,以电力客户的需求为中心,在发掘并寻求满足客户需求最佳方案的同时,追求电力企业效益的最大化。电力企业具体的市场营销和服务策略,有以下几点。  一、市场导向型价格体系  电力资源是电力企业为客户所提供的服务的核心,只有提供高效灵活的核心服务,才能满足电力用户的多种需求。以英国和德国为例,在市场完全开放的条件下,客户选择供电公司的因素是多种多样的,其中的价格因素在
移植物抗宿主病(GVHD)是异基因造血干细胞移植(allo-HSCT)后患者死亡的主要原因之一.供、受者人类白细胞抗原(HLA)-A、-B、-Cw、-DRB1、-DQB15个位点高分辨结果完全匹配时,Ⅲ~Ⅳ度急性GVHD(aGVHD)的发病率仍为30%;而当供、受者HLA位点及MHCⅠ类分子相关蛋白A(MHCclass Ⅰ-related chain A, MICA)位点均匹配时,患者的生存率明显
期刊
We report the carboxylated C60 improved the survival and quality of boar sperm during liquid storage at 4 ℃ and thus propose the use of carboxylated C60 as a n
膀胱癌的发生与癌基因的激活与抑癌基因的失活有关.B细胞特异性莫洛尼白血病病毒插入位点1(Bmi-1)基因过度表达可引起细胞的转化和肿瘤的形成[1].我们通过检测膀胱癌组织和癌旁组织中Bmi-1、p16INK4a和p14ARF基因表达情况,探讨Bmi-1表达与膀胱癌临床分期和病理分级的关系及其与p16INK4a和p14ARF的关系。
1 “十五”市场形势评估在编制“十五”行业发展规划时 ,不少人认为 ,由于城乡电网改造结束 ,配电设备市场会有一个大低谷 ,市场容量会有一段萎缩期。这个观点现在需要修正
The development of efficient earth-abundant electrocatalysts for oxygen reduction,oxygen evolution,and hydrogen evolution reactions (ORR,OER,and HER) is importa
In this study,coral-like yolk-shell-structured NiO/C composite microspheres (denoted as CYS-NiO/C) were prepared using spray pyrolysis.The unique yolk-shell str
An in situ coupling strategy to prepare Co9S8/S and N dual-doped graphene composite (Co9S8/NSG) has been proposed.The key point of this strategy is the function
【摘 要】本文对电力工程造价管理存在的问题进行了详细的分析,并提出了提高电力施工企业工程造价管理质量的对策。  【关键词】工程 造价管理 存在问题 对策  一、电力施工企业工程造价管理中存在的问题  工程造价管理的关键是合理确定和有效控制造价,目前中国电力施工企业的工程造价管理存在如下问题。  (一)不重视投标阶段的工程造价管理,在制定投标战略时定位不准,不能准确把握造价的合理性,恶性竞标,或为追
Lithium-ion batteries (LIBs),which are high-energy-density and low-safety-risk secondary batteries,are underpinned to the rise in electrochemical energy storage