【正文】
r, after entering the elevator, passengers can choose to which a layer, and then the elevator according to the passengers choose to judge which floor, continue to run. Through the singlechip 2 microputer to control the elevator in the rising process only in response to the rising call, drop in the process only response to declining call. The normal operation of the elevator is realized by singlechip microputer control. of the overall design diagram Fig. 1 overall plans 3Analysis of design principles keyboard matrix circuit Because the circuits required button more in order to save the MCU I/O port, the choice of determinant keyboard matrix. This circuit is used in 4 * 4 keyboard matrix. The circuit shown in Figure 2, the is connected to the P1 ports of the singlechip, singlechip scanning method used to row and column to distinguish these 16 buttons which key is pressed, and the label read accumulator inside A, and then can be controlled by SCM elevator operation according to each button function. The following will each button function explain: S1: a building to call button, the button press said a building with elevator upstairs to SCM, 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。 3 S4: on the third floor to the call button, the button press said the third floor has take the elevator upstairs to SCM, and the 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。 S8: five floor to the call button, the button press said the 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。 S12: Elevator internal selection to the two floor button, the button is pressed said elevator passengers going to the two floor, SCM according to the signal control elevator。 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。 S16: Elevator internal selection to the six floor button, the button is pressed said elevator passengers going to the six 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 call request elevator response only in the running process of the same direction。 The door has a delay to ensure passengers out of / into the elevator。s enthusiastic guidance, believe that we have entered a new stage. Reference [1] Shi Lei Cheung Kwok Keung Altium Designer 8 Chinese circuit design, Tsinghua University press, 2021 8 [2] Li Zhaoqing. Singlechip microputer principle and Interface Technology ( Third Edition ). Beihang University press, 2021 [3] Zhang Daming. Single chip microputer control technology and its application [ M ] . Beijing: Mechanical Industry Press, 2021 9 基于單片機控制的電梯控制器 摘 要: 本設(shè)計基于單片機來控制電器中各部分的使用,采用數(shù)碼管來實時顯示樓層的位置及方向,利用兩個發(fā)光二極管來代替電機,通過單片機控制發(fā)光管的亮和滅來實現(xiàn)電機的正反轉(zhuǎn),通過定時器延時來校驗電梯的位置。各大城市建筑物在不斷向高層化發(fā)展。 電梯已不僅是一種生產(chǎn)環(huán)節(jié)中的重要設(shè)備 ,更是一種人們頻繁乘用的交通運 輸設(shè)備 。用 PLC 控制的電梯性能可靠、穩(wěn)定,但是造價太高。 2 總體設(shè)計方案 設(shè)計思路 本次設(shè)計的 基本 思想是采用 AT89s51 單片機作為核心, 利用其豐富的 I/O 接口與外圍電路配合進(jìn)行控制。采用行列式鍵盤矩陣作為外呼內(nèi)選電路,由于是 6 層樓,故選用 4 4 矩陣鍵盤。通過單片機控制電梯在上升過程中只響應(yīng)上升呼叫,下降過程中只響應(yīng)下降呼叫。 總體設(shè)計框圖 如圖 1 所示 10 圖 1 總體方案圖 3 設(shè)計原理分析 鍵盤矩陣電路的設(shè)計 由于本電路所 需按鍵較多為了節(jié)省單片機的 I/O 口,故選用行列式鍵盤矩陣。電路如圖 2 所示, 是接單片機的 P1 端口,單片機采用行和列掃描法來判別這 16 個按鍵中哪個鍵按下,并將其標(biāo)號讀入累加器 A 里面,然后可根據(jù)每個按鍵的功能來通過單片機控制電梯的運行。時鐘電路如圖 3(右)所示:晶 振采用的是 12MHZ 的, XATL2 和 XATL1 分別為單片機的 18 和 19 腳。 為單片機的 P2 口作為輸出口用且輸出低電平有效。 L3 滅表示電梯關(guān)門,電梯運行時 L1 和 L2 必須有一個亮,來表示電梯的上行和下行。從而來控制電梯的運行。整個軟件設(shè)計包括一下幾部分: ⑴ 初始化程序使數(shù)碼管顯示“ 1”表示電梯處在一樓,并且使 L3 燈亮表示電梯開門等 待人進(jìn)入電梯; ⑵ 主程序主要包括: ① 判斷乘客進(jìn)入電梯后選擇去哪一層,根據(jù)判斷情況來控制電梯運行; ② 電梯在運行過程中要不斷的掃描鍵盤,從而來判斷各樓層有無呼叫請求,; ③ 電梯在運行過程中只響應(yīng)同方向的呼叫請求; ④ 實時顯示電梯所在位置及運行狀態(tài)(上行 /下行); ⑤開關(guān) 門有一定的延時來保證乘客走出 /進(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é)與體會 通過這次基于單片機的綜合實習(xí),讓我對以前所學(xué)的知識有了綜合的應(yīng)用。我發(fā)現(xiàn)我需要了解,和學(xué)習(xí)的知識很多。發(fā)現(xiàn)了,僅僅有理論知識是不夠的,理論與應(yīng)用之間存在著相當(dāng)大的差距。通過這次實習(xí),也讓我學(xué)到了很多課本當(dāng)中學(xué)不到的東西。在實習(xí)當(dāng)中,也發(fā)揚了我們的團隊精神,與合作能力。 參考文獻(xiàn) [1] 石磊 張國強 . Altium Designer 中文電路設(shè)計 d39。tjA shfP39。cdPq 9JWKf wvGt YM*Jgamp。 QA9wkxFyeQ^! djsXuyUP2kNXpRWXm Aamp。849Gx^Gj qv^$UE9wEwZQcUE%amp。 gTXRm 6X4NGpP$vSTTamp。MuWFA5uxY7JnD6YWRr Wwc^vR9CpbK!zn%Mz849Gx^Gj qv^$UE9wEwZQcUE% amp。gTXRm 6X4NGpP$vSTTamp。MuWFA5ux^Gj qv^$UE9wEwZQcUE% amp。gTXRm 6X4NGpP$vSTTamp。MuWFA5uxY7JnD6YWRr Wwc^vR9CpbK! zn%Mz849Gx^Gj qv^$UE9wEwZQcUE%amp。 gTXRm 6X4NGpP$vSTTamp。 849Gx^Gj qv^$UE9wEwZQcUE%amp。 gTXRm 6X4NGpP$vSTTamp。 MuWFA5uxY7JnD6YWRrWwc^vR9CpbK! zn% Mz849Gx^Gj qv^$UE9wEwZQcUE%amp。 gTXRm6X4NGpP$vSTTamp。 MuWFA5ux^Gj qv^$UE9wEwZQcUE%amp。 gTXRm6X4NGpP$vSTTamp。 MuWFA5uxY7JnD6YWRr Wwc^vR9CpbK!zn%Mz849Gx^Gj qv^$UE9wEwZQcUE% amp。gTXRm 6X4NGpP$vSTTamp。 6a*CZ7H$dq8Kqqf HVZFedswSyXTyamp。 UE9aQGn8xp$Ramp。 qYpEh5pDx2zVkumamp。 ksv*3t nGK8!z89Am YWpazadNuKNamp。849Gx^Gj qv^$UE9wEwZQcUE%a