Abstract
The paper mainly presents the hardware and software design of the digital clock using AT89S51. The source program using assemble Language is given. This digital clock is a time-device, which can display "hour", "minute", "second". Its time period is 12 hours and the full scale of the display is 12 hours, 59 minutes, 59 seconds and 99 milliseconds and it has the function of time adjustment. The circuit consists of the clock pulse generator, the clock counter, decoding drive circuit, digital display circuit and the time adjustment circuit.
It generates time standard signal using crystal oscillator, here is the quartz crystal oscillator. Because 60 seconds is 1 minute, 60 minutes is 1 hour and 24 hours is 1 day, we uses two counters of 60 parts and a counter of 12 part separately to constitute the count of percentage of second, second, minute and hour. So it can realize time function. Display component selects seven-segment numerical tube LED. Driven by decoding output circuit, it can display showing clear and intuitive figures. Due to walking error of digital clock, we design time calibrat in the system.
Single-chip microcomputer is the most common digital clock, digital clock with a digital circuit technology to achieve year, month, day, week, the time of installation, compared with the mechanical clock has a higher accuracy and Intuitive, and no mechanical devices, has a longer life, it has been widely used.
Key words:Single-chip microcomputer AT89S51 Digital clock