A moving 'x' is displayed along all possible LCD cursor locations and the actual location of the 'x' is displayed on the bottom right of the LCD to inform what are the possible locations on the current LCD. Many LCDs have different row ans column specifications. This program allow the user to determine the constraints of their LCD so the LCD can be used within these cursor location constraints.
A for loop is used to cycle the 'x' in all of the cursor locations. An x is placed on the current location, a delay is used to give the user time to see the x and the location number. The cursor goes back to that location and displays a space to remove the 'x' so the next 'x' can be displayed and it appears to be moving.
for (int x = 0; x<128; x++)
{
Send_A_Command(0x80 + x);
Send_A_String("x");
itoa(x, positionString, 10);
Send_A_Command(0x80 + 97);
Send_A_String(positionString);
_delay_ms(50);
end_A_Command(0x80 + x);
Send_A_String(" ");
}
Comments and Additional Information
Have some code to share? Or additional information? Respond here:
You need to be logged in to save a response on this page. The response must be constructive, helpful, supplimentary or to correct the existing video, code or narrative content.