資源簡(jiǎn)介
使用proteus并基于8086模擬的流水燈實(shí)驗(yàn),包含工程文件、接線(xiàn)圖及源代碼。
利用板上集成電路上的資源,擴(kuò)展一片74HC245,用來(lái)讀入開(kāi)關(guān)狀態(tài);擴(kuò)展一片74HC373, 用來(lái)作來(lái)輸出口,控制 8 個(gè) LED 燈。

代碼片段和文件信息
/*?Main.c?file?generated?by?New?Project?wizard
?*
?*?Created:???周五?12月?9?2016
?*?Processor:?8086
?*?Compiler:??Digital?Mars?C
?*
?*?Before?starting?simulation?set?Internal?Memory?Size?
?*?in?the?8086?model?properties?to?0x10000
?*/
#define?OUT373??7000H
//?Write?a?byte?to?the?specified?I/O?port
void?outp(unsigned?int?addr?unsigned?char?data)?{
??__asm?{
?????mov?dx?addr
?????mov?al?data
?????out?dx?al
??}
}
void?delay(){
???for(int?i=0;i<500;++i){
??????for(int?j=0;j<120;++j)
?;
???}
}
void?main(void)?{
???int?i=0;
???while?(1)?{
????//?Write?your?code?here
????outp(OUT373?~(1<????delay();
??}
}
?屬性????????????大小?????日期????時(shí)間???名稱(chēng)
-----------?---------??----------?-----??----
?????目錄???????????0??2016-12-12?15:19??Exp0_LED\
?????目錄???????????0??2016-12-12?15:06??Exp0_LED\8086\
?????目錄???????????0??2016-12-12?15:06??Exp0_LED\8086\Debug\
?????文件????????1564??2016-12-12?15:10??Exp0_LED\8086\Debug\Debug.exe
?????文件?????????775??2016-12-12?15:10??Exp0_LED\8086\Debug\main.obj
?????文件????????1286??2016-12-12?15:19??Exp0_LED\8086\Debug\Makefile
?????文件?????????190??2016-03-15?19:09??Exp0_LED\8086\Debug\rtl.obj
?????文件?????????662??2016-12-12?15:06??Exp0_LED\8086\main.c
?????文件?????????564??2016-03-15?18:59??Exp0_LED\8086\rtl.asm
?????文件???????19051??2016-12-12?10:52??Exp0_LED\Backup?Of?Exp0_LED.pdsbak
?????文件???????17078??2016-12-12?15:19??Exp0_LED\Exp0_LED.pdsprj
?????文件????????4636??2016-12-12?15:19??Exp0_LED\Exp0_LED.pdsprj.ZALUS.Ben?Zalus.workspace
?????文件???????19142??2016-12-12?12:40??Exp0_LED\Last?Loaded?Exp0_LED.pdsbak
評(píng)論
共有 條評(píng)論