版權(quán)說(shuō)明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡(jiǎn)介
1、傳統(tǒng)的單片機(jī)教學(xué)實(shí)驗(yàn)中,采用硬件仿真器、實(shí)驗(yàn)箱或?qū)嶒?yàn)板,需采購(gòu)大量的、昂貴的硬件設(shè)備,而且設(shè)備維護(hù)工作量也非常大。由于單片機(jī)應(yīng)用技術(shù)涉及到數(shù)字電子、模擬電子、計(jì)算機(jī)甚至通信等多學(xué)科的知識(shí),實(shí)踐性又很強(qiáng),在教學(xué)實(shí)驗(yàn)過(guò)程中必須軟件硬件結(jié)合,也就是將單片機(jī)程序和外圍電路相結(jié)合,若用實(shí)驗(yàn)箱則費(fèi)用高,又不能充分利用,若用實(shí)驗(yàn)板則開發(fā)周期長(zhǎng),方案變更困難。 利用proteus仿真軟件,設(shè)計(jì)了一個(gè)符合這種要求的、純軟件的單片機(jī)虛擬實(shí)驗(yàn)室系統(tǒng)既可調(diào)試單片機(jī)程序,也可仿真單片機(jī)外圍器件的工作情況;既能充分利用學(xué)校計(jì)算機(jī)房現(xiàn)有計(jì)算機(jī),減少硬件設(shè)備的維護(hù)工作量,還可為學(xué)生提供豐富的實(shí)驗(yàn)內(nèi)容。本實(shí)驗(yàn)系統(tǒng)結(jié)合了單片機(jī)和
2、外圍電路,與實(shí)際工程系統(tǒng)非常接近,拉近了單片機(jī)學(xué)習(xí)與就業(yè)的距離。1.proteus軟件介紹proteus是英國(guó)labcenter electronics公司開發(fā)的eda工具軟件。主要由原理布圖的方法繪制電路并進(jìn)行仿真的isis和pcb自動(dòng)布線或人工布線電路仿真的ares兩個(gè)程序組成。proteus運(yùn)行于windows操作系統(tǒng)上,可以動(dòng)態(tài)實(shí)時(shí)仿真、分析(spice)各種模擬器件和集成器件。針對(duì)微處理器及其外圍電路,可以直接在基于原理圖的虛擬原型上編程,并實(shí)現(xiàn)軟件代碼級(jí)的調(diào)試,配合其提供的仿真圖表或虛擬儀器如示波器、邏輯分析儀等可進(jìn)行相應(yīng)的測(cè)量與分析。1)proteus軟件的組成及特點(diǎn)proteu
3、s仿真軟件包含兩個(gè)應(yīng)用程序,proteus isis和proteusaresproteus isis是proteus系統(tǒng)的核心,擁有超過(guò)8000元件的大型元件庫(kù),包含幾千個(gè)模擬和數(shù)字電路中常用的spice模型及各種動(dòng)態(tài)元件,如三極管、555定時(shí)器等基本元件,完全適合于仿真模型。同時(shí)isis也為用戶提供了非常友好的作圖界面,元件之間的連線方便、靈活、高效率,剪切、移動(dòng)等操作借助鼠標(biāo)可簡(jiǎn)單實(shí)現(xiàn);另外,isis還支持層次圖設(shè)計(jì),支持wmf、bnp、dxf等多種圖形輸出格式。proteus的另外一個(gè)應(yīng)用程序就是proteus 81es,用于直接將proteus isis得到的仿真原理圖生成pcb版圖。
4、同時(shí)proteus還提供了豐富的虛擬工具,如示波器、邏輯分析儀等,用戶借助這些虛擬工具可以直接觀察電路系統(tǒng)的硬件結(jié)果,盡管虛擬儀器的精度有限,但整個(gè)操作過(guò)程如同利用硬件仿真器和其他測(cè)試儀器直接進(jìn)行硬件開發(fā),還可以根據(jù)虛擬儀器的結(jié)果直接進(jìn)行源代碼的調(diào)試,以上過(guò)程不同于純粹的軟件仿真?zhèn)戎赜谒惴ǖ尿?yàn)證,這種仿真過(guò)程是可以給用戶帶來(lái)直接的硬件開發(fā)經(jīng)驗(yàn)。因此用proteus可以實(shí)現(xiàn)單片機(jī)及外圍電路的仿真非常方便,如單片機(jī)軟件仿真系統(tǒng),模擬電路仿真、數(shù)字電路仿真、單片機(jī)外圍電路仿真、rs232動(dòng)態(tài)仿真、i2c調(diào)試器、spi調(diào)試器、鍵盤和lcd系統(tǒng)仿真等。2)proteus的教學(xué)輔助意義借助proteus的
5、對(duì)cpu和外圍電路強(qiáng)大的仿真能力以及豐富的資源庫(kù),可以有效地替代硬件仿真器進(jìn)行先期的軟硬件調(diào)試,等到仿真結(jié)果基本理想時(shí)再進(jìn)行實(shí)際的硬件調(diào)試,這樣的開發(fā)過(guò)程不僅高效,而且可以盡可能地減少損失,這對(duì)于解決實(shí)驗(yàn)室資源緊張的問(wèn)題是一個(gè)很好的思路。對(duì)于剛接觸單片機(jī)的學(xué)生來(lái)說(shuō),擁有一臺(tái)計(jì)算機(jī)和一套proteus軟件,就可以很好地開展單片機(jī)的入門學(xué)習(xí),還可以積累一些實(shí)用的硬件開發(fā)經(jīng)驗(yàn)。2.proteus教學(xué)應(yīng)用實(shí)例下面通過(guò)聲音報(bào)警器實(shí)例說(shuō)明如何使用proteus實(shí)現(xiàn)電路的設(shè)計(jì)與仿真。實(shí)例要求電路以at89c51單片機(jī)為核心,實(shí)現(xiàn)發(fā)出“嘀、嘀、”的聲音,嘀聲的頻率為1khz,并且實(shí)現(xiàn)嘀0.2s,然后斷0.2s
6、,再如此循環(huán)下去。1)虛擬電路的建立運(yùn)行proteus的isis程序后,進(jìn)入該仿真軟件的主界面。主界面由菜單欄、工具欄、預(yù)覽窗口、元件選擇按鈕、元件列表窗口、原理圖繪制窗口和仿真進(jìn)程控制按鈕組成。通過(guò)元件選擇按鈕p命令,在彈出的 pickdevices窗口中選擇電路所需的元件,放置元件并調(diào)整其相對(duì)位置,對(duì)元件參數(shù)設(shè)置及元器件問(wèn)連線,完成單片機(jī)系統(tǒng)的硬件原理圖繪制。微處理器及外圍器件的vss、vdd、vee不需要連接,默認(rèn)vss=0v、vdd=5v、vee=- 5v、gnd=0v,微處理器的時(shí)鐘電路也不需要給出可直接從引腳引入。2)仿真文件編制添加在軟件仿真中,主要采用keil進(jìn)行調(diào)試與仿真。打
7、開keil uvision2一projectnew project,彈出對(duì)話框,選擇單片機(jī)型號(hào)。在targetloptions for target target1 中進(jìn)行資源設(shè)置。其中要注意的是,在output子菜單中要選擇create hex file。軟件和硬件的結(jié)合,就是一個(gè)完整的單片機(jī)應(yīng)用系統(tǒng)。在這個(gè)過(guò)程中只需要將keil仿真調(diào)試過(guò)產(chǎn)生的hex文件,寫入proteus中的mcu芯片中,然后,在proteus中點(diǎn)擊運(yùn)行即可實(shí)現(xiàn)單片機(jī)的軟、硬件聯(lián)合仿真。實(shí)驗(yàn)中,先右鍵單擊at89c51,再左鍵單擊,在彈出的edit component對(duì)話框中的program file一欄選擇仿真文件。3
8、)調(diào)試和仿真proteus可以仿真運(yùn)行,也可對(duì)單步調(diào)試。仿真運(yùn)行時(shí),可以看到外圍電路顯示部件狀態(tài)的變化,可以利用proteus提供的觀察工具,具體顯示某一電路狀態(tài)的變化??梢酝ㄟ^(guò)輸入、輸出接口電路與實(shí)驗(yàn)系統(tǒng)交互操作。單步調(diào)試時(shí),可用單步執(zhí)行、進(jìn)入子程序、跳出子程序及執(zhí)行到光標(biāo)處等命令執(zhí)行程序,也可以在程序中設(shè)置斷點(diǎn),執(zhí)行到斷點(diǎn)處。在調(diào)試過(guò)程中,隨時(shí)觀察程序的執(zhí)行情況和單片機(jī)的系統(tǒng)資源等,可供調(diào)試時(shí)分析和查看。proteus仿真的優(yōu)勢(shì)是在實(shí)驗(yàn)系統(tǒng)運(yùn)行時(shí),可以利用按鈕、開關(guān)、鍵盤輸入信號(hào)和信息,通過(guò)發(fā)光二極管、數(shù)碼管、lcd顯示器及圖形儀表輸出信息,實(shí)現(xiàn)輸入、輸出的交互,實(shí)時(shí)地、直觀地了解單片機(jī)指
9、令與外圍電路的執(zhí)行結(jié)果及運(yùn)行狀態(tài)。proteus simulation softwarescm traditional teaching experiment, using hardware simulation, experimental me or experimental board, takes a lot of procurement, expensive hardware devices, and equipment maintenance workload is also very large. as scm application of electronic technolog
10、y related to digital, analog electronics, computers and even communications, and other multi-disciplinary knowledge, practical and highly experimental in the process of teaching software to hardware integration, is the scm process and the external circuit phase combination, if the experiment with me
11、 is the high cost, and can not be fully utilized, if the board will experiment with a long development cycle, the programme changes difficult. proteus use of simulation software, designed a line with the requirements of the scm software-only virtual laboratory system can debug mcu procedures, but al
12、so mcu peripheral device simulation of the work; can take full advantage of the school computer room existing computer hardware equipment maintenance to reduce the workload, but also to provide students with rich content of the experiment. the experimental system combines the single chip and the ext
13、ernal circuit, and the actual system works very close, narrowing the scm distance learning and employment. 1.proteus software introduced proteus is a british labcenter electronics developed by eda tools. mainly by the principles of layout and the method of drawing circuit simulation of the isis and
14、pcb automatic circuit wiring or wiring of the ares simulation of the two procedures. proteus running on the windows operating system, it can be dynamic real-time simulation, analysis (spice) variety of analog devices and integrated devices. for the microprocessor and its peripheral circuits can be d
15、irectly based on the principle of the virtual prototype on programming and to achieve the level debugging software code, with its charts provided by the simulation or virtual instruments such as oscilloscopes, logic analyzer, and so can make the appropriate measurement and analysis. proteus contains
16、 two simulation software applications, proteus isis and proteusares. proteus isis proteus is the heart of the system, with more than 8,000 components of the major components, including thousands of analog and digital circuits used in the spice model and a variety of dynamic components, such as the t
17、ransistor, 555 timer, and other basic components, entirely suitable for simulation model. at the same time isis also provides users with a very friendly graphic interface, the connection between the components convenient, flexible, efficient, cut, such as mobile operators can use the mouse to achiev
18、e a simple addition, isis also support the level of design plans, support wmf, bnp, dxf and other graphics output format. proteus another application is the proteus 81 es, for direct proteus isis will be the simulation schematic generation pcb territory. proteus at the same time also provided a weal
19、th of virtual tools, such as oscilloscopes, logic analyzer, users with these virtual tools can directly observe the results of the hardware circuitry, despite the limited accuracy of the virtual instrument, but the entire operation process as the use of hardware simulation and other testing equipmen
20、t directly to hardware development, virtual instrument can also direct the outcome of the source code for debugging, the above process unlike pure software simulation focus on the verification algorithm, this simulation process can be brought directly to the users hardware development experience. so
21、 proteus can be achieved using scm and external circuit simulation is very convenient, such as the scm software simulation system, the analog circuit simulation, digital simulation, scm external circuit simulation, rs232 dynamic simulation, i2c debugger, spi debugger , keyboard and lcd system simula
22、tion, and so on. 2.proteus the significance of teaching aids with proteus of the cpu and the external circuit powerful simulation capabilities and rich resource base, can provide an effective replacement hardware emulator to advance the hardware and software debugging, wait until the simulation resu
23、lts when the basic ideals and the actual hardware debugger, the development process not only efficient, but also to minimize losses, this laboratory resources to address the problem of tension is a good idea. the gang jiechu scm students, with a computer and a set of proteus software, we can develop
24、 good study scm entry, but also accumulated some useful experience in hardware development. second, proteus teaching gallery below through the voice alarm example of how to use the proteus to achieve circuit design and simulation. case asked circuit at89c51 microcontroller as the core to achieve a d
25、i, di, the voice of the frequency of sound di 1 khz, and achieve di 0.2 s, and then off 0.2 s, then this cycle continue. 1) the establishment of virtual circuit proteus operation of the isis program, the simulation software to enter the main interface. interface from the main menu bar, toolbar, the
26、preview window, select the button components, component list window, principle mapping process window and simulation of control buttons. p components through the select button order in the pop-up window pickdevices select the necessary circuit components, placing components and adjust its relative p
27、osition, the components set of parameters and asked connect components, completed the scm system hardware principle mapping . the microprocessor and peripheral devices of the vss, vdd, vee do not need to connect, by default vss = 0v, vdd = 5v, vee =- 5v, gnd = 0v, the microprocessor clock circuit do
28、 not need to be given directly from the pin introduction . 2) add documentation for the simulation in the simulation software, used mainly keil debugging and simulation. open keil uvision2 a project-new project, pop-up dialog box, select the mcu models. in targetl-options for target target1 in the r
29、esource settings. one should note that, in output in the sub-menu to choose create hex file. the combination of hardware and software, mcu is a complete application system. in this process simply too keil simulation debug the hex file, write proteus in the mcu chip, and then click on the proteus in
30、the running to achieve the scm software and hardware joint simulation. experiments, the first right-click at89c51, then left-click, pop-up dialog box in the edit component program file column choice simulation document. 3) debugging and simulation proteus simulation can be run, but also on single-step debugging. simulation run, you can see the external circuit components shows that
溫馨提示
- 1. 本站所有資源如無(wú)特殊說(shuō)明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁(yè)內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒(méi)有圖紙預(yù)覽就沒(méi)有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫(kù)網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。
最新文檔
- 舊房翻新裝修合同書模板
- 上海市商品房預(yù)租合同
- 公司財(cái)產(chǎn)信托合同
- 教育機(jī)構(gòu)借款居間合同
- 休閑娛樂(lè)項(xiàng)目貸款居間合同
- 環(huán)保材料技術(shù)研發(fā)與轉(zhuǎn)化合同
- 電子競(jìng)技賽事組織及運(yùn)營(yíng)合同
- 新材料+產(chǎn)品研發(fā)投資合同
- 餐飲連鎖經(jīng)營(yíng)許可使用合同
- 基于物聯(lián)網(wǎng)的智能家居集成合同
- 開展課外讀物負(fù)面清單管理的具體實(shí)施舉措方案
- 《中國(guó)心力衰竭診斷和治療指南(2024)》解讀完整版
- 2025年云南中煙工業(yè)限責(zé)任公司招聘420人高頻重點(diǎn)提升(共500題)附帶答案詳解
- 2025-2030年中國(guó)洗衣液市場(chǎng)未來(lái)發(fā)展趨勢(shì)及前景調(diào)研分析報(bào)告
- 2024解析:第三章物態(tài)變化-基礎(chǔ)練(解析版)
- 北京市房屋租賃合同自行成交版北京市房屋租賃合同自行成交版
- 《AM聚丙烯酰胺》課件
- 系統(tǒng)動(dòng)力學(xué)課件與案例分析
- 《智能網(wǎng)聯(lián)汽車智能傳感器測(cè)試與裝調(diào)》電子教案
- 客戶分級(jí)管理(標(biāo)準(zhǔn)版)課件
- GB/T 32399-2024信息技術(shù)云計(jì)算參考架構(gòu)
評(píng)論
0/150
提交評(píng)論