1 void LCD_write_english_string(unsigned char X,unsigned char Y,char *s)2 {3 LCD_set_XY(X,Y);4 while (*s)5 {6 LCD_write_char(*s);7 s++;8 }9 }
主要原因是未理解上端代码
解决方案:
将需显示的数据放入数组中,显示一串字符串
1 num[0] = bai;2 num[1] = shi;3 num[2] = ge;4 num[3] = 0;5 LCD_write_english_string(0,0,"THE ANGLE:");6 LCD_write_english_string(1,1,num);
或者
1 void LCD_write_string(unsigned char X,unsigned char Y,char *s,char length) 2 { 3 char i=0; 4 LCD_set_XY(X,Y); 5 while (i