摘要
介绍了用C51编程时的一些常用优化方法,同时提出了用C51开发I2C总线和SPI总线等串行总线的优化方案,并给出了优化后的数据传输源程序,该方案在Keil仿真器上验证并通过。结果表明该优化方案不但缩短了机器代码的长度,而且提高了代码的运行速度,使代码的执行效率与汇编语言相当,同时也为其它常用串行总线的高级语言开发提供了可行的优化方案。
This paper introduces some methods for optimizing using C51 program, offers an optimizing plan to take C51 as scrial bus such as I^2C bus and SPI Bus, presents the original commonly applied when an approach to exploit program after optimization. The result shows that this optimizing plan shortens the length of the codes, and raises their running speed. Besides, their executive efficiency can match that of the assemble language. In the meanwhile it offers a feasible optimizing plan to exploit the advanced language of other commonly scrial bus.
出处
《电测与仪表》
北大核心
2005年第11期60-62,共3页
Electrical Measurement & Instrumentation