【正文】
1Wire bus. Normally it is no more than 50m. To achieve distant control, the system can be designed in to a wireless one to break the length limit of the 1Wire bus [6]. C. LCD Circuit The LCD 12232F is used, which can be used to show characters, temperature value and time, and supply a friendly display interface. The 12232F is a LCD with 8192 12832 pixels Chinese character database and 128 168 pixels ASCII character set graphics. It mainly consists of row drive/column drive and 12832 full lattice LCD with the function of displaying graphics as well as 2 Chinese characters. It is in a parallel or serial mode to connect to external CPU [7]. In order to economize the hardware resource, the 12232F should be connected to the AT89S51 in serial mode with only 4 output ports used. The LCD grayscale can be changed by adjusting the variable resistor connected the pin Vlcd of the LCD. CLK is used to transmit serial munication clock. SID is used to transmit serial data. CS is used to enable control the LCD. L+ is used to control the LCD backlight power. D. Clock Circuit The Dallas DS1302 is used, which is a high performance, lowpower and realtime clock chip with RAM. The DS1302 serves in the system with calendar clock and is used to monitor the time. The time data is read and processed by the AT89S51 and then displayed by the LCD. Also the time can be adjusted by the keyboard. The DS1302 crystal oscillator is set at 32768Hz, and the remended pensation capacitance is 6pF. The oscillator frequency is lower, so it might be possible not to connect the capacitor, and this would not make a big difference to the time precision. The backup power supply can be connected to a rechargeable battery. E. Keyboard Control Circuit The keyboard interface in the system is driven by the HD7279A which has a +5V single power supply and which is connected to the keyboard and display without using any activedevice. According to the basic requirements and functions of the system, only 6 buttons are needed. The system39。s functions are set by the AT89S51 receiving the entered data. In order to save the external resistor, the 16 keyboard is used, and the keyboard codes are defined as: 07H, 0FH, 17H, 1FH, 27H, 2FH. The order can be read out by reading the code instruction. HD7279A is connected to the AT89S51 in serial mode and only 4 ports are need. As shown in Fig. 6, DIG0~DIG5 and DP are respectively the column lines and row line ports of the six keys which achieve keyboard monitoring, decoding and key codes identification. F. Alarm Circuit In order to simplify the circuit and convenient debugging, a 5V automatic buzzer is used in the alarm circuit [8]. And this make the software programming simplified. As shown in Fig. 7, it is controlled by the PNP transistor 9012 whose base is connected to the pin of the AT89S51. When the temperature exceeds the upper and lower limit value, the output low level which makes the transistor be on and then an alarm is given by the buzzer. G. Drive Circuit A step motor is used as the drive device to control the temperature. The fourphase and eightbeat pulse distribution mode is used to drive motor and the simple delay program is used to handle the time interval between the pulses to obtain different rotational speed. T