winnie 发表于 2009-4-15 10:28:33

程序未执行完一边又开始从头执行???

程序未执行完一边又开始从头执行???
void delay(uint x,uint y)   //delay time :14+(3*(Y-1)+7)*(X-1)
{               
uint z,w;   
w=x;         
do{                           
    z=y;                        
    do{;}while(--z);               
   }while(--w);
}
main()
{
uint j,k,m,n;
uchar i,addr,da;            //com;
TRISB=0xf0;
delay(2,3);
Lcd_Init();       //// Lcd_init()
//Lcd_Black();
Lcd_Write_Data_Contin_n(0x00,0);
delay(100,330);
Lcd_Write_Data_Contin_n(0x00,1);
delay(100,330);
Lcd_Write_Data_Contin_n(0x00,2);
delay(100,330);
Lcd_Write_Data_Contin_n(0x00,3);
delay(100,330);
Lcd_Write_Data_Contin_n(0x00,4);
delay(100,330);
Lcd_Write_Data_Contin_n(0x00,5);
delay(100,330);
Lcd_Write_Data_Contin_n(0x00,6);
delay(100,330);
   
Lcd_Write_Data_Contin_n(0x00,7);
delay(100,330);
Lcd_Write_Data_Contin_n(0x00,8);
delay(100,330);
Lcd_Write_Data_Contin_n(0x00,9);
delay(100,330);

}

winnie 发表于 2009-4-15 10:28:40

disable the WDT
页: [1]
查看完整版本: 程序未执行完一边又开始从头执行???