void UartRec() interrupt 4 //串口中斷服務程序
{ 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的數(shù)據給數(shù)組b 然后顯示函數(shù)調用b來輸出到led點陣上 通過串口調試助手發(fā)送數(shù)據后proteus仿真里點陣無變化 不知道問題出在哪
void change()
{
int i;
for (i=0;i<32;i++)
{
d=a; //這樣數(shù)組a才會給數(shù)組b
}
}
歡迎光臨 (http://www.torrancerestoration.com/bbs/) | Powered by Discuz! X3.1 |