I have build an NMEA display with an Arduino Nano. I used the code to print big fonts from whosawhatsis in this topic: LCD "Bigfont" Numbers over 2 or 4 lines - Syntax & Programs - Arduino Forum. I changed some code, to print dashes and commas. I used it with a 16x4 lcd. Here is my code.
#include <LiquidCrystal.h>
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
byte custchar[8][8] =
{
{
B00000,
B00000,
B00000,
B00000,
B00011,
B01111,
B01111,
B11111
}, {
B00000,
B00000,
B00000,
B00000,
B11000,
B11110,
B11110,
B11111
}, {
B00000,
B00000,
B00000,
B00000,
B11111,
B11111,
B11111,
B11111
}, {
B11111,
B01111,
B01111,
B00011,
B00000,
B00000,
B00000,
B00000
}, {
B11111,
B11110,
B11110,
B11000,
B00000,
B00000,
B00000,
B00000
}, {
B11111,
B11111,
B11111,
B11111,
B00000,
B00000,
B00000,
B00000
}, {
B11111,
B11111,
B11111,
B11111,
B11100,
B11000,
B10000,
B00000
}, {
B00000,
B00000,
B00000,
B00000,
B00000,
B00000,
B00000,
B00000
}
};
byte bignums[13][4][3] =
{
{
{0, 2, 1},
{255, 254, 255},
{255, 254, 255},
{3, 5, 4}
},{
{2, 1, 254},
{254, 255, 254},
{254, 255, 254},
{5, 5, 5}
},{
{0, 2, 1},
{0, 2, 255},
{255, 254, 254},
{5, 5, 5}
},{
{0, 2, 1},
{254, 2, 255},
{254, 254, 255},
{3, 5, 4}
},{
{2, 254, 254},
{255, 2, 2},
{254, 255, 254},
{254, 5, 254}
},{
{2, 2, 2},
{255, 2, 2},
{254, 254, 255},
{5, 5, 4}
},{
{0, 2, 1},
{255, 2, 1},
{255, 254, 255},
{3, 5, 4}
},{
{2, 2, 2},
{254, 2, 255},
{254, 255, 254},
{254, 5, 254}
},{
{0, 2, 1},
{255, 2, 255},
{255, 254, 255},
{3, 5, 4}
},{
{0, 2, 1},
{255, 254, 255},
{3, 5, 255},
{254, 254, 5}
},{
{254, 254, 254},
{254, 254, 254},
{254, 254, 254},
{6, 254, 254}
},{
{254, 254, 254},
{2, 2, 2},
{254, 254, 254},
{254, 254, 254}
},{
{254, 254, 254},
{254, 254, 254},
{254, 254, 254},
{254, 254, 254}
}
};
void loadchars()
{
for (int i = 0; i < 8; i++)
{
lcd.createChar(i, custchar[i]);
}
}
void printbigchar(char digit, byte col)
{
char chars [] = "0123456789.- ";
int offset = -1;
for (int i=0; i<strlen(chars); i++)
{
if (chars[i] == digit)
{
offset = i;
break;
}
}
if (offset < 0)
{
return;
}
for (int i = 0; i < 4; i++)
{
lcd.setCursor(col, i);
for (int j = 0; j < 3; j++)
{
if (digit == '.' && j == 1) break;
lcd.write((byte)(bignums[offset][i][j]));
}
}
}
void printbigbuffer(char *buffer)
{
for (int i=strlen(buffer)-1; i>=0; i--)
{
printbigchar(buffer[i], (i + 1) * 4 + 1);
}
}