毕业设计(论文)基于 51 单片机的流水线产品计数器设计班 级: 31001 班 学 号: 202562301051 姓 名: 唐树春 专 业: 应用电子技术 指导老师: 周晓红老师 二零一二年六月十日摘 要本系统采纳的是以单片机 STC89c52 为核心的光电计数器。其工作原理是采纳单片机的外部中断 0 来进行计数,数据采集部分采纳反射式光电传感器,将红外发光管与光电接收管相邻安放,每当物体通过一次,红外光就被物体反射,光电接收管接收一次,光电接收管的输出电压就产生一个变化,这个变化的电压信号通过放大和处理后,形成计数脉冲,输入至 STC89c52 单片机的 P3.2 口,通过软件控制和硬件控制并用 LED 加以显示,便可实现对物体的计数统计。本计数器可将机械或人工计数方式变为电子计数,并且采纳 LED 数码管显示,可适用于诸多行业,以满足现代生产、生活方式的需求。所谓的光电式传感器是将光信号转化为电信号的一种传感器。光电式传感器是以光电器件作为转换组件的传感器,光电检测方法具有精度高、应用快、非接触等优点,而可测参数多,光电传感器的结构简单,形式灵活多变因此,光电式传感器在检测和控制中应用非常广泛。关键词:计数器;光电传感器;单片机;LED 数码管AbstractThis system USES is with STC89c52 single chip microcomputer as the core of the photoelectric counter. The working principle of adopting SCM external interruption 0 to count, the data acquisition of the reflecting photoelectric sensor, the infrared light tube and photoelectric receiving tube adjacent put, whenever the object through a, infrared light is object reflective, photoelectric tube receiving a receiving, photoelectric receiving tube is the output voltage of produce a change, the changes of the voltage signal through the amplifier and processing, form count pulse, the input to STC89c52 SCM P3.2 mouth, through the control software and hardware control and that LED to, can realize the object counting statistics. This counter can or mechanical artificial count way into electronic counted, and using LED digital display tube, can be ...