Display nokia 5110 & Adafruit_PCD8544 custom symbol

Hi, Folks!

I have been trying to find a way to get my 5110 nokia display show custom bitmaps but without any sucess :frowning:

Running the code that comes with the library (the "pcdtest") It shows correctly the flower...(see attachment)..

But when I try to create my custom bitmap using the "LCD ASSISTANT" software it doesn't work and the display shows a missed image instead the my arrow...

This code is the one that came with the library(this one works)

static unsigned char PROGMEM seta_cima[] ={
 B00000000, B11000000,
  B00000001, B11000000,
  B00000001, B11000000,
  B00000011, B11100000,
  B11110011, B11100000,
  B11111110, B11111000,
  B01111110, B11111111,
  B00110011, B10011111,
  B00011111, B11111100,
  B00001101, B01110000,
  B00011011, B10100000,
  B00111111, B11100000,
  B00111111, B11110000,
  B01111100, B11110000,
  B01110000, B01110000,
  B00000000, B00110000
};

This code is the text generated by the LCD ASISSTANT(this doesn't work)

static unsigned char PROGMEM seta_cima[] ={ 
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xC0, 0xF0, 0xC0, 0x80,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80,
0xC0, 0xE0, 0xF8, 0xFC, 0xFE, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xFC, 0xF0, 0xE0,
0xC0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F,
0x7F, 0x7F, 0x7F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x30, 0x30, 0x2C,
0x20, 0x30, 0x78, 0x30, 0x30, 0x2C, 0x20, 0x30, 0x78, 0x30, };

Does anybody have ANY IDEA?

Thank you very very much in advance...

:slight_smile:

BR

tela_Ajuda001.jpg

Anyone?

I don't know this LCD ASSISTANT.
I see only that in your array last number 0x30 is followed by , so another number follow this ( I think 0)
In first array with all binary, the last number have not a , that follow.

I see also that the LCD ASSISTANT have more check button to set some fatures, have you tried to create array using this check like "little/big" ?
http://en.radzio.dxp.pl/bitmap_converter/

Are you sure that this program can be used with Nokia5110? It use the controller PCD8544 but in the program compatibility is for KS, SED, etc.

nid69ita:
I don't know this LCD ASSISTANT.
I see only that in your array last number 0x30 is followed by , so another number follow this ( I think 0)
In first array with all binary, the last number have not a , that follow.

I see also that the LCD ASSISTANT have more check button to set some fatures, have you tried to create array using this check like "little/big" ?
Bitmap converter for mono and color LCD displays

Are you sure that this program can be used with Nokia5110? It use the controller PCD8544 but in the program compatibility is for KS, SED, etc.

Hii.. First of all thank you for your answer..

Well. I have tried to remove the last ',' and still no success.

ON LCD ASSISTANT I have set everything and still no success.

I think the lcd assistant work but but sure...

If the library comes with a logo 'the fruit' and it worked. How could I use to generate a bitmap? Maybe another software?

Thank you very much. Any idea or suggestions will be very appreciated

:slight_smile:

The logo is 16x16 ? Your image is bigger? If yes, you changed drawBitmap() parameters?
http://www.adafruit.com/forums/viewtopic.php?f=25&t=24548#p127207

Here i found something, I don't know if useful:

nid69ita:
The logo is 16x16 ? Your image is bigger? If yes, you changed drawBitmap() parameters?
http://www.adafruit.com/forums/viewtopic.php?f=25&t=24548#p127207

Here i found something, I don't know if useful:
Create Arduino Bitmaps for Nokia 5110 3310 LCDs

HI.. Yes I did change.

The logo is about 20x20.
After that I made a test to find out if the problem was in size.. I have changed the size of the original logo on parameter to see if the problem is like mine. But when I use the original binary logo from adufruit and change its size parameter it just crop the logo..

For me it's just a problem about how to create a logo using the adufruit standards

Tks a lot :slight_smile:

For me it's just a problem about how to create a logo using the adufruit standards

The original array had 32 elements, for a 16 x 16 bitmap. That means that each element is defining 8 pixels.

Your array has 250 elements. Using the same each-byte-respresents-8-pixels ratio, your bitmap is considerably larger than 20 x 20. More like 20 x 100.

We can't see what changes you made to the library/instance to support this much larger bitmap.

Good point PaulS. The software that created the array and the image is shown in the software as about 20x20. Maybe the software is not compatible or some mistakes I am making here.

Do you have some idea about how to create an arrow of 20x20 as an example?

On my 16x2 lcd it works. I JUST create the icon I want and just copy the array crated and paste into my code.

Is there a simple way to just create an arrow of 20x20, PaulS?

Tks so much

Do you have some idea about how to create an arrow of 20x20 as an example?

Use a piece of graph paper and a pencil. Fill in the squares you want. It's probably a lot easier if you stick with sizes that are multiples of 8 (16, 24, etc.). Converting the filled in squares (1) and the empty squares (0) to binary is trivial. Converting the binary to hex isn't that difficult. Each group of 4 squares represents one hex digit.

This can be useful?

The ADA lib uses binary array and LCD assistance gives Hex array.
try online tools to convert the bmp to bin array.

It might be simpler if you use the Henning Karlsen 5110 graphics library.