單片機的交通燈控制器的設(shè)計與實現(xiàn).doc
約33頁DOC格式手機打開展開
單片機的交通燈控制器的設(shè)計與實現(xiàn),本文共計33頁,13166字;摘要: 近年來隨著科技的飛速發(fā)展,單片機的應(yīng)用正在不斷地走向深入,同時帶動傳統(tǒng)控制檢測日新月異更新。在實時檢測和自動控制的單片機應(yīng)用系統(tǒng)中,單片機往往是作為一個核心部件來使用,僅單片機方面知識是不夠的,還應(yīng)根據(jù)具體硬件結(jié)構(gòu),以及針對具體應(yīng)用對象特點的軟件結(jié)合...
內(nèi)容介紹
此文檔由會員 劉毛毛 發(fā)布
單片機的交通燈控制器的設(shè)計與實現(xiàn)
本文共計33頁,13166字;
摘要: 近年來隨著科技的飛速發(fā)展,單片機的應(yīng)用正在不斷地走向深入,同時帶動傳統(tǒng)控制檢測日新月異更新。在實時檢測和自動控制的單片機應(yīng)用系統(tǒng)中,單片機往往是作為一個核心部件來使用,僅單片機方面知識是不夠的,還應(yīng)根據(jù)具體硬件結(jié)構(gòu),以及針對具體應(yīng)用對象特點的軟件結(jié)合,加以完善。
十字路口車輛穿梭,行人熙攘,車行車道,人行人道,有條不紊。那么靠什么來實現(xiàn)這井然秩序呢?靠的是交通信號燈的自動指揮系統(tǒng)。交通信號燈控制方式很多。本系統(tǒng)采用MSC-51系列單片機Intel8031和可編程并行I/O接口芯片8255A為中心器件來設(shè)計交通燈控制器,實現(xiàn)了能根據(jù)實際車流量通過8031芯片的P1口設(shè)置紅、綠燈燃亮?xí)r間的功能;為了系統(tǒng)穩(wěn)定可靠采用了MAX629“看門狗”芯片,避免了系統(tǒng)因為死機而停止工作的情況發(fā)生;顯示時間直接通過8255的PA、PB口輸出;交通燈信號通過PC口輸出;交通燈的點亮采用VT雙向晶閘管來控制,直接采用220V交流電源驅(qū)動,系統(tǒng)實用性強、操作簡單、擴展性強。
關(guān)鍵詞:單片機,交通燈,控制器,設(shè)計,實現(xiàn)
Abstract: In recent years along with science and technology develop fast, the application of single flat machine is moving towards thorough continuously, at the same time drive traditional control detection day the benefit of new moon update. In the only flat machine application system of the automatic control and detection of real time, only flat machine is often to use as a key parts, only single flat machine aspect knowledge is insufficient , return should basis specificly hardware structure, as well as aim at the software that applies object characteristic specificly combination, perfect.
目 錄
摘要 ................................................................... I
Abstract.................................................................II
1 引言 .................................................................1
2 單片機概述 ........................................................... 1
3 芯片的選者與簡介......................................................1
3.1 MSC-51芯片簡介.....................................................1
3.2 8255芯片簡介.......................................................4
3.3 其他器件...........................................................5
4 控制器硬件的設(shè)計.......................................................5
4.1交通管理方案論證....................................................5
4.2系統(tǒng)硬件設(shè)計........................................................6
4.2.1交通燈系統(tǒng)框圖..................................................6
4.2.2交通燈控制線路圖................................................7
4.2.3系統(tǒng)工作原理....................................................8
5控制器的軟件設(shè)計........................................................8
5.1每秒鐘的設(shè)定.........................................................8
5.2計數(shù)器的硬件延時.....................................................8
5.2.1計數(shù)器初值計算...................................................8
5.2.2計算公式.........................................................8
5.2.3設(shè)置1秒的方法...................................................8
5.2.4相應(yīng)代碼程序.....................................................9
5.3軟件延時............................................................9
5.4時間及信號燈的顯示..................................................10
5.4.1 8031并行口擴展.................................................10
5.4.2顯示原理........................................................10
5.4.3 8255輸出信號的放大.............................................10
5.4.4 8255輸出信號與信號燈的連接.....................................11
5.4.5 8255與8031的連接...............................................11
5.5程序設(shè)計............................................................11
5.5.1流程圖如圖所示..................................................11
5.5.2 程序源代碼..................................................... 12
6看門狗硬件電路設(shè)計.....................................................16
6.1軟件看門狗....................................................... 17
6.2硬件看門狗....................................................... 17
7單片機開發(fā)系統(tǒng).........................................................19
8實驗平臺...............................................................20
8.1實驗平臺...........................................................20
8.2實驗步驟 ..........................................................20
8.3 系統(tǒng)編程信息...................................................... 20
8.3.1 系統(tǒng)內(nèi)存分配和I/0接口使用...................................... 21
8.3.2 實驗程序原代碼.................................................. 21
9結(jié)論..................................................................26
10致謝..................................................................26
參考文獻(xiàn)................................................................27
參考文獻(xiàn)
[1]胡漢才.單片機原理及其接口技術(shù) [M]. 北京:清華大學(xué)出版,1996
[2]付家才. 單片機控制工程實踐技術(shù)[M]. 北京:化學(xué)工業(yè)出版社,2004.5
[3]潘新民.微型計算機控制技術(shù) [M].北京:人民郵電出版社,1999.9
[4]余錫存 曹國華.單片機原理及接口技術(shù)[M].陜西:西安電子科技大學(xué)出版社,2000.7
[5]雷麗文 等.微機原理與接口技術(shù)[M].北京:電子工業(yè)出版社,1997.2
[6]蔣萬君 .在論循環(huán)時序電路的簡便設(shè)計[J] .機電一體化,2005 第5期
本文共計33頁,13166字;
摘要: 近年來隨著科技的飛速發(fā)展,單片機的應(yīng)用正在不斷地走向深入,同時帶動傳統(tǒng)控制檢測日新月異更新。在實時檢測和自動控制的單片機應(yīng)用系統(tǒng)中,單片機往往是作為一個核心部件來使用,僅單片機方面知識是不夠的,還應(yīng)根據(jù)具體硬件結(jié)構(gòu),以及針對具體應(yīng)用對象特點的軟件結(jié)合,加以完善。
十字路口車輛穿梭,行人熙攘,車行車道,人行人道,有條不紊。那么靠什么來實現(xiàn)這井然秩序呢?靠的是交通信號燈的自動指揮系統(tǒng)。交通信號燈控制方式很多。本系統(tǒng)采用MSC-51系列單片機Intel8031和可編程并行I/O接口芯片8255A為中心器件來設(shè)計交通燈控制器,實現(xiàn)了能根據(jù)實際車流量通過8031芯片的P1口設(shè)置紅、綠燈燃亮?xí)r間的功能;為了系統(tǒng)穩(wěn)定可靠采用了MAX629“看門狗”芯片,避免了系統(tǒng)因為死機而停止工作的情況發(fā)生;顯示時間直接通過8255的PA、PB口輸出;交通燈信號通過PC口輸出;交通燈的點亮采用VT雙向晶閘管來控制,直接采用220V交流電源驅(qū)動,系統(tǒng)實用性強、操作簡單、擴展性強。
關(guān)鍵詞:單片機,交通燈,控制器,設(shè)計,實現(xiàn)
Abstract: In recent years along with science and technology develop fast, the application of single flat machine is moving towards thorough continuously, at the same time drive traditional control detection day the benefit of new moon update. In the only flat machine application system of the automatic control and detection of real time, only flat machine is often to use as a key parts, only single flat machine aspect knowledge is insufficient , return should basis specificly hardware structure, as well as aim at the software that applies object characteristic specificly combination, perfect.
目 錄
摘要 ................................................................... I
Abstract.................................................................II
1 引言 .................................................................1
2 單片機概述 ........................................................... 1
3 芯片的選者與簡介......................................................1
3.1 MSC-51芯片簡介.....................................................1
3.2 8255芯片簡介.......................................................4
3.3 其他器件...........................................................5
4 控制器硬件的設(shè)計.......................................................5
4.1交通管理方案論證....................................................5
4.2系統(tǒng)硬件設(shè)計........................................................6
4.2.1交通燈系統(tǒng)框圖..................................................6
4.2.2交通燈控制線路圖................................................7
4.2.3系統(tǒng)工作原理....................................................8
5控制器的軟件設(shè)計........................................................8
5.1每秒鐘的設(shè)定.........................................................8
5.2計數(shù)器的硬件延時.....................................................8
5.2.1計數(shù)器初值計算...................................................8
5.2.2計算公式.........................................................8
5.2.3設(shè)置1秒的方法...................................................8
5.2.4相應(yīng)代碼程序.....................................................9
5.3軟件延時............................................................9
5.4時間及信號燈的顯示..................................................10
5.4.1 8031并行口擴展.................................................10
5.4.2顯示原理........................................................10
5.4.3 8255輸出信號的放大.............................................10
5.4.4 8255輸出信號與信號燈的連接.....................................11
5.4.5 8255與8031的連接...............................................11
5.5程序設(shè)計............................................................11
5.5.1流程圖如圖所示..................................................11
5.5.2 程序源代碼..................................................... 12
6看門狗硬件電路設(shè)計.....................................................16
6.1軟件看門狗....................................................... 17
6.2硬件看門狗....................................................... 17
7單片機開發(fā)系統(tǒng).........................................................19
8實驗平臺...............................................................20
8.1實驗平臺...........................................................20
8.2實驗步驟 ..........................................................20
8.3 系統(tǒng)編程信息...................................................... 20
8.3.1 系統(tǒng)內(nèi)存分配和I/0接口使用...................................... 21
8.3.2 實驗程序原代碼.................................................. 21
9結(jié)論..................................................................26
10致謝..................................................................26
參考文獻(xiàn)................................................................27
參考文獻(xiàn)
[1]胡漢才.單片機原理及其接口技術(shù) [M]. 北京:清華大學(xué)出版,1996
[2]付家才. 單片機控制工程實踐技術(shù)[M]. 北京:化學(xué)工業(yè)出版社,2004.5
[3]潘新民.微型計算機控制技術(shù) [M].北京:人民郵電出版社,1999.9
[4]余錫存 曹國華.單片機原理及接口技術(shù)[M].陜西:西安電子科技大學(xué)出版社,2000.7
[5]雷麗文 等.微機原理與接口技術(shù)[M].北京:電子工業(yè)出版社,1997.2
[6]蔣萬君 .在論循環(huán)時序電路的簡便設(shè)計[J] .機電一體化,2005 第5期