資源簡介
設(shè)計PC機和單片機,單片機和單片機的串口通信。包含圖和源代碼
代碼片段和文件信息
#include
?unsigned?char?idata?buf[10];
?unsigned?char?pf;
unsigned?char?disp_reg[]=
{
0xc00xf90xa40xb00x990x920x820xf80x800x90
};
void?delayms(unsigned?char?x)
?{unsigned?char?i;
??unsigned?int?j;
??for(i=x;i>0;i--)
??for(j=5000;j>0;j--);
?}
?void?main()
{
?unsigned?char?i;
??TMOD=0x20;
?TL1=0XE6;
?TH1=0X00;
?TR1=1;
?SCON=0X50;
?do
{
?while(RI==0);
?RI=0;
?}while(SBUF^0x1!=0);
?SBUF=0x2;
?while(TI==0);
?TI=0;
?
?while(1)
??{?pf=0;
????for(i=0;i<10;i++)
????{
????while(RI==0);
????RI=0;
????buf[i]=SBUF;
????pf+=buf[i];
????}
??while(RI==0);?
??RI=0;
??if((SBUF^pf)==0)
????{SBUF=0X00;break;
????}
??else
????{SBUF=0xff;
?????while(TI==0);
?????TI=0;
???}}
?while(1)
?{for(i=0;i<10;i++)
??{P2=disp_reg[buf[i]];delayms(15);}
?
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件???????1123??2006-08-05?11:07??實驗16串口傳送\輸入0x01亮小燈\mcu.h
?????文件????????659??2009-05-09?08:53??實驗16串口傳送\輸入0x01亮小燈\輸入0x01亮小燈.c
?????文件????????349??2009-05-09?08:53??實驗16串口傳送\輸入0x01亮小燈\輸入0x01亮小燈.hex
?????文件?????????60??2009-05-09?08:53??實驗16串口傳送\輸入0x01亮小燈\輸入0x01亮小燈.lnp
?????文件???????7203??2009-05-09?08:53??實驗16串口傳送\輸入0x01亮小燈\輸入0x01亮小燈.M51
?????文件????????776??2009-05-09?08:22??實驗16串口傳送\輸入0x01亮小燈\輸入0x01亮小燈.plg
?????文件???????1708??2008-07-22?18:15??實驗16串口傳送\輸入0x01亮小燈\輸入0x01亮小燈.Uv2
????.......??????1194??2009-02-10?23:44??實驗16串口傳送\輸入0x01亮小燈\輸入0x01亮小燈_Opt.Bak
?????文件???????1197??2009-05-06?13:20??實驗16串口傳送\輸入0x01亮小燈\輸入0x01亮小燈.Opt
?????文件???????2720??2009-05-09?08:53??實驗16串口傳送\輸入0x01亮小燈\輸入0x01亮小燈.LST
?????文件???????3743??2009-05-09?08:53??實驗16串口傳送\輸入0x01亮小燈\輸入0x01亮小燈.OBJ
?????文件???????3392??2009-05-09?08:53??實驗16串口傳送\輸入0x01亮小燈\輸入0x01亮小燈
?????文件??????????0??2009-05-07?10:38??實驗16串口傳送\顯示hello\hello.plg
?????文件????????603??2009-05-06?13:38??實驗16串口傳送\顯示hello\HELLO2.C
?????文件?????????28??2009-05-06?13:38??實驗16串口傳送\顯示hello\hello.lnp
?????文件???????7064??2009-05-06?13:38??實驗16串口傳送\顯示hello\hello.M51
?????文件???????1614??2009-05-06?13:38??實驗16串口傳送\顯示hello\HELLO2.LST
?????文件???????2085??2009-05-06?13:38??實驗16串口傳送\顯示hello\HELLO2.OBJ
?????文件???????3543??2009-05-06?13:38??實驗16串口傳送\顯示hello\hello
????.......?????????0??2009-05-06?13:35??實驗16串口傳送\顯示hello\hello_Uv2.Bak
?????文件???????1684??2009-05-06?14:29??實驗16串口傳送\顯示hello\hello.Uv2
????.......??????1164??2009-05-06?14:29??實驗16串口傳送\顯示hello\hello_Opt.Bak
?????文件???????1163??2009-05-07?10:30??實驗16串口傳送\顯示hello\hello.Opt
?????文件????????530??2009-05-11?14:21??實驗16串口傳送\雙機調(diào)試\發(fā)送端\發(fā)送.C
?????文件??????????0??2009-05-11?14:49??實驗16串口傳送\雙機調(diào)試\發(fā)送端\1.plg
?????文件?????????22??2009-05-11?14:21??實驗16串口傳送\雙機調(diào)試\發(fā)送端\1.lnp
?????文件???????5015??2009-05-11?14:21??實驗16串口傳送\雙機調(diào)試\發(fā)送端\1.M51
?????文件????????709??2009-05-11?14:21??實驗16串口傳送\雙機調(diào)試\發(fā)送端\1.hex
????.......?????????0??2009-05-06?15:42??實驗16串口傳送\雙機調(diào)試\發(fā)送端\1_Uv2.Bak
?????文件???????1676??2009-05-06?15:43??實驗16串口傳送\雙機調(diào)試\發(fā)送端\1.Uv2
............此處省略78個文件信息
- 上一篇:清理maven倉庫腳本
- 下一篇:模仿QQ登錄界面解決軟鍵盤遮擋按鈕問題
評論
共有 條評論