void UartRec() interrupt 4 //串口中斷服務(wù)程序
{ if(RI)
{
RI=0;
a[num]=SBUF;
num++;
if(num>31)
{
num=0;
change();
}
}
}
void change()
{
int i;
for (i=0;i<32;i++)
{
d[0]=a;
}
}
串口接收字模給32位的數(shù)組a 接受滿后把a(bǔ)的數(shù)據(jù)給數(shù)組b 然后顯示函數(shù)調(diào)用b來輸出到led點(diǎn)陣上 通過串口調(diào)試助手發(fā)送數(shù)據(jù)后proteus仿真里點(diǎn)陣無變化 不知道問題出在哪
void change()
{
int i;
for (i=0;i<32;i++)
{
d=a; //這樣數(shù)組a才會(huì)給數(shù)組b
}
}
歡迎光臨 (http://www.torrancerestoration.com/bbs/) | Powered by Discuz! X3.1 |