【正文】
mpty talk. Through this internship, I learned a lot of ② not learn things. This practice means to us is very important, let us from the new understanding to their position. In the practice, also carry forward our team spirit, and ability to cooperate. Under the teacher39。 The elevator to scan the keyboard constantly in the process of operation, thus to judge each floor has no call request,。 S15: Elevator internal selection to the five floor button, the button is pressed said elevator passengers going to the five floor, SCM according to the signal control elevator。 S11: Elevator internal selection to a floor button, the button is pressed said elevator passengers going to the first floor, SCM according to the signal to control the operation of the lift。 S7 : four buildings down the call button, the button is pressed four floor elevator ride down to single chip, and the signal into a fixed unit, wait to judge whether the response to this call the elevator to the floor。 S3 : two buildings down the call button, the button press said the two floor elevator ride down to single chip, and the signal into a fixed unit, wait to judge whether the response to this call the elevator to the floor。 S2: two buildings to the call button, the button press said the two floor elevator upstairs to, and the MCU will this signal into a fixed unit, wait to judge whether the response to this call the elevator to the floor。 S6: four floor to the call button, the button is pressed four floor elevator upstairs to, and the MCU will this signal into a fixed unit, wait to judge whether the response to this call the elevator to the floor。 S10: six floor to the call button, the button is pressed the elevator downstairs said people should, and SCM will this signal into a fixed unit, wait to judge whether the response to this call the elevator to the floor。 S14: Elevator internal selection to the four floor button, the button is pressed said elevator passengers going to the four floor, SCM according to the signal control elevator。 The main program mainly includes: The judge passengers into the elevator selection which floor, to control the elevator operation according to the judgement of the situation。 The door has a delay to ensure passengers out of / into the elevator。各大城市建筑物在不斷向高層化發(fā)展。用 PLC 控制的電梯性能可靠、穩(wěn)定,但是造價(jià)太高。采用行列式鍵盤矩陣作為外呼內(nèi)選電路,由于是 6 層樓,故選用 4 4 矩陣鍵盤。 總體設(shè)計(jì)框圖 如圖 1 所示 10 圖 1 總體方案圖 3 設(shè)計(jì)原理分析 鍵盤矩陣電路的設(shè)計(jì) 由于本電路所 需按鍵較多為了節(jié)省單片機(jī)的 I/O 口,故選用行列式鍵盤矩陣。時(shí)鐘電路如圖 3(右)所示:晶振采用的是 12MHZ 的, XATL2 和 XATL1 分別為單片機(jī)的 18 和 19 腳。 L3 滅表示電梯關(guān)門,電梯運(yùn)行時(shí) L1 和 L2 必須有一個(gè)亮,來(lái)表示電梯的上行和下行。整個(gè)軟件設(shè)計(jì)包括一下幾部分: ⑴ 初始化程序使數(shù)碼管顯示“ 1”表示電梯處在一樓,并且使 L3 燈亮表示電梯開門等 待人進(jìn)入電梯; ⑵ 主程序主要包括: ① 判斷乘客進(jìn)入電梯后選擇去哪一層,根據(jù)判斷情況來(lái)控制電梯運(yùn)行; ② 電梯在運(yùn)行過(guò)程中要不斷的掃描鍵盤,從而來(lái)判斷各樓層有無(wú)呼叫請(qǐng)求 ,; ③ 電梯在運(yùn)行過(guò)程中只響應(yīng)同方向的呼叫請(qǐng)求; ④ 實(shí)時(shí)顯示電梯所在位置及運(yùn)行狀態(tài)(上行 /下行); ⑤開關(guān)門有一定的延時(shí)來(lái)保證乘客走出 /進(jìn)入電梯; 軟件流程圖如圖 6 所示: R31 0 KR41 0 KR51 0 K R60 .2 KR70 .2 KR80 .2 KP 0 . 0P 0 . 1P 0 . 25VL1L2L3 14 圖 6 4 總結(jié)與體會(huì) 通過(guò)這次基于單片機(jī)的綜合實(shí)習(xí),讓我對(duì)以前所學(xué)的知識(shí)有了綜合的應(yīng)用。發(fā)現(xiàn)了,僅僅有理論知識(shí)是不夠的,理論與應(yīng)用之間存在著相當(dāng)大的差距。在實(shí)習(xí)當(dāng)中,也發(fā)揚(yáng)了我們的團(tuán)隊(duì)精神,與合