|
void PutString(unsigned char X, unsigned char Y, char S[])
{
unsigned char index=0;
for(;;)
{
if ( S[index] == '\0' )
break;
LCD_XY(X, Y+index);
LCD_PutChar(S[index]);
index++;
}
}
/////////////////////////////////////////////////////////////////////
//
//
/////////////////////////////////////////////////////////////////////
void LCD_PutChar (unsigned char c)
{
WaitStatusLCD();
WriteDataLCD(c);
WaitStatusLCD();
WriteCommandLCD(0xC4); // запись байта в видеоОЗУ
}
////////////////////////////////////////////////////////////////////
//
//
//
////////////////////////////////////////////////////////////////////
void LCD_XY (unsigned char x, unsigned char y)
{
x--;
y--;
WaitStatusLCD();
WriteDataLCD(((x*40)+y)%256);
WaitStatusLCD();
WriteDataLCD(((x*40)+y)>>8);
WaitStatusLCD();
WriteCommandLCD(0x24);
}
LCD_XY в контексте разговора значения не имеет, в ней всего-лишь
из координат символа вычисляется адрес в ОЗУ.
E-mail: info@telesys.ru