摘要
Visual C++6.0是Window平台下最为流行的编程工具之一。在测控系统中,PC机与各种嵌入式系统之间的接口控制也通常采用VC6.0完成。然而嵌入式系统通常对时序有较高的要求,Windows系统则并非实时操作系统。因此如何在VC6.0中实现各种不同精度的定时功能就成为许多面向嵌入式系统的VC6.0开发关键环节。文中研究和比较了VC6.0平台下各种定时器的用法和性能。根据试验结果,并针对某实际工程需要,采用时间戳计数器实现了一种微秒级定时器。通过测试,该定时器可以实现微秒级高精度定时,与某嵌入式系统平台配合良好,并通过了设备验收,证明了其设计有效性。
Visual C++ 6.0 ( VC 6.0) is one of the most popular development environments for Windows platform. Therefore, most of in- terface control of measurement &control system between embedded system and PC were also developed via VC6.0. However,since high -precision timing is often necessary for embedded system, and Window operation system (OS) isn't real-time OS. How to design timer to meet different embedded system requirement becomes a vital process for VC 6.0 development. In this paper, all kinds of timer design strategies were introduced and presented, following with their comparison. Finally, according to one project demand, based on CPU time stamp counter technique ,a microsecond-level timer was presented. Whole project has been validated ,therefore this times strategy's effect was also proved.
出处
《计算机技术与发展》
2013年第2期44-48,共5页
Computer Technology and Development
基金
中航科学基金(20110181006)