程序为什么不能循环?
void main()
{
while(1)
{
unsigned char j;
for(j=0;j<8;j++)
{
P1=0x00+j;
Recv_Buffer[j]=Read_ADC();
delay_ms(10);
}
TMOD=0x20; //½«T1ÉèΪ¹¤×÷·½Ê½2
TH1=TL1=0xf6;PCON=0x80; //fosc=6MHzʱ£¬BD=2400
TR1=1; //Æô¶¯T1
SCON=0xd0; //´®ÐпÚÉèΪ¹¤×÷·½Ê½3£¬ ÔÊÐí½ÓÊÕ
ES=1;EA=1; //¿ªÖжÏ
ACC=Recv_Buffer[i]>>8;
CY=P;
TB8=CY;
SBUF=ACC; //Æô¶¯·¢ËÍÏÂÒ»¸öÊý¾Ý
DISPLAYDATA();//ÏÔʾº¯Êý
}
}
|