摘要数字钟是一种用数字电路技术实现日、时、分、秒计时的装置,与传统的机械式时钟相比,具有更高的准确性和直观性,且无机械传动装置,具有更更长的使用寿命,因此得到了广泛的使用。小到人们日常生活中的电子手表,大到车站、码头、机场等公共场所的大型数显电子钟。本课程设计要用通过简单的逻辑芯片实现数字时钟。要点在于用555芯片连接成输出1000秒的多谐振荡器,然后经过74LS90构成的分频器输出1HZ的秒脉冲,用74LS160(10进制计数器)连接成60和24进制的计数器,再通过七段数码管显示,外加上校时电路,整点报时电路即构成了简单数字钟。扩展电路可实现定点报时功能。关键字:多谐振荡器;分频器;计时电路;闹钟电路;校时电路;整点报时电路目录1设计内容及要求·······················································11.1设计目的·························································11.2设计内容和要求················································11.3创新部分·························································12系统总体设计方案····················································12.1数字时钟的组成···············································12.2原理分析·························································12.3基本逻辑功能框图·············································23器件选择································································23.1555集成定时器················································23.274LS160························································33.3LED显示屏·····················································53.44位十进制同步可逆计数器74LS90······················53.54位数值比较器74LS85······································74数字时钟的电路设计·················································84.1时钟振荡电路··················································84.1.1555多谐振荡器产生1KHz··························84.1.2时钟信号发生电路···································94.1.3时钟振荡电路的Multisim仿真·················104.2分频器电路···················································104.3秒脉冲发生器电路···········································124.4分脉冲发生器电路··········································124.5时脉冲发生器电路··········································134.6校时电路······················································144.7整点报时电路················································154.8闹钟功能电路·················································164.9数字时钟总仿真电路图····································185心得体会······························································195.1关于数字时钟的心得体会·································195.2关于收音机的焊接与调试心得体会·····················20参考文献··································································2111设计内容及要求1.1设计目的使学生对电子的一些相关知识有感性认识,加深电类有关课程的理论知识;;掌握电子元件的焊接、电气元件的安装、连线等基本技能,培养学生阅读电气原理图和电子线路图的能力。并在生产实践中,激发学生动手、动脑、勇于创新的积极性,培养学生严谨、认真、踏实、勤奋的学习精神和工作作风,为后续专业课程的学习打下坚实的基础。1.2设计内容和要求(1)稳定的显示时、分、秒。(要求24小时为一个计时周期)(2)当电路发生走时误差时,要求电路有校时功能。(3)电路有整点报时功能。报时声响为四低一高,最后一响高音正好为整点。1.3创新部分(1)闹钟功能2系统总体设计方案2.1数字时钟的组成数字电子钟的电路由秒脉冲发生器、分秒计数器、74LS90(二—五—十进制加法计数器)、74LS85(比较器)、时间译码及控制门,555定时器,七段数码管等构成。2.2原理分析它由多谐振荡器、分频器、计数器、译码器、显示器、报时电路、校时电路和闹钟电路组成。多谐振荡器产生的信号经过分频器作为秒脉冲,秒脉冲送入计数器计数,计数结果通过“时”、“分”、“秒”译码器显示时间。分频器能将多谐振荡器产生的1kHZ的脉冲分为500HZ和1HZ。22.3基本逻辑功能框图图1数字时钟基本逻辑功能框图3器件选择3.1555集成定时器555集成定时器由五个部分组成:1、基本RS触发器:由两个“与非”门组成2、比较器:C1、C2是两个电压比较器3、分压器:阻值均为5千欧的电阻串联起来构成分压器,为比较器C1和C2提供参考电压。4、晶体管开卷和输出缓冲器:晶体管VT构成开关,其状态受Q端控制。输出缓冲器就是接在输出端的反相器G3,其作用是提高定时器的带负载能力和隔离负载对定时器的影响。555芯片内部结构图如下:图2555芯片内部结构图1&&&COTHTR+VCCuOD5kΩ5kΩ5kΩC1C2G1G2G3T++--2658437RQQ3其逻辑功能表如下:表1555定时器功能表其引脚图如下:图3555定时器引脚图逻辑符号如下:图4555逻辑符号图3.274LS16074LS160为十进制同步加法计数器逻辑功能描述如下:由逻辑图与功能表知,在CT74LS160中LD为预置数控制端,D0-D3为数据输入端,C为进位输出端,Rd为异步置零端,Q0-Q3位数据输出端,EP和ET为阈值输入(UI1)触发输入(UI2)复位(RD)输出(U0)放电管VT××00导通2/3VCC1/3VCC11截止2/3VCC1/3VCC10导通2/3VCC1/3VCC1不变不变4工作状态控制端。当Rd=0时所有触发器将同时被置零,而且置零操作不受其他输入端状态的影响。当Rd=1、LD=0时,电路工作在预置数状态。这时门G16-G19的输出始终是1,所以FF0-FF1输入端J、K的状态由D0-D3的状态决定。当RC=LD=1而EP=0、ET=1时,由于这时门G16-G19的输出均为0,亦即FF0-FF3均处在J=K=0的状态,所以CP信号到达时它们保持原来的状态不变。同时C的状态也得到保持。如果ET=0、则EP不论为何状态,计数器的状态也保持不变,但这时进位输出C等于0。当RC=LD=EP=ET=1时,电路工作在计数状态。从电路的0000状态开始连续输入10个计数脉冲时,电路将从1001的状态返回0000的状态,C端从高电平跳变至低电平。利用C端输出的高电平或下降沿作为进位输出信号。逻辑功能表如下:表274LS160逻辑功能表其引脚图如下:图574LS160引脚图CPEPET工作状态×0×××置零10××预置数×1101保持×11×0保持(但C=0)1111计数5逻辑功能示意图如下:图674LS160逻辑功能示意图3.3LED显示屏LED是发光二极管LightEmittingDiode的英文缩写。LED显示屏是由发光二极管排列组成的一显示器件。它采用低电压扫描驱动,具有:耗电少、使用寿命长、成本低、亮度高、故障少、视角大、可视距离远、规格品种全等特点。目前LED显示屏作为新一代的信息传播媒体,已经成为城市信息现代化建设的标志。管脚1234分别接输出段的Q0、Q1Q2、Q3.图形显示如下图所示:图7LED图形显示图3.44位十进制同步可逆计数器74LS9074LS90是异步二—五—十进制加法计数器,它既可以作二进制加法计数器,又可以作五进制和十进制加法计数器。通过不同的连接方式,74LS90可以实现四种不同的逻辑功能;而且还可借助R0(1)、R0(2)对计数器清零,借助S9(1)、S9(2)将计数器置9。其具体功能详述如下:(1)计数脉冲从CP1输入,QA作为输出端,为二进制计数器。(2)计数脉冲从CP2输入,QDQCQB作为输出端,为异步五进制加法计数器。(3)若将CP2和QA相连,计数脉冲由CP1输入,QD、QC、QB、QA作为输出6端,则构成异步8421码十进制加法计数器。(4)若将CP1与QD相连,计数脉冲由CP2输入,QA、QD、QC、QB作为输出端,则构成异步5421码十进制加法计数器。(5)清零、置9功能。异步清零当R0(1)、R0(2)均为“1”;S9(1)、S9(2)中有“0”时,实现异步清零功能,即QDQCQBQA=0000。置9功能当S9(1)、S9(2)均为“1”;R0(1)、R0(2)中有“0”时,实现置9功能,即QDQCQBQA=1001。其功能表如下:表374LS90功能表其引脚图如下:图874LS90引脚图7其逻辑功能示意图:图974LS90逻辑功能示意图3.54位数值比较器74LS85集成74LS85是4位数值比较器可以用来比较两个4位二进制数A(A3A2A1A0)和B(B3B2B1B0)之间的大小。其比较原理如下:两个4位二进制的比较是从A的最高位A3和B的最高位B3开始,自高到低的逐位比较。只有在高位相等时才需要比较低位。若高位不相等,则两个数的比较结果直接由高位比较结果决定。其功能表如下:表474LS85逻辑功能表8其引脚图为:图1074LS85引脚图其逻辑功能示意图为:图1174LS85逻辑功能示意图4数字时钟的电路设计4.1时钟振荡电路4.1.1555多谐振荡器产生1KHz多谐振荡器是一种能够产生矩形波动的自激振荡器,也称矩形波发生器。“多谐”指矩形波中除了基波成分外,还含有丰富的高次谐波成分。多谐振荡器没有稳态,只有两个暂稳态。在工作时,电路的状态在这两个暂稳态之间自动地交替变换,由此产生矩形波脉冲信号,常用作脉冲信号源及时序电路中的时钟信号。因此,在此我们使用555定时器构成的多谐振荡器来产生1KHz的矩形脉冲信号。94.1.2时钟信号发生电路图12555构成的多谐振荡器图13多谐振荡器工作波形图用555定时器构成的多谐振荡器电路如图12所示:图中电容C、电阻R1和R2作为振荡器的定时元件,决定着输出矩形波的正、负脉冲的宽度。定时器的触发器输入端和阀值输入端与电容相连