摘要
针对新一代高性能单时钟/机器周期的STC12C系列单片机由于执行速度远高于传统的51单片机而不能直接使用原有单片机程序的问题,采用Keil软件的性能分析器来计算Atmel单片机的执行时间;通过手工计算修改程序段的执行时间,使STC12C系列单片机的执行时间满足数字温度传感器DS18B20的时序要求。测试结果表明STC12C2052能正确读取DS18B20的温度转换值,此方法对于具有时序要求的可编程器件的使用具有一定的参考价值。
The new generation high-performance one-clock period per machine cycle architecture STC12C series Single- chip computers can run several times faster than traditional 8051 family. So the programs for original 51 single-chip computer can not be used in STC12C series directly. The performance analyzer in Keil software is used to calculate the execution time of Atmel single-chip computers. By manual computing the execution time of programs for both Atmel and STC12C series, programs are modified to meet the time sequence needs of digital temperature sensor DS18B20. The test shows that the single-chip computer STC12C2052 can read the temperature values of DS18B20. The method plays a significant role for the use of a programmable device which has the time sequence requirements.
出处
《国外电子测量技术》
2009年第1期23-26,共4页
Foreign Electronic Measurement Technology
基金
云南省教育厅科学研究基金(08C0280)资助项目