Use LCD_clear(0) instead of a loop.