论文部分内容阅读
在微机系统应用中,定时、计数是其最基本的功能。本文首先介绍了用单片机8031的定时器/计数器T0做时间计量过程中消除软件误差的方法。该方法使时钟中断从最高中断降为普通中断,并可暂缓时钟中断响应而不影响计时精度。此外还介绍了用定时器/计数器8253做计数器时的一组软件及其设计思路,用此软件可省去8253做计数器时的外围电路,速度轻快。此外本文还对8253读数不准、高低字节自翻转、串联、飞读等问题的解决作了说明。
In computer system applications, timing, counting is its most basic function. This article first describes the use of 8031 timer / counter T0 to do time measurement process to eliminate software errors. This method reduces the clock interrupt from the highest interrupt to a normal interrupt, and suspends the clock interrupt response without affecting the timing accuracy. In addition, it also introduces a set of software and its design ideas when using the timer / counter 8253 as a counter. By using this software, it is possible to save the peripheral circuits of the 8253 when doing the counter, and the speed is light and fast. In addition, this article also 8253 inaccurate readings, high and low bytes from the flip, series, flying reading and other issues addressed.