# include "display.h"//LCD显示字符串函数voidLCD_dispaly(uchar* str){//"\0"在c语言中代表“字符串结束符”。“\0”的ASCII码为“0”,//也就是空字符;字符串总是以“\0”作为串的结束符;因此当把一个字符//串存入一个数组时,也把结束符“\0”存入数组,并以此作为该字符串是//否结束的标志。”while(*str)//比如输入good 总共有g o o d \0 5个元素{Lcd1602_Write_DAT(*str++);}}//指定写入数据的位置voidLCD_Position(bit x,uchar y)//定义行x,定义列y{
uchar position;if(x ==0)
position =0x80+ y;else
position =0xC0+ y;Lcd1602_Write_CMD(position);}