1、 毕业论文(设计 ) 外文翻译 学 生 姓 名: 指导教 师 : 合 作 指 导 教 师 : 专业名 称 : 自动化 所在学 院 : 2012 年 6 月 Design of single chip real time clock and calendar based on Abstract: This clock and calendar uses the AT89S52 microcontroller as the core for the control. Time Circuit which is constituted by Dallass DS1302 real-time cloc
2、k chip achieved a time and date display, it increased functionality for the temperature display and the whole point timekeeping. This paper discusses the hardware circuit of the system, principle in detail , and gives the flow chart of the software design and the major source code. Keywords: microco
3、ntroller; real-time clock; Temperature measurement 1 Introduction Clock and calendar-bedroom at home, schools, stations and more and more extensive use of plaza for peoples lives, study, work great convenience. clock and calendar for the past need to re-adjust after power-off time and date, and time
4、 is a big error. Designed the system using real-time clock chip (DS1302) as a timer parts, the chip comes with an internal crystal oscillator, so that effectively guarantee the accuracy of the time and hang own internal battery power makes the situation will continue to update the time information .
5、 This design uses AT89S52 as the main controller, in order to improve the practicality of the circuit add temperature measurement circuit, timekeeping and alarm functions. 2 System hardware design Schematic circuit shown in Figure 2: System architecture diagram 2.1 Power Supply Circuit In order to r
6、educe circuit costs, the system power supply circuit by the transformer transformer, three-terminal integrated regulator (L7805 circuit 5V, has a simple, reliable, inexpensive and so on. 2.2 Host Controller Host controller using ATMELs latest MCU Products AT89S52. Apart from the single-chip microcom
7、puter has a MCS-51 series single-chip all the benefits of things,also has 8KB of internal in-system programmable FLASH memory,free and low-power brown-out mode, greatly reducing the power circuit . In addition,also has a watchdog circuit,a reliable job for the circuit provides greater assurance. 2.3
8、 digital tube display circuit Show circuit with a high brightness,long life,low cost features such as the LED digital tube. Throughout the show circuit by the digital control and display LED drive circuit and decoding circuit. Because of the system to display the contents of more,a total of 16 digit
9、al tube, respectively,with eight shows year,month,day,four show time,show that 22 weeks,2 show the temperature. Controller in order to save resources,between the controller and displays add a decoding circuit 16 so that would have required the line of control into the circuit only 4 control lines,a
10、great save system resources. The decoder by the decoder constitute both 3-8. 2.4 Real-time clock chip This design uses the United States Dallas company DS1302, the chip can automatically generate century,year,month,day,hour,minute,second,such as time information. Century the use of internal register
11、s with the software will be able to resolve the Millennium, the problem. The chip has its own internal battery-keng,external brown-out,the internal time information also be able to maintain for 10 years. Time for a single day record of 12 hours and there is a 24-hour mode. Time Table Ways that also
12、has two kinds of binary numbers,and the other with BCD code express. The chip with 128 bytes of internal RAM,one of 11 bytes used to store time information,4 bytes of memory chips used to control information,known as the control register,113-byte general-purpose RAM for users to store temporary info
13、rmation. In addition,users can also program the chip to control a variety of square-wave output,and its internal three-way through the software interrupt shielding. 2.5 Buttons and temperature measurements and circuit The system in order to make the circuit more easy,button circuit design only three
14、 keys, which are set,+,-, three keys to adjust the calendar and clock. The system in order to improve the practicality of the circuit,an increase of a temperature display. The system temperature measurement circuit using Dallass DS18B20. The device because of its low price,easy circuits,measurement
15、precision,etc. 2.6 audio signal generator and driver circuit The circuits function is to receive control circuit to send to the entire point of time and timing signal,according to system settings produce different frequencies of audio signals,amplification by the drive circuit to drive speakers to v
16、oice their opinions in order to realize the whole point timekeeping and alarm functions. Description The AT89S52 is a low-power, high-performance CMOS 8-bit microcomputer with 4K bytes of Flash programmable and erasable read only memory (PEROM). The device is manufactured using Atmels high-density n
17、onvolatile memory technology and is compatible with the industry-standard MCS-52 instruction set and pinout. The on-chip Flash allows the program memory to be reprogrammed in-system or by a conventional nonvolatile memory programmer. By combining a versatile 8-bit CPU with Flash on a monolithic chip
18、, the Atmel AT89S52 is a powerful microcomputer which provides a highly-flexible and cost-effective solution to many embedded control applications. Function characteristic The AT89S52 provides the following standard features: 4K bytes of Flash, 128 bytes of RAM, 32 I/O lines, two 16-bit timer/counte
19、rs, a five vector two-level interrupt architecture, a full duplex serial port, on-chip oscillator and clock circuitry. In addition, the AT89S52 is designed with static logic for operation down to zero frequency and supports two software selectable power saving modes. The Idle Mode stops the CPU whil
20、e allowing the RAM, timer/counters, serial port and interrupt system to continue functioning. The Power-down Mode saves the RAM contents but freezes the oscillator disabling all other chip functions until the next hardware reset. Pin Description VCC: Supply voltage. GND: Ground. Port 0: Port 0 is an
21、 8-bit open-drain bi-directional I/O port. As an output port, each pin can sink eight TTL inputs. When 1s are written to port 0 pins, the pins can be used as highimpedance inputs.Port 0 may also be configured to be the multiplexed loworder address/data bus during accesses to external program and data memory. In this mode P0 has internal pullups.Port 0 also