1、基于单片机的数字钟设计基于单片机的数字钟设计 The design of digital clock based on signal-chip computer 摘摘 要要 基于单片机的定时和控制装置在许多行业有着广泛的应用,而数字钟是其中 最基本的,也是最具有代表性的一个例子。 在基于单片机系统的数字钟电路中,除了基本的单片机系统和外围电路外, 还需要外部的控制和显示装置。本电路主要以单片机 AT89S52 为核心而设计的, 通过单片机对信息的分析与处理,控制外围设备。系统由复位模块、时钟模块、 温度模块、音乐模块、光识模块及显示模块共六个模块组成,后来在时钟模块的 基础上又加载了日历、星期
2、的模块。 本设计以单片机 AT89S52 为切入点,通过使用 AT89S52 的内部的可编程定时 器/计数器, 结合对外接晶振的调节来确定一个合适的振荡周期, 从而确定出内部 的机器周期。再通过对内部中断程序的设置来设计出时钟程序,即设计出了电子 时钟的核心。然后在核心电路的基础上设计出了相应的扩展电路,使本设计更加 实用。 关键词关键词:单片机;数码显示;温度传感器 ABSTRACT The timer equipment using micro controller unit is applied in many trades, the digital clock is the most
3、fundamental example among them, and it is also a most typical example. In digital clock circuit based micro controller unit system, there are the external controlling and display device besides the fundamental monolithic machine system and the outer-ring circuit. The key of the circuit in this desig
4、n is AT89S52, using the micro control system to process information to control the outer-ring circuit. The system is made up of circuit, clock circuit, music circuit, temperature circuit, and shine circuit. Date and week modul is the external part. This design focuses on monolithic integrated circuit AT89S52. Using AT89S52, which has the interior programmable timer/counter, the union foreign meets the crystal oscillator the adjustment to determine an appropriate duration of oscillation, thus de