摘要
在单片机MCS-51的开发运用中,通常要使用各种中断。如中断服务程序执行时间过长,当有另外的中断发生时,单片机就不能及时地进行处理,特别是对MCS-51这样的只有两级中断优先级的单片机更是这样。借鉴windows编程的原理,在单片机编程中引入消息的概念,将中断产生的标志作为消息,而数据处理则放在消息循环中进行,这样一方面减少了中断服务程序的长度,提高了响应中断的速度;另一方面又不影响数据的处理。
In the development and utilization of singlechip(SCM)MCS-51 various interrupts will usually be used .If the execution time of interrupt service program is too long, then when there is other interrupt taking place,SCM can not handle it timely,it is true especially for MCS-S1 that has only two levels of interrupt priority. Refering to the principle of Windows programming, We introduce the concept of message into SCM programming,and take the sign produced by interrupt as message,then data processing will be carried out within the message cycle.In this way,on one hand,the duration of the execution of interrupt service programes can be shortened, and the response speed of interrupt is increased.On the other hand,the datar processing is not affected.
出处
《广西大学梧州分校学报》
2005年第1期83-84,共2页
Journal of Guangxi University Wuzhou Branch
关键词
汽车故障诊断仪
故障码
消息
Computer Tool for Vehicle Trouble Diagnosis
Trouble Code
Message