问题描述
- 51单片机编程串口通信问题
-
#include
unsigned char a[]="i love";
unsigned int b=0;
void love()interrupt 4
{if(TI==1)
TI=0;
}
void delay(unsigned int a)
{a--;
}
void main()
{EA=1;
ES=1;
TMOD=0X20;
TH1=0XFD;
TL1=0;
TR1=1;
SM1=0;
SM1=1;
while(1)
{for(b=0;b<6;b++)
{SBUF=a[b];
delay(40);}
}
}
1.我想问下为啥代码输出会是这样呢“ieeevvvoooll iiieeevvvoooll iiieeevvvooolll iiieeevvvooolll iiieeeevvooolll iieeeevvooolll iieeeevvvoolll iiieeevvvoolll iiieeevvvoooll iiieeevvvoooll iiieeevvvooolll iiieeevvvooolll iiieeeevvooolll iieeeevvooolll iieeeevvvoolll iiieeevvvoolll iiieeevvvoooll iiieeevvvoooll iiieeevvvooolll iiieeevvvooolll iiieeeevvooolll iieeeevvooolll iieeeevvvoolll iiieeevvvoolll iiieeevvvoooll iiieeevvvoooll iiieeevvvooolll iiieeevvvooolll iiieeeevvooolll iieeeevvooolll iieeeevvvoolll iiieeevvvoolll iiieeevvvoooll iiieeevvvoooll iiieeevvvooolll iiieeevvvooolll iiieeeevvooolll iieeeevvooolll iieeeevvvoolll iiieeevvvoolll iiieeevvvoooll iiieeevvvoooll iiieeevvvooolll iiieeevvvooolll iiieeeevvooolll iieeeevvooolll iieeeevvvoolll iiieeevvvoolll iiieeevvvoooll iiieeevvvoooll iiieeevvvooolll iiieeevvvooolll iiieeeevvooolll iieeeevvooolll iieeeevvvoolll iiieeevvvoolll iiieeevvvoooll iiieeevvvoooll iiieeevvvooolll iiieeevvvooolll iiieeeevvooolll iieeeevvooolll iieeeevvvoolll iiieeevvvoolll iiieeevvvoooll iiieeevvvoooll iiieeevvvooolll iiieeevvvooolll iiieeeevvooolll iieeeevvooolll iieeeevvvoolll iiieeevvvoolll iiieeevvvoooll iiieeevvvoooll iiieeevvvoo”