Very simple code here:
Code: Select all
Write_String_LCD(0, 0, "HELLO world !@#$%^&*()_+");
void Write_String_LCD(char xposition, char yposition, char *string){
char i, s;
s = sizeof(string));
Set_Display_XYAddr(xposition, yposition); // row, column
//
LCD_CS = 0;
for(i=0; i<s; i++){
Write_Char(string[i], 1);
}
LCD_CS = 1;
return;
}
Is there other way how to know a size of the string ?