vikrant
Junior Member level 2
16x2 lcd custom characters
hi friends,
I have interfaced hitachi HD44780 lcd (16x2) with AT89s52. I want to display custom character or user defined character ex. ARROW, BOX,SMILEY.
Can any body give me the code for that or atleast give me the correct algorithm or seudo code.
this code i m using but it is not working
void lcd_DefineChar (int charnum, unsigned char values[])
{
unsigned char set_address;
int i;
if ((charnum >= 0) || (charnum <= 7))
{
set_address = (0x40 + charnum*8); // set LCD address to CG RAM
for (i=0; i<8; i++) // enter character bytes into CG RAM
{
SetCGRAM(set_address + i);
lcdDisplayCharacter(values);
printf(" \n %x ", values);
}
}
}
hi friends,
I have interfaced hitachi HD44780 lcd (16x2) with AT89s52. I want to display custom character or user defined character ex. ARROW, BOX,SMILEY.
Can any body give me the code for that or atleast give me the correct algorithm or seudo code.
this code i m using but it is not working
void lcd_DefineChar (int charnum, unsigned char values[])
{
unsigned char set_address;
int i;
if ((charnum >= 0) || (charnum <= 7))
{
set_address = (0x40 + charnum*8); // set LCD address to CG RAM
for (i=0; i<8; i++) // enter character bytes into CG RAM
{
SetCGRAM(set_address + i);
lcdDisplayCharacter(values);
printf(" \n %x ", values);
}
}
}