Friends,
How can I make a font for graphical LCD ? I saw some font library and loop ...but I don't know exactly how to use it ?
Anyone has experience and reference ? I mean, similar to this function, I must try to display from character first before I display one word or one sentence,
Example of A in HEX :
uchar code AsciiLib[] = {
/* A */
0x00,0x00,0x00,0x10,0x10,0x28,0x28,0x28,0x28,0x7C,0x44,0x44,0xEE,0x00,0x00,0x00,
}
I tried to create one function, please correct if it's not right :
#define uchar unsigned char
#define uint unsigned int
void DrawSingleAscii(uint x, uint y, uchar *pAscii, uint LineColor,uint FillColor, uchar Mod)
{
uchar i, j;
uchar str;
uint OffSet;
OffSet = (*pAscii - 32)*16;
for (i=0;i<16;i++)
{
Set_ramaddr(x,y+i);
send_command(0x22);
str = *(AsciiLib + OffSet + i);
for (j=0;j<8;j++)
{
if ( str & (0x80>>j) ) //0x80>>j
{
send_data((uint)(LineColor&0xffff));
}
else
{
if (NORMAL == Mod)
send_data((uint)(FillColor&0xffff));
else
{
Set_ramaddr(x+j+1,y+i);
send_command(0x22);
}
}
}
}
}
Do you have example in function on how to display it ? I'm using C
Thanks a lot