1、摘要 摘 要 在当今社会飞速发展的格局下,越来越多的流水线上的产品和各种商业场合 的人员需要进行计数.基于单片机构成的计数器有直观和计数精确等优点,目前已 在各种行业中普遍使用。 计数器是一个用以实现计数功能的时序部件,它不仅可用来计数,还常用作 数字系统的定时、分频和执行数字运算以及其它特定的逻辑功能。 单片机体积小,功耗小,价格低,用途灵活,无处不在,属专用计算机。是 一种特殊器件,需经过专门学习方能掌握应用,应用中要设计专用的硬件和软件。 单片机在计数器领域的应用也十分广泛,计数器种类很多,根据构成计数器中各触 发器的时钟脉冲引入方式,可分为同步计数器和异步计数器。根据计数制的不同, 可
2、分为二进制计数器和非二进制计数器。根据计数的增减趋势,又分为加法、减 法和可逆计数器,还有可预置数和可编程序功能计数器等等。数字式电子计数器 有多种计数触发方式,它是由实际使用条件和环境决定的。有采用机械方式的接 触式触发的,有采用电子传感器这类非接触式触发的。本文所设计的计数器是接 触式触发。 关键字: 计数器 单片机 价格廉 功耗小 触发器 ABSTRACT ABSTRACTABSTRACT In todays society under the pattern of rapid development, more and more on the lines of products and
3、 various business settings need to automatically count. MCU-based products pose a direct and automatic counters have the advantage of accurate count, is already in the Species commonly used in industry. To counter is a function of the temporal component count, it not only can be used to count, also
4、used as digital system, frequency and execution timing digital computing, and other special logic function. Application of microcomputer in the counter is very extensive, counter is a lot of more phyletic, the rootAccording to the composition of each counter flip-flop clock pulse, can be divided into synchronous counterImplement and asynchronous counter. According to the different numeration system, and can be divided into binary counterBinary counter. According to the trend of increase, and d