I just was wondering could the LCD component be customized in a way that it would support certain custom memory locations to be nordic characters? Like in finnish we have ä and ö everywhere and even sometimes we visit sweden with this åÅ, and i use lcd acsii 0,1 and to store those, and when im creating code, i have to always put "PRINT ASCII(0)" to certain positions...
If this could automated this somehow that we tell LCD that if the print string has "ä" or "Ä" (ascii 132/142) character, use lcd memory location specified to it.
Or if users could directly write from software to the lcd RAM (custom characters) so if this "ä" or "Ä" character is found from printString, print this chracter ä =(9,0,14,1,15,17,15,0), or in the "ö" or "Ö" case use ö=(9,0,14,17,17,17,14,0) and with "å" or "Å" use å= (4,0,14,1,15,17,15,0) ?
Here is snippet of code how it was once done on older atmel dev board that we used on school..
Code: Select all
void LCD_print (char buf[])
{
int i;
LCD_control = 0x01; // Clear the display
_delay_ms(10);
for(i=0;i<strlen(buf);i++) // Print the buffer to lcd display
{
if ((buf[i] == 'ä')|(buf[i] == 'Ä')) // If the character is ä or Ä
{
LCD_data = 0xE1; // printing the ä to the display (on this display, the E1 is the adress of little ä)
_delay_ms(1);
}
else if ((buf[i] == 'ö')|(buf[i] == 'Ö')) // If the character on ö or Ö
{
LCD_data = 0xE3; // printing ö to the lcd display (on this display, the E3 is the location of little ö)
_delay_ms(1);
}
else
{
LCD_data = buf[i]; // Printing the characters to LCD display
_delay_ms(1);
}
}
}
