基于单片机的液晶屏显示的电子时钟设计
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
基于单片机的液晶屏显示的电子时钟设计
摘要
本设计是利用基于AT89C52单片机用液晶显示器制作的实用液晶电子钟,可完成计时、计分、计秒和校时、校分的功能。微处理器是单片机的核心,完成运算和控制的操作串行口数据存储器与复位电路,时钟电路,校对电路由微处理器控制完成各自的任务。最后通过液晶显示时、分、秒。在振荡器正在运行时,复位是靠RST或在RST引脚上施加持续2个机器周期的高电平来实现,在RST引脚上施加高电平的第2个周期执行内部复位,以后每个周期执行一次,直到RST 变化。复位时,ALE和/RSEN输出高电平,机ALE=1和/RSEN=1,片内RAM不受复位的影响,复位后PC指向0000H使单片机从起始地址0000H开始执行程序。设计中采用内部时钟方式,在XTAL1和XTAL2两端接晶振,与内部反向器构成稳定的自激振荡器,其发出的时钟脉冲直接送入片内定时控制部件,该液晶电子钟最后由6个液晶显示管显示,时分秒段式LCD显示采用七段显示,其结构除在上电极板上喷上a到g这七个笔画外,还在下电极板喷上与笔画相对应的“日”字形的电极并接公共端COM。另外时钟的校对采用与校对普通电子表相同的操作方式来完成,只需按K1、K2这两个键来校时校分。AT89C52的XTAL1和XTAL2分别为反向器的输入和输出,RST为复位输入,由它再接一个上拉电阻,引脚被拉高,P1口作为电子钟的位选,P3口部分作为电子钟的输出端。
关键词电子钟单片机液晶显示
LCD SCREEN DISPLAY BASED
ON SINGLE CHIP DESIGN OF
THE ELECTRONIC CLOCK
ABSTRACT
This design is the use of liquid crystal displays based on AT89C52 microcontroller produced by useful LCD electronic clock to complete timing, scoring, namely, second, and the school, the school sub-functions. Microprocessor is a microcontroller core, computing and control the completion of the operation of serial port data memory and the reset circuit, clock circuit, proofreading circuit controlled by a microprocessor to complete their tasks. The final adoption of liquid crystal display hours, minutes and seconds. In the oscillator is running, reset depends on the RST or RST pin to exert sustained two machine cycle to achieve high, in the RST pin is applied to the first 2 cycles of high implementation of internal reset,After the run once per cycle until RST change. When reset, ALE and / RSEN output high, machine ALE = 1, and / RSEN = 1, on-chip RAM is not the impact of reset and reset after the PC point from the start address of 0000H to 0000H Microcontroller begin implementation procedures. Internal clock used in the design mode, then ends in the XTAL1 and XTAL2 crystal, and the internal stability of the reverse device constitutes a self-excited oscillator clock pulse sent directly into the on-chip timing control unit, the LCD clock last by 6 LCD display tube display, when minutes and seconds Segment LCD display with seven-segment display, its structure, except in the electrode plate spray.On a to g of these seven strokes, the lower electrode plates are also sprayed with the strokes
corresponding to the "day"-shaped electrode, and then the public-side COM. Another clock proofing and proofreading ordinary electronic watches using the same mode of operation to complete, just press K1, K2 of these two keys to the school when the school hours. AT89C52 the XTAL1 and XTAL2, respectively reverse the input and output, RST as a reset input, which were followed by a pull-up resistor, pin is pulled, P1 mouth as an electronic clock Choice, P3 mouth part as an electronic clock outputs.
KEYWORDS electronic clock MCU LCD
目录