I need to have 3 differents custom characters in my project, here is the code for each of them :
Code: Select all
// Custom character : °
const char degre[] = {6,9,9,6,0,0,0,0};
void symbol_degre(char pos_row, char pos_char) {
char i;
LCD_Cmd(64);
for (i = 0; i<=7; i++) LCD_Chr_Cp(degre[i]);
LCD_Cmd(LCD_RETURN_HOME);
LCD_Chr(pos_row, pos_char, 0);}
// Custom character : °C
const char degreC[] = {6,9,9,6,0,0,0,0};
void symbol_degreC(char pos_row, char pos_char) {
char i;
LCD_Cmd(64);
for (i = 0; i<=7; i++) LCD_Chr_Cp(degreC[i]);
LCD_Cmd(LCD_RETURN_HOME);
LCD_Chr(pos_row, pos_char, 0);}
// Custom character : Tin
const char Tin[] = {0,0,16,0,23,21,21,21};
void symbol_Tin(char pos_row, char pos_char) {
char i;
LCD_Cmd(64);
for (i = 0; i<=7; i++) LCD_Chr_Cp(Tin[i]);
LCD_Cmd(LCD_RETURN_HOME);
LCD_Chr(pos_row, pos_char, 0);
}
Code: Select all
symbol_degreC(3,9); // Display °C custom character
symbol_degre(1,5); // Display ° custom character
symbol_Tin(2,7); // Display Tin custom character
Can you tell me what is wrong ?
Is it a compiler bug ?
Many thanks for your help,