I can send char's to my LCD with no problem. However, sending integers is a different story. Here is the code for my routine that accepts strings and prints them. As a test for printing characters, I attempt to print the length of the previously printed string (in the 2nd 'for' loop). But I get nothing. Seems like this should have worked.
If you're going to answer "Read the manual", don't bother entering a response.
To test the code, I send "Hello World" to get printed. The length should be 10, and should get printed, but all I get is the string sent to the function.
If you're going to answer "Read the manual", don't bother entering a response.
Rich (BB code):
void WriteStringXldc(char *wstring) {
int slength, indx;
char teststr[8];
slength = strlen(wstring);
for(indx = 0; indx < slength; indx++) {
WriteDataXLCD_local(wstring[indx]);
while (BusyXLCD() );
}
sprintf(teststr, "%d", indx);
slength = strlen(teststr);
for(indx = 0; indx < slength; indx++) {
WriteDataXLCD_local(teststr[indx]);
while (BusyXLCD() );
}
return;
Last edited: