建议你来个延时。for(i=0;i <255;i++)
.....
do { for (a = 0;a <5000;a++); P1_0 = !P1_0; for (a = 0;a <5000;a++); P1_0 = !P1_0; } while (1);
....... }