I have a teensy4.1, with a 16 by 2 LCD screen, and an I2C LCD interface. I was trying to write a bunch of custom characters to an LCD screen, to flip some text.

my issue is that it works fine, but on only up to 8 custom characters. any more than that produces odd results. with a loop of 16, the first 8 characters are printed. should more than 8 characters be defined, only the last assigned are in use.

I commented out all but the first 8 custom characters, and iterates through them in a loop of 16 iterations. this loops over the start. -- I guess that works as I would expect. If I define more than 8 custom Characters, only the last 8 assigned will output.

Here is a picture of that in action: customChar limits to 8

here is my code:

#include <Adafruit_LiquidCrystal.h>
Adafruit_LiquidCrystal lcd(0);

//upside down char glyphs... default characters are 7x5 1 px w/space on the bottom
//these glyphs are 7x5 with space on the top 
byte uA[8] = {  B00000,  B10001,  B10001,  B10001,  B11111,  B10001,  B10001,  B01110};
byte uB[8] = {  B00000,  B01111,  B10001,  B10001,  B01111,  B10001,  B10001,  B01111};
byte uC[8] = {  B00000,  B01110,  B10001,  B00001,  B00001,  B00001,  B10001,  B01110};
byte uD[8] = {  B00000,  B00111,  B01001,  B10001,  B10001,  B10001,  B01001,  B00111};
byte uE[8] = {  B00000,  B11111,  B00001,  B00001,  B01111,  B00001,  B00001,  B11111};
byte uF[8] = {  B00000,  B00001,  B00001,  B00001,  B01111,  B00001,  B00001,  B11111};
byte uG[8] = {  B00000,  B11110,  B10001,  B10001,  B11101,  B00001,  B10001,  B01110};
byte uH[8] = {  B00000,  B10001,  B10001,  B10001,  B11111,  B10001,  B10001,  B10001};
byte uI[8] = {  B00000,  B01110,  B00100,  B00100,  B00100,  B00100,  B00100,  B01110};
byte uJ[8] = {  B00000,  B00110,  B01001,  B01000,  B01000,  B01000,  B01000,  B11100};
byte uK[8] = {  B00000,  B10001,  B01001,  B00101,  B00011,  B00101,  B01001,  B10001};
byte uL[8] = {  B00000,  B01111,  B00001,  B00001,  B00001,  B00001,  B00001,  B00001};
byte uM[8] = {  B00000,  B10001,  B10001,  B10001,  B10101,  B10101,  B11011,  B10001};
byte uN[8] = {  B00000,  B10001,  B10001,  B11001,  B10101,  B10011,  B10001,  B10001};
byte uO[8] = {  B00000,  B01110,  B10001,  B10001,  B10001,  B10001,  B10001,  B01110};
byte uP[8] = {  B00000,  B00001,  B00001,  B00001,  B01111,  B10001,  B10001,  B01111};
byte uQ[8] = {  B00000,  B10110,  B01001,  B10101,  B10001,  B10001,  B10001,  B01110};
byte uR[8] = {  B00000,  B10001,  B01001,  B00101,  B01111,  B10001,  B10001,  B01111};
byte uS[8] = {  B00000,  B01111,  B10000,  B10000,  B01110,  B00001,  B00001,  B11110};
byte uT[8] = {  B00000,  B00100,  B00100,  B00100,  B00100,  B00100,  B00100,  B11111};
byte uU[8] = {  B00000,  B01110,  B10001,  B10001,  B10001,  B10001,  B10001,  B10001};
byte uV[8] = {  B00000,  B00100,  B01010,  B10001,  B10001,  B10001,  B10001,  B10001};
byte uW[8] = {  B00000,  B01010,  B10101,  B10101,  B10101,  B10001,  B10001,  B10001};
byte uX[8] = {  B00000,  B10001,  B10001,  B01010,  B00100,  B01010,  B10001,  B10001};
byte uY[8] = {  B00000,  B00100,  B00100,  B00100,  B01010,  B10001,  B10001,  B10001};
byte uZ[8] = {  B00000,  B11111,  B00001,  B00010,  B00100,  B01000,  B10000,  B11111};
byte cornerA[]={B11111,B10000,B10000,B10000,B10000,B10000,B10000,B10000};//top left
byte cornerB[]={B10000,B10000,B10000,B10000,B10000,B10000,B10000,B11111};//btm left
byte cornerC[]={B11111,B00001,B00001,B00001,B00001,B00001,B00001,B00001};//top right
byte cornerD[]={B00001,B00001,B00001,B00001,B00001,B00001,B00001,B11111};//btm right
void flip(char *text);
void setup() {
  lcd.begin(16,2); // 
  //flipped characters
  //ascii coversion prolly like n+66
  //setCursor be like: (column, row) 16 cols, 2 rows, both start at 0
  for (int i=0; i<16;i++){
  lcd.write(i); //prints ABCDEFGHABCDEFGH
  delay (500);
  lcd.print("LIMIT 8 CHARS?");

void loop() {}

I would like to make more than 8 customChars, am I approaching this correctly? is there a limit somewhere I can change?

  • Note that some letters need not be flipped: HINOSXZ. For others, you could use lookalikes: MW, Pd, bp, dq... Apr 24 at 18:27
  • @EdgarBonet: And (depending on the character set in the particular device used) there may be other usable characters too. Most HD44780 displays have some katakana characters, so eg E may also be usable.
    – psmears
    Apr 25 at 10:54

1 Answer 1


These displays only allow up to 8 custom defined characters. The hardware just only has the character RAM for at most 8 characters. They will be mapped to char codes 0 to 7 and 8 to 15. The character code 8 always prints the same character as code 0, 9 as 1 and so on.

So no, there is no way to use more than 8 custom characters at once. Of course, you can change the characters dynamically, so that a certain location of the screen always shows a changing custom character icon.

  • 1
    Bloody hell, its in the datasheet. I tried modding the library first, and that did not work. cdn-shop.adafruit.com/datasheets/HD44780.pdf
    – j0h
    Apr 24 at 17:59
  • Yea, you can modify the library, but you can't modify the hardware...
    – PMF
    Apr 24 at 18:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.