I'm using an EasyPic7, a pic 16f876 with a 4Mhz crystal and the lcd display is a WINSTAR model WH1602B-TMI-ET#(from EasyPic7).
I need pictograms to be showen on display , like in pic.№1 of the attachment.
I'm trying to make code work with one symbol - symbol №0 in pic №1.
Code: Select all
const unsigned short Untitled5x8[] = {
0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char num #0
};
void InitHD44780CustomChars()
{
char i;
LCD_Cmd(64);
for (i = 0; i <= 7 ; i++)
LCD_Chr_Cp(Untitled5x8[i]);
LCD_Cmd(_LCD_RETURN_HOME);
}
...............................
void main(){
while (1){
Lcd_Cmd(_LCD_CLEAR);
Lcd_Cmd(_LCD_CURSOR_OFF);
delay_ms(500);
InitHD44780CustomChars();
delay_ms(500);
}
}
But, when changing code (adding {} to circle for):
Code: Select all
void InitHD44780CustomChars()
{
char i;
LCD_Cmd(64);
for (i = 0; i <= 7 ; i++) {
LCD_Chr_Cp(Untitled5x8[i]);
LCD_Cmd(_LCD_RETURN_HOME); }
}
For getting the second line we change the code:
Code: Select all
const unsigned short Untitled5x8[] = {
0x1F, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char num #0
};
Delete {} from circle FOR, program - nothing on the monitor. When programming with {} - two lines are shown.
What do you think the matter is?.
Don't know as well what the command LCD_Cmd(64) is for.