- This topic has 3 replies, 3 voices, and was last updated 11 years, 11 months ago by .
Viewing 4 posts - 1 through 4 (of 4 total)
Viewing 4 posts - 1 through 4 (of 4 total)
- You must be logged in to reply to this topic.
|
Miscellaneous › Others › Displaying Custom Characters on 16*2 LCD
Hello All,
I am using EADOGM 16*2 LCD display. I am stuck in displaying Custom characters. For example if I want to display a Battery symbol , i just take the equivalent values and write it to Display CGRAM. But when i try reading it back i get nothing on display.
Has anyone worked on this??
Here is my small peice of code for Writing to CGRAM
void BuildChar(uint8_t CGRAMloc, uint8_t *Data)
{
uint8_t i;
if(CGRAMloc<
{
DisplayWriteCmd(DISPLAY_CG_RAM_ADDRESS+(CGRAMloc*);
for(i=0;i<8;i++)
DisplayWriteData(Data[ i ]);
}
}
It would be of great help if anyone could let me know what is the correct way of reading from CGRAM and displaying it on LCD
Thanks
pranathi
Hope this link helps you.
engineersgarage.com/embedded/avr-microcontroller-projects/lcd-interface-atmega16-circuit
Thanks for the reply.
I did the follow the same as givne in the link.
But i couldnt get anything on the disaply.
void BuildCustom(uint8_t ucCGRAMloc, uint8_t *ucpData)
{
uint8_t i;
if(ucCGRAMloc<
{
WriteCmd((DISPLAY_CG_RAM_ADDRESS+ucCGRAMloc*);
for(i=0;i<8;i++)
WriteData(ucpData[ i ]);
}
}
void WriteCustomChar(void)
{ BuildCustomChar(0x01,ucArrow);
WriteCmd(0x64);
WriteString(ucBatteryFull);
SetPos(0,0);
WriteData(0); // Location of LCD where the character is to be displayed
Delay(10);
}
here is my code. Please guide me where am i going wrong
better you try this for eg : ‘h’ in 16×2
cmdwrt(0x64);
datwrt(16);
datwrt(16);
datwrt(16);
datwrt(16+8+4);
etc like that
finally after assigned for h character mention where you want to display this
cmdwrt(0x80);