【正文】
als of human presence, the intensity of ambient light is collected by Photoresistor , time is set by DS1302 clock chip, the alarm is from the buzzer, and the condition of classroom is indicated through the LED lights. The software is designed with C language to program and separate module, and the system is tested and debugged with simulation tools. According to the flow chart, the programme is programmed to control the classroom lighting circuit. In addition, this paper also takes antiinterference measures to guarantee the classroom lighting control system operate stably . The system can be control easily. Besides there are many advantages such as small volume, strong specificity , reasonable price. It can satisfy the control mand of light in college classroom. Key words: AT89S52。 Stable measures 桂林電子科技大學(xué)畢業(yè)設(shè)計(jì)(論文)報(bào)告用紙 第 1 頁 共 2 頁 目 錄 1 引言 ................................................................................................................................................................................ 1 課題的背景及意義 .................................................................................................................................................. 1 教室照明現(xiàn)狀及存在問題 .................................................................................................................................. 1 設(shè)計(jì)的內(nèi)容 .................................................................................................................................................................. 2 本章小結(jié) ....................................................................................................................................................................... 2 2 教室照明系統(tǒng)的設(shè)計(jì) ..................................................................................................................................... 3 系統(tǒng)整體設(shè)計(jì)方案 .................................................................................................................................................. 3 教室照明系統(tǒng)的硬件設(shè)計(jì) .................................................................................................................................. 4 教室照明控制器的選擇 ................................................................................................................................... 4 下載線接口模塊 ................................................................................................................................................... 6 單片機(jī)最小系統(tǒng) ................................................................................................................................................... 6 數(shù)據(jù)采集模塊 ......................................................................................................................................................... 7 時(shí)鐘電路模塊 ...................................................................................................................................................... 13 聲光報(bào)警模塊 ...................................................................................................................................................... 17 人機(jī)交互模塊 ...................................................................................................................................................... 18 教室照明系統(tǒng)的軟件設(shè)計(jì) ............................................................................................................................... 19 系統(tǒng)監(jiān)控主程序設(shè)計(jì) ...................................................................................................................................... 19 按鍵掃描程序設(shè)計(jì) ........................................................................................................................................... 20 數(shù)據(jù)采集控制程序設(shè)計(jì) ................................................................................................................................. 21 時(shí)鐘控制程序設(shè)計(jì) ........................................................................................................................................... 23 控制子程序設(shè)計(jì) ................................................................................................................................................ 24 本章小結(jié) .................................................................................................................................................................... 24 3 仿真與調(diào)試 .................................................................................................................... 25 仿真 ............................................................................................................................................................................... 25 調(diào)試 ............................................................................................................................................................................... 25 硬件電路調(diào)試 ...................................................................................................................................................... 25 軟件調(diào)試 ................................................................................................................................................................. 25 調(diào)試過程出現(xiàn)問題及分析解決 ................................................................................................................. 26 本章小結(jié) .................................................................................................................................................................... 26 4 系統(tǒng)穩(wěn)定性分析 .............................................................................................................................................. 27 元器件本身的性能與可靠性 .......................................................................................................................... 27 桂林電子科技大學(xué)畢業(yè)設(shè)計(jì)(論文