資源簡介
單片機控制八個發光二極管流水點亮,以查詢方式實現
代碼片段和文件信息
#include?
#include?
sbit?P1_0=0x90;
unsigned?char?nSendByte;
void?delay(unsigned?int?i)
{
unsigned?char?j;
for(;i>0;i--)
for(j=0;j<125;j++)
;
}
main()
{
SCON=0x00;
nSendByte=1;
SBUF=nSendByte;
P1_0=0;
while(1)
{
if(TI)
{
P1_0=1;
SBUF=nSendByte;
delay(400);
P1_0=0;
nSendByte=nSendByte<<1;
if(nSendByte==0)?nSendByte=1;
SBUF=nSendByte;
}
TI=0;
RI=0;
}
}
?/*
#include?
#include?
sbit?P1_0=0x90;
unsigned?char?nSendByte;
void?delay(unsigned?int?i)
{
unsigned?char?j;
for(;i>0;i--)
for(j=0;j<125;j++)
;
}
main()
{
SCON=0x00;
EA=1;
ES=1;
nSendByte=1;
SBUF=nSendByte;
P1_0=0;
while(1)
{
???;
}
}
void?Serial_Port()?interrupt?4?using?0
{
if(TI);
{
P1_0=1;
SBUF=nSendByte;
delay(500);
P1_0=0;
nSendByte=nSendByte<<1;
if(nSendByte==0)?nSendByte=1;
SBUF=nSendByte;
}
TI=0;
RI=0;
?} ?*/
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件??????94207??2019-11-28?11:27??8-1\Last?Loaded?81.DBK
?????文件??????94207??2019-11-28?11:27??8-1\81.DSN
?????文件???????6376??2009-05-07?14:37??8-1\STARTUP.A51
?????文件????????141??2019-12-03?16:07??8-1\8-1.plg
?????文件????????742??2019-11-28?11:42??8-1\81.PWI
?????文件????????958??2019-11-28?11:19??8-1\8.1.c
????.......?????13393??2019-11-28?11:42??8-1\8-1.uvproj
????.......?????55646??2019-12-03?16:07??8-1\8-1.uvopt
?????文件??????14048??2019-11-28?11:19??8-1\STARTUP.LST
?????文件?????????39??2019-11-28?11:19??8-1\8-1.lnp
?????文件???????5050??2019-11-28?11:19??8-1\8-1.M51
????.......?????13389??2019-11-27?23:28??8-1\8-1_uvproj.bak
????.......?????55646??2019-11-28?11:42??8-1\8-1_uvopt.bak
?????文件????????289??2019-11-28?11:19??8-1\8-1.hex
?????文件????????758??2019-11-28?11:19??8-1\STARTUP.OBJ
?????文件???????3328??2019-11-28?11:19??8-1\8.1.LST
?????文件???????2295??2019-11-28?11:19??8-1\8.1.OBJ
?????文件???????2690??2019-11-28?11:19??8-1\8-1
?????目錄??????????0??2019-11-27?22:21??8-1
-----------?---------??----------?-----??----
???????????????363202????????????????????19
評論
共有 條評論